 var doccoll;
 var objstyle;
 var lastpopupid = null;
 var lastsrcid = null;
 var popX = 0;
 var popY = 0;
 var popW = 0;
 var popH = 0;

 var poptimer = 0;

 var isDOM = document.getElementById ? true : false;
 var isNN4 = document.layers && !isDOM ? true : false;
 var isIE = document.all ? true : false;
 var isIE4 = isIE && !isDOM;


 function GetPopupContent(popupid) {
  var content = null;
  if (isIE4) {
   content = eval("document.all." + popupid + ".style");
  } else {
   content = document.getElementById(popupid).style;
  }
  return content;
 }


 function ShowHide(show) {
  content.visibility = show ? "visible" : "hidden";
  content = show ? content : null;
 }


 function PopupShow(popupid, event) {
  if (typeof errorhandle == 'function') window.onerror = errorhandle;
  if (isNN4) return false;
  if (popupid == null) return true;
  if (typeof popupid != 'string') return true;
  if (poptimer != null) clearTimeout(poptimer);

  var content = GetPopupContent(popupid);
  if (lastpopupid != popupid) {
   popX = event.pageX == null ? window.event.clientX + document.body.scrollLeft : event.pageX;
   popY = event.pageY == null ? window.event.clientY + document.body.scrollTop : event.pageY;
   popX -= 10;
   popY -= 10;
  }
  content.display = "block";
  content.position = "absolute";
  content.left = popX;
  content.top = popY;
  lastpopupid = popupid;
  content.visibility = "visible";
  return true;
 }

 function PopupHide(event) {
  if (typeof errorhandle == 'function') window.onerror = errorhandle;
  if (isNN4) return false;
  if (lastpopupid == null || lastpopupid == "") return true;
  if (poptimer != null) clearTimeout(poptimer);

  if (event!=null) {
   var ex = event.pageX;
   var ey = event.pageY;
   if (popX<ex && ex<popX+popW && popY<ey && ey<popY+popH) return true;
  }
  var content = GetPopupContent(lastpopupid);
  content.visibility = "hidden";
  poptimer = setTimeout("ClearLastPopupId()", 100);
  return true;
 }

 function ClearLastPopupId() {
  lastpopupid = null;
 }



// Correctly handle PNG transparency in Win IE 5.5 or higher.
// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004

function correctPNG() 
   {
   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.appName=='Microsoft Internet Explorer' && version>=5.5)
	window.attachEvent("onload", correctPNG);