if (navigator.appName == "Netscape") {
  var bType="N";
}else{
  var bType="M";
}
var layersReady=false;
var timeoutID=-1;

function showPhoto(){
  if (layersReady==true){
    if (timeoutID > -1) clearTimeout(timeoutID);
    img = getImage("photoImg");
    x = getImagePageLeft(img);
    y = getImagePageTop(img);
    if (bType=="M"){
      document.all["photo"].style.left=x;
      document.all["photo"].style.top=y;
      document.all["photo"].style.visibility="visible";
    }
    if (bType=="N"){
      document.layers["photo"].left=x;
      document.layers["photo"].top=y;
      document.layers["photo"].visibility="visible";
    }
  }
}
function hidePhoto(){
  if (layersReady==true){
    if (bType=="M"){
      document.all["photo"].style.visibility="hidden";
    }
    if (bType=="N"){
      document.layers["photo"].visibility="hidden";
    }
  }
}
function hidePhTimer(){
  if (layersReady==true){
    timeoutID=setTimeout("hidePhoto()",200);
  }
}
function showCRInfo(){
  if (layersReady==true){
    if (timeoutID > -1) clearTimeout(timeoutID);
    img = getImage("crPixel");
    x = getImagePageLeft(img);
    y = getImagePageTop(img);
    if (bType=="M"){
      document.all["master"].style.left=x-document.all["master"].scrollWidth;
      document.all["master"].style.top=y-document.all["master"].scrollHeight;
      document.all["master"].style.visibility="visible";
    }
    if (bType=="N"){
      document.layers["master"].left=x-document.layers["master"].clip.width;
      document.layers["master"].top=y-document.layers["master"].clip.height;
      document.layers["master"].visibility="visible";
    }
  }
}
function hideCRInfo(){
  if (layersReady==true){
    if (bType=="M"){
      document.all["master"].style.visibility="hidden";
    }
    if (bType=="N"){
      document.layers["master"].visibility="hidden";
    }
  }
}
function hideCRiTimer(){
  if (layersReady==true){
    timeoutID=setTimeout("hideCRInfo()",200);
  }
}
function showSearch(){
  if (layersReady==true){
    if (bType=="M"){
      document.all["google"].style.left=document.body.offsetWidth/2+document.body.scrollLeft-document.all["google"].scrollWidth/2;
      document.all["google"].style.top=document.body.offsetHeight/2+document.body.scrollTop-document.all["google"].scrollHeight/2;
      document.all["google"].style.visibility="visible";
    }
    if (bType=="N"){
      document.layers["google"].left=window.innerWidth/2+window.pageXOffset-document.layers["google"].clip.width/2;
      document.layers["google"].top=window.innerHeight/2+window.pageYOffset-document.layers["google"].clip.height/2;
      document.layers["google"].visibility="visible";
    }
  }
}
function hideSearch(){
  if (layersReady==true){
    if (bType=="M"){
      document.all["google"].style.visibility="hidden";
    }
    if (bType=="N"){
      document.layers["google"].visibility="hidden";
    }
  }
}
