// Correctly handle PNG transparency in Win IE 5.5 or higher.

// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

is = new BrowserCheck();

function BrowserCheck() {

		var b = navigator.appName;

		if (b=="Netscape") this.b = "nc"

		else if (b=="Microsoft Internet Explorer") this.b = "ie"

		else this.b = b

		this.v = parseInt(navigator.appVersion);

		this.kon = (this.b=="Konqueror");

		this.nc = (this.b=="nc" && this.v>=4);

		this.nc4 = (this.b=="nc" && this.v==4); //nc4

		this.nc6 = (this.b=="nc" && this.v>=5); //nc6

		this.nc7 = (this.b=="nc" && (navigator.userAgent.indexOf('Netscape/7')>0)&&(navigator.userAgent.indexOf('Mac')==-1)); //nc7

		this.ie = (this.b=="ie" && this.v>=4);

		this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0);

		this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0);

		this.ie6 = (navigator.userAgent.indexOf('MSIE 6')>0)&&(navigator.userAgent.indexOf('Opera')==-1)&&(navigator.userAgent.indexOf('Mac')==-1);

		this.moz = (navigator.userAgent.indexOf('Gecko')>0)&&(navigator.userAgent.indexOf('Netscape')==-1);

		this.op6 = (navigator.userAgent.indexOf('Opera')>0)&&(navigator.userAgent.indexOf('Opera 5')==-1);

	}

	

function correctPNG() 

   {

   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

	     }

      }

   }



if (is.ie6) {   

	window.attachEvent("onload", correctPNG);

	}