function correctPNG()
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
	  for(var i=0; i<document.images.length; i++)
	  {
		 var img = document.images[i]
		 var imgName = img.src.toUpperCase()
		 if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		 {
			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
			i = i-1
		 }
	  }
   }    
}
window.attachEvent("onload", correctPNG);



function flash(w,h,path){
path='/img/i/'+path;
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'"><PARAM NAME="allowScriptAccess" value="sameDomain"><PARAM NAME="movie" value="'+path+'"><PARAM NAME="wmode" VALUE="transparent"><param name="quality" value="high"><embed src="'+path+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
}

function flashx(w,h,path,url){
path='/img/i/'+path;
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+w+'" height="'+h+'"><PARAM NAME="allowScriptAccess" value="sameDomain"><PARAM NAME="movie" value="'+path+'"><param name="flashVars" value="link1='+url+'"><param name="quality" value="high"><embed src="'+path+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" flashVars="link1='+url+'" width="'+w+'" height="'+h+'"></embed></object>');
}
function flashex(w,h,path,url){
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'"><PARAM NAME="allowScriptAccess" value="sameDomain"><PARAM NAME="movie" value="'+path+'"><PARAM NAME="wmode" VALUE="transparent"><param name="flashVars" value="link1='+url+'"><param name="quality" value="high"><embed src="'+path+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" flashVars="link1='+url+'" width="'+w+'" height="'+h+'"></embed></object>');
}

function flashto(w,h,path,url,id){
$('#'+id).html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'"><PARAM NAME="allowScriptAccess" value="sameDomain"><PARAM NAME="movie" value="'+path+'"><PARAM NAME="wmode" VALUE="transparent"><param name="flashVars" value="link1='+url+'"><param name="quality" value="high"><embed src="'+path+'" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" flashVars="link1='+url+'" width="'+w+'" height="'+h+'"></embed></object>');
}