function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if (navigator.appVersion.indexOf("MSIE") > -1 && (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
         }
      }
   }    
}

if(navigator.appVersion.indexOf("MSIE") > -1)
{
	window.attachEvent("onload", correctPNG);
}


//chat Application
 var chatWindow;

 function openBrWindow(winName, features) {

 

                                    var sessionId = document.getElementById('SessionId').value;

                                    var theURL = "";

                                    chatWindow = window.open(theURL, winName, features);

                                    if(chatWindow.document.getElementById('ChatOpen') == null){

                                                var chatUrl =  "http://161.76.28.43:7043/onlinechat/VisitorLogin.po?id=register&VisitorUniqueId="+document.getElementById('SessionId').value;

                                                chatWindow.document.writeln("<html><head><title>"+winName+"</title></head><body style='margin:0;' >");

                                                chatWindow.document.writeln("<input type='hidden' id='ChatOpen'>")

                                                chatWindow.document.writeln("<table border='0' height='100%' cellspacing='0' cellpadding='0' width='600'>");

                                                chatWindow.document.writeln("<tr><td height='100%' valign='top' align='center'>");

                                                chatWindow.document.writeln("<iframe scrolling='no' frameborder='0' width='601' height='508' src='"+ chatUrl+"'></iframe>");

                                                chatWindow.document.writeln("</td></tr>");

                                                chatWindow.document.writeln("</table>");

                                                chatWindow.document.writeln("</body></html>");

                                    }

                                    chatWindow.focus();

   }

