var IW= 0;
var IH= 0;
var PX= 0;
var PY= 0;
var brand= null;

//set image width below
var IMGW= 20;

//set image height below
var IMGH= 30;

//adjust the two variables below if the image is cut off on the bottom or the left
var LSAFETY= 40;
var TSAFETY= 5;

//set the name of the image below
var off_image= "images/to_top.gif";
var on_image= "images/to_top.gif";
var gandalf= 0;

var ourLays= new Array();
var alldivs= new Array();
alldivs= document.all.tags("DIV");
//line 21
function BrandInit(){
if (brand!= null) return;
else{ 
  ID_CHECK:  for (i=0; i<alldivs.length; i++){
    if ((gandalf==0)&&(alldivs(i).id == "FloatingUp")){
      gandalf=1;
      brand= alldivs(i);
      continue ID_CHECK;
    }
    if(gandalf==1){
      if(alldivs(i).id== "nh1"){
       continue ID_CHECK;
      }
    ourLays[ourLays.length]= alldivs(i);
    }
  }
 }
}
//line 40
function BrandPosition(){
if(brand!= null){
  IH= document.body.clientHeight;
  IW= document.body.clientWidth;
  PX= document.body.scrollLeft;
  PY= document.body.scrollTop;
  brand.style.top= (IH+PY-(IMGH+TSAFETY));
  brand.style.left=(IW+PX-(IMGW+LSAFETY));
  for (i=0; i<alldivs.length; i++){
    if (alldivs(i).style.zIndex > brand.style.zindex)
      brand.style.zindex= (alldivs(i).style.zIndex + 1);
  }
}
}
//line56
function BrandShow(toggle){
if(brand!= null)
  brand.style.display= toggle;
}

function Branding(){
if (navigator.appVersion.indexOf("Mac") == -1){
  oldIW= IW;
  oldIH= IH;
  oldPX= PX;
  oldPY= PY;
  if ((document.body.clientHeight != oldIH)||(document.body.clientWidth != oldIW)||(document.body.scrollLeft != oldPX)||(document.body.scrollTop != oldPY)){
    BrandInit();
    if((brand != null)||(!window_checker)){
      BrandShow("none");
      BrandPosition();
      BrandShow("");
    }
    else{
      if(brand != null){
 BrandShow("none");
      }
    }
  }
 }
}

//set the refresh rate - how quickly the image reappears after the user scrolls - below
setInterval("Branding()",1000);

