 var isIE6 = false, isIE7 = false,
 isFIREFOX2 = false, isFIREFOX = false,
 isNETSCAPE7 = false, isNETSCAPE = false,
 isOPERA9 = false, isOPERA = false,
 isUNKNOWN = false; 

var strChUserAgent = navigator.userAgent;
 var intSplitStart = strChUserAgent.indexOf("(",0);
 var intSplitEnd = strChUserAgent.indexOf(")",0);
 var strChStart = strChUserAgent.substring(0,intSplitStart);
 var strChMid = strChUserAgent.substring(intSplitStart, intSplitEnd);
 var strChEnd = strChUserAgent.substring(strChEnd);

 if(strChMid.indexOf("MSIE 7") != -1)
 isIE7 = true;
 else if(strChMid.indexOf("MSIE 6") != -1)
 isIE6 = true;
 else if(strChEnd.indexOf("Firefox/2") != -1)
 isFIREFOX2 = true;
 else if(strChEnd.indexOf("Firefox") != -1)
 isFIREFOX = true;
 else if(strChEnd.indexOf("Netscape/7") != -1)
 isNETSCAPE7 = true;
 else if(strChEnd.indexOf("Netscape") != -1)
 isNETSCAPE = true;
 else if(strChStart.indexOf("Opera/9") != -1)
 isOPERA9 = true;
 else if(strChStart.indexOf("Opera") != -1)
 isOPERA = true;
 else
 isUNKNOWN = true;
 
 
//ie 6 fix PNG 24
function setTransparency(img) {
	if (isIE6) {
		 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 ;
	}
}
