//logo info
//"../images/a13.gif" width="162" height="57"

// set the size of logo image
var logowidth=162;
var logoheight=57;
var staticlogo=new Image(logowidth,logoheight);

// set the x and y offsets for the image from the bottom left corner of the page
var logoXoff = 3;
var logoYoff = 20;
var topLimit = 200;

// set source for logo image
staticlogo.src="../images/a13.gif";

// set url for this logo to link to
var logolink="#top";

// set alt text for logo image
var alttext="OSTA.org return to top";

// get browser environment
var ns4=document.layers;
var ie4=document.all;
var ns6=document.getElementById&&!document.all;
var mac=(navigator.platform.indexOf("Mac")!=-1);

// reloads the window if we're in n4 to fix resize issue
function regenerate(){
  window.location.reload();
}
function regenerate2(){
  if (ns4){
    setTimeout("window.onresize=regenerate",2);
  }
}

// write out the logo element in ie
if (ie4){
  document.write('<span id="logo" style="position:absolute;top:100;width:'+staticlogo.width+';height:'+staticlogo.height+';visibility:visible"></span>');
}

// create the logo layer for n4  
function createlogo(){
  staticimage=new Layer(100);
  staticimage.left=-300;
  staticimage.top=120;
  staticimage.document.write('<a href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 alt="'+alttext+'"></a>');
  staticimage.document.close();
  staticimage.visibility="show";
  regenerate2();
  staticitns();
}

// build logo element reference
if (ns4){
  window.onload=createlogo;
}
else if (ie4){
  crosslogo=document.all.logo;
}
 else if (ns6){
  crosslogo=document.getElementById("logons6");
}

// add content to the logo element for ie and n6
function insertimage(){
  crosslogo.innerHTML='<a href="'+logolink+'"><img src="'+staticlogo.src+'" border=0 alt="'+alttext+'"></a>'
}
  
// init x and y position for ie and n6
if (ie4||ns6){
  w=logoXoff;
  h=ns6? window.innerHeight-logoheight-logoYoff : document.body.clientHeight-crosslogo.style.pixelHeight-logoYoff;
	h=(h<topLimit)?topLimit:h;
	crosslogo.style.left=w;
  crosslogo.style.top=h;
}

// reset logo position for ie and n6
function logoit(){
  h=ns6? window.innerHeight-logoheight-logoYoff+pageYOffset : document.body.clientHeight-crosslogo.style.pixelHeight-logoYoff+document.body.scrollTop;
  h=(h<topLimit)?topLimit:h;
	var w2=ns6? pageXOffset+w : document.body.scrollLeft+w;
  var h2=ns6? h : h;
  crosslogo.style.left=w2;
  crosslogo.style.top=h2;
}
// reset logo position for n4
function logoit2(){
  staticimage.left=pageXOffset+logoXoff;
	sh=pageYOffset+window.innerHeight-staticimage.document.height-logoYoff;
	sh=(sh<topLimit)?topLimit:sh;
  staticimage.top=sh;
}

// handle window scroll/resize in ie and n6 
if (ie4){
  if(mac){
    startstaticie=setInterval("logoit();",5);
  } else {
	  window.onscroll = logoit;
	}
	window.onresize=new Function("window.location.reload()");
  window.onload=insertimage;
}
else if (ns6){
  startstatic=setInterval("logoit()",5);
  window.onload=insertimage;
  window.onresize=new Function("window.location.reload()");
}

// handle window scroll in n4
function staticitns(){
   startstatic=setInterval("logoit2()",5);
}



