function pngfix(){
	var arVersion = navigator.appVersion.split("MSIE");
	var version = parseFloat(arVersion[1]);
	if ((version >= 5.5) && (version < 7)){
		var png_images = $$('.pngfix');	
		png_images.each(function(element) {
			if(!$(element).hasClass('pngfixed')){
				$(element).addClass('pngfixed');
				var img = $(element);
				var imgID = (img.id) ? "id='" + img.id + "' " : ""
				var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				var imgStyle = "display:inline-block;" + img.style.cssText 
				if (img.align == "left") imgStyle = "float:left;" + imgStyle
				if (img.align == "right") imgStyle = "float:right;" + imgStyle
				if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
				var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
				img.outerHTML = strNewHTML						
			}
		});
	} else {
		$$('.pngfix').addClass('pngfixed');
	}
}

function fix(){
	//	fix site
	$('site').setStyle('height', $('container').getSize().y+99+"px");
	
	//	fix shadows
	$('sh_l').setStyle('height', $('site').getSize().y+"px");
	$('sh_b').setStyle('top', $('site').getSize().y+"px");
	$('sh_bl').setStyle('top', $('site').getSize().y+"px");
}

function init(){
	pngfix();
	fix();
	
	$('payoff').addEvent('mouseenter', function(){ $('baloon').setStyle('display', 'block'); });
	$('payoff').addEvent('mouseleave', function(){ $('baloon').setStyle('display', 'none'); });	
	
}

window.addEvent('load', init);
