﻿(function(){var $a='http://www.4765.cn/static/images/none.gif';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($b,$c){$d=($c||document);$e=[];$f=$d.all||$d.getElementsByTagName('*');for(i=0;i<$f.length;i++){if($f[i].className==$b||$f[i].className.indexOf($b)+1||$f[i].className.indexOf($b+' ')+1||$f[i].className.indexOf(' '+$b)+1){$e[$e.length]=$f[i];}};return $e;};this.filterMethod=function($g){var o=document.createElement('div');var $h='DXImageTransform.Microsoft.AlphaImageLoader';if($g.nodeName=='DIV'){var b=$g.currentStyle.backgroundImage.toString();$g.style.backgroundImage='none';var i1=b.indexOf('url("')+5;var $i=b.substr(i1,b.length-i1-2).replace('.gif','.png');o=$g;o.style.writingMode='lr-tb';o.style.filter="progid:"+$h+"(src='"+$i+"',sizingMethod='crop')";}else if($g.nodeName=='IMG'){var $j={w:$g.width,h:$g.height};var $i=$g.getAttribute('src').replace('.gif','.png');$g.src=$a;$g.width=$j.w;$g.height=$j.h;$g.style.filter="progid:"+$h+"(src='"+$i+"',sizingMethod='crop')";$g.style.writingMode='lr-tb';}};this.pngMethod=function(o){$k=this.getBackgroundImage(o);if($k){o.style.backgroundImage='url('+$k.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 $l=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;$l=b.substr(i1,b.length-i1-1);}else{}}else{}};return $l;};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]);}}};this.init();})();

