Event.observe(window, 'load', function() {

	/* this script fixes alpha transparencies of images on IE6 */
	/* It works on all img tags with maniAlpha class (<img class="maniAlpha" ...>) */

	if ((/MSIE (\d+\.\d+);/.test(navigator.userAgent)) ? (Number(RegExp.$1) == 6 ? true : false) : false) {
		var js = /IE6AlphaFix\.js(\?.*)?$/;
		$$('script[src]').findAll(function(script) {	/* find IE6AlphaFix.js in the DOM to get its path */
			return script.src.match(js);
		}).each(function(script) {
			var path = script.src.replace(js, '');		/* here we have the path (relative or absolute) to IE6AlphaFix, so we can relocate x.gif */
			$$('img[src].maniAlpha').each(function(img) {	/* find all img tags with maniAlpha class */
				var src = img.src;
				img.src = path+'../gfx/x.gif';
				img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
			});
		});
	}

});

