
//
var brows;
var logo_width = 220;
var logo_height= 95;

function Init()
{
  brows=new BrowserObj();
  if( (brows.major < 4) || (brows.other))
    alert("Only works with version 4 browsers");
  else
  {
    if(brows.navigator)
    {
      orig_height = window.innerHeight;
      orig_width = window.innerWidth;
    }
    if(brows.explorer)
    {
      orig_height=document.body.clientHeight;
      orig_width=document.body.clientHeight;
    }
    if(brows.nn6)
	{
	  orig_height = self.innerHeight;
      orig_width = self.innerWidth;
	}
    SetupEvents();
    PositionLogo();
	
  }
}  //Init()

 
function BrowserObj()  //browser sniffing
{
  this.navigator=0;
  this.nn6=0;
  this.explorer=0;
  this.other=0;
  this.major=parseInt(navigator.appVersion);
  if ((navigator.appName.toLowerCase()).indexOf("netscape") >=0)
  {
    this.navigator=1;
    if (this.major>=5)
    {
	  this.nn6=1;
	  this.navigator=0;
	}
	  
  }
  else
  {
    if ((navigator.appName.toLowerCase()).indexOf("explorer") >=0)
      this.explorer=1;
    else
      this.other=1;
  }
} // BrowserObj()


function PositionLogo()
{
  var width;
  var height;
  if(brows.navigator)
  { //Netscape 4.x
    width = window.innerWidth +window.pageXOffset;
    height = window.innerHeight +window.pageYOffset;
  }
  
  if(brows.explorer)
  { //IE
    width = document.body.clientWidth +document.body.scrollLeft; 
    height = document.body.clientHeight+ document.body.scrollTop;
  }
   
  if(brows.nn6)
  { //NN 6

      width=self.innerWidth + self.pageXOffset;
	  height=self.innerHeight + self.pageYOffset;
  }

// logo_height and logo_width are global variables
  var top = height-logo_height;
  var left = width-logo_width;

  if(brows.navigator)
    document.layers["logo"].moveTo(left,top);

  if(brows.explorer)
  {
    document.all("logo").style.left = left;
    document.all("logo").style.top = top;
  }
     
  if(brows.nn6)
  {
    document.getElementById("logo").style.left=left;
    document.getElementById("logo").style.top=top;
  }
  //self.status=("top:"+ top +" left:"+left);
} // PositionLogo


function SetupEvents()
{

  if ((brows.navigator)||(brows.nn6))
  {
    setInterval("PositionLogo()", 50);
	}
  else
  {
    window.onresize= new Function("PositionLogo()");
    window.onscroll= new Function("PositionLogo()");   
  }
} // SetupEvents 

