function correctPNG(){
   for(var i=0; i<document.images.length; i++){
   //for(var i=0; i<10; 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 init(message) {
    var loadingMessage;
  	if (message==null){
  		loadingMessage="Loading";
  	}else{
  		loadingMessage=message;
  	}
	document.getElementById('loadMsg').style.width=document.body.scrollWidth;
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		var scrollHeight=document.body.scrollHeight;
		var clientHeight=document.body.clientHeight;
		if (scrollHeight>clientHeight){
			document.getElementById('loadMsg').style.height=scrollHeight;// IE
		}else{
			document.getElementById('loadMsg').style.height=clientHeight;// IE
		}
		
	}else{
		document.getElementById('loadMsg').style.height=document.body.scrollHeight;// FF, ns
	}

  	document.getElementById('loadMsgSub').innerHTML='<table width="300" class="hairLineTable"><tr height="50"><td class="hairLineTdF" '+
  	'align="center"><table><tr><td><img src="images/indicator/indicator'+Math.floor(Math.random()*5)+'.gif"/></td><td>'+	
  	loadingMessage+'</td></tr></table></td></tr></table>';
	
    document.getElementById('loadMsg').style.display='inline';
    document.getElementById('loadIco').style.display='inline';
    try{
  		document.getElementById('AcsnameInfo').style.display = "none";
 		document.getElementById('Acsname').style.display = "none";
 		}catch(e){
 		
 	}
}

function uninit(){
	document.getElementById('loadMsg').style.display='none';
    document.getElementById('loadIco').style.display='none';

}

function showObj(id){
	if(document.getElementById(id).style.display=="inline"){
		document.getElementById(id).style.display="none";
	}else{
		document.getElementById(id).style.display="inline";
	}
}
