function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   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
         }
      }
   }    
}

function printflash(swf,w,h,div,trans){
		var so = new SWFObject(swf, "flash-animations", w, h, "8", "#ffffff");
		if(trans==true) { so.addParam("wmode", "transparent"); }
		so.write(div);	
}

function loadwarning(){

	document.getElementById("mask").style.display="block";
	document.getElementById("warning").style.display="block";
	document.getElementById("site").style.overflow="hidden";

}

function loadfeedback(){

	document.getElementById("mask").style.display="block";
	document.getElementById("feedback").style.display="block";
	document.getElementById("site").style.overflow="hidden";

}
function closefeedback(){

	document.getElementById("mask").style.display="none";
	document.getElementById("feedback").style.display="none";
	document.getElementById("site").style.overflow="visible";

}

function showcomp(x){

	document.getElementById("csamount").innerHTML=x.value;
	document.getElementById("csprice").innerHTML="20";

	if(x.value==''){
		document.getElementById("compsliptext").style.display="block";
		document.getElementById("compslipradio").style.display="none";
	}else{
		document.getElementById("compsliptext").style.display="none";
		document.getElementById("compslipradio").style.display="block";
	}

}

function loadhelp(s,i){
	n=window.open('help/index.php?section='+s+'&id='+i,'helpconsole','width=700,height=600,menubar=0,resizable=0');
	n.focus();
}

function colpop(x,d){
	document.getElementById(x).style.display=d;
}

function mytestfunc(){
	alert("hello");	
}

function tradingascheck(){

	if(document.getElementById("tradingcheck").checked==true){
		document.getElementById("tadiv").style.display="block";
	}else{
		document.getElementById("tadiv").style.display="none";	
	}
}

function url(u){
	nw=window.open(u,'PrintReceipt','resizable=0,scrollbars=1');
	nw.focus();
}