var scrollPos=0; // current scroll position
var scrollNudge=50; // for adjusting endpoint after positioning divs - only use with scrollDown and scrollDown2

function scrollUp($spd) {
 if ((scrollPos)>0) {
  return;
 }else{
  scrollPos=scrollPos+$spd;
  document.getElementById('scrollTxt').style.top = scrollPos+'px';
  scrollTimer = setTimeout('scrollUp('+$spd+')',1);
 }
}

function scrollDown($spd) {
 if ((scrollPos)<((scrollNudge)-(document.getElementById('scrollTxt').scrollHeight))+300) {
  return;
 }else{
  scrollPos=scrollPos-$spd;
  document.getElementById('scrollTxt').style.top = scrollPos+'px';
  scrollTimer = setTimeout('scrollDown('+$spd+')',1);
 }
}

function scrollStop() {
 document.getElementById('scrollTxt').style.top = scrollPos+'px';
 if (scrollTimer) {clearTimeout(scrollTimer)};
}

function modified() {
 // var theDate = (new Date(document.lastModified));
 var modDate = (document.lastModified);
 document.write( "<b>This page was last updated on "+ modDate +"</b>");
}

function webform(URL) {
 day = new Date();
 id = day.getTime();
 eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=300,left = 640,top = 375');");
}

function clear_box($name) {
 document.getElementById($name).value = "";
}

function swapImage(id,image) {
 if(document.images)document.images[id].src=image;
}
 