// JavaScript Document
//function PNGHandler(){var self=this;this.na=navigator.appName.toLowerCase();this.nv=navigator.appVersion.toLowerCase();this.isIE=this.na.indexOf('internet explorer')+1?1:0;this.isWin=this.nv.indexOf('windows')+1?1:0;this.ver=this.isIE?parseFloat(this.nv.split('msie ')[1]):parseFloat(this.nv);this.isMac=this.nv.indexOf('mac')+1?1:0;this.isOpera=(navigator.userAgent.toLowerCase().indexOf('opera ')+1||navigator.userAgent.toLowerCase().indexOf('opera/')+1);if(this.isOpera)this.isIE=false;this.transform=null;this.getElementsByClassName=function(className,oParent){doc=(oParent||document);matches=[];nodes=doc.all||doc.getElementsByTagName('*');for(i=0;i<nodes.length;i++){if(nodes[i].className==className||nodes[i].className.indexOf(className)+1||nodes[i].className.indexOf(className+' ')+1||nodes[i].className.indexOf(' '+className)+1){matches[matches.length]=nodes[i]}};return matches};this.filterMethod=function(oOld){var o=document.createElement('div');var filterID='DXImageTransform.Microsoft.AlphaImageLoader';if(oOld.nodeName=='DIV'){var b=oOld.currentStyle.backgroundImage.toString();oOld.style.backgroundImage='none';var i1=b.indexOf('url("')+5;var newSrc=b.substr(i1,b.length-i1-2).replace('.gif','.png');o=oOld;o.style.writingMode='lr-tb';o.style.filter="progid:"+filterID+"(src='"+newSrc+"',sizingMethod='crop')"}else if(oOld.nodeName=='IMG'){var newSrc=oOld.getAttribute('src').replace('.gif','.png');oOld.src='/images/none.gif';oOld.style.filter="progid:"+filterID+"(src='"+newSrc+"',sizingMethod='crop')";oOld.style.writingMode='lr-tb'}};this.pngMethod=function(o){bgImage=this.getBackgroundImage(o);if(bgImage){o.style.backgroundImage='url('+bgImage.replace('.gif','.png')+')'}else if(o.nodeName=='IMG'){o.src=o.src.replace('.gif','.png')}else if(!this.isMac){}};this.getBackgroundImage=function(o){var b,i1;var bgUrl=null;if(o.nodeName=='DIV'&&!(this.isIE&&this.isMac)){if(document.defaultView){if(document.defaultView.getComputedStyle){b=document.defaultView.getComputedStyle(o,'').getPropertyValue('background-image');i1=b.indexOf('url(')+4;bgUrl=b.substr(i1,b.length-i1-1)}else{}}else{}};return bgUrl};this.supportTest=function(){if(this.isIE&&this.isWin&&this.ver>=5.5){self.transform=self.filterMethod}else if(!this.isIE&&this.ver<5){self.transform=null}else if(!this.isIE&&this.ver>=5||(this.isIE&&this.isMac&&this.ver>=5)){self.transform=self.pngMethod}else{self.transform=null;return false};return true};this.init=function(){if(this.supportTest()){this.elements=this.getElementsByClassName('png');for(var i=0;i<this.elements.length;i++){this.transform(this.elements[i])}}}};var pngHandler=new PNGHandler();
 
 
 

/*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
      }
   }
}
*/


var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) {
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
					  + " style=\"" + "width:" + myImage.width 
					  + "px; height:" + myImage.height 
					  + "px;" + imgStyle + ";"
					  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
					  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}



