﻿// floatter.js
// floating box
document.ns = navigator.appName == "Microsoft Internet Explorer";
var col =  document.getElementById("leftcol");
var t = 0;
var floatterTimer = 0;
if(col)t = col.style.top;

function myload()
{
    var myright = document.getElementById("leftcol");
   if(myright){ 
    myright.style.top = 20;
   t = 20; 
    mymove();
   } 
}

function mymove() {   
     var myright = document.getElementById("leftcol"); 
     var bottomscroll=typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;

     if(floatterTimer>0) window.clearTimeout(floatterTimer) ;
     if(bottomscroll > 240){ 
         myright.style.top = t+ bottomscroll -240 +'px';
         myright.style.position = "relative";
     }else{
        myright.style.top = '0px';
     }
        floatterTimer = setTimeout("mymove();",50)
     }

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    top.document.MM_pgW=innerWidth; top.document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=top.document.MM_pgW || innerHeight!=top.document.MM_pgH) location.reload();
}

MM_reloadPage(true);

function close_float_right(){
     var myright = document.getElementById("leftcol");
	 myright.style.visibility='hidden';
}

function stopfloatter()
{
   if(floatterTimer>0) window.clearTimeout(floatterTimer) ;
}

myload();