﻿isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;
ishidden = true;
whichDog= isIE ? document.all.theLayer : document.getElementById("theLayer");
function dd(e){
	var posX = isIE ? event.clientX : e.clientX; 
	var posY= isIE ?  event.clientY : e.clientY;
	posX += document.body.scrollLeft + 5 +document.documentElement.scrollLeft;
	posY += document.body.scrollTop + 5+ document.documentElement.scrollTop;
    whichDog.style.left= posX;
    whichDog.style.top= posY;
  return false;  
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
  document.onmousemove=null;
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
  document.onmousemove=dd;
}
/*********************************************************************/

function showXmlPopup(text, title){
  document.all("theLayerContent").innerHTML = text;
  showMe();
}
function OpenNewWindow(text)
{
    var newWindow = window.open("", "Viewer", "width=600px, height=300px,location=no, directories=no, menubar=no, status=no, toolbar=no, scrollbars=yes, RESIZABLE=no ");
    newWindow.document.writeln("<html><body style='margins: 0 0 0 0;'>");
    newWindow.document.writeln(text);
    newWindow.document.writeln("</body></html>");
    newWindow.document.close();
}


