function TestScript()
  {
  document.getElementById('scripterror').style.display="none";
  }
  
function setContentHeight()
  {
  document.getElementById('content').style.height = document.body.clientHeight - 175; //78px(header) + 20px(footer)
  }

// Load an overview page
function loadworks(which)
  {	
	var winhandle = window.open(which, "5", "menubar=no, toolbar=no,directories=no,location=no, status=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=600")
	return false;
	}

function displayMenu()
  {
  if(typeof xInt == "number")// if there is an interval set we need to clear it before making a new one.
   {
   window.clearInterval(xInt);
   }
  xInt = setInterval("scrollDown('toggle')", 12);
  }
  
function hideMenu()
  {
  if(typeof xInt == "number")// if there is an interval set we need to clear it before making a new one.
   {
   window.clearInterval(xInt);
   }
  xInt = setInterval("scrollDown('up')", 8);
  }
down = false;
function scrollDown(updown)
  {
  //alert(updown);
  sTop = document.getElementById('reg').style.top;
  sVal = sTop.substring(0,sTop.length-2)
  TopVal = sVal-0
  if(updown == "toggle")
    {
    if(down == true)
      {
      updown = "up"
      }
    else
      {
      updown = "down"
      }
    }
   
  if(updown == "down")
    {
    if(TopVal > 47)
      {
      window.clearInterval(xInt);
      down = true;
      }
     else
      {
      document.getElementById('reg').style.top = TopVal +1;
      }
    }
  else
    {
     if(TopVal < -47)
      {
      window.clearInterval(xInt);
      down = false;
      }
     else
      {
      document.getElementById('reg').style.top = TopVal -1;
      }
    }
  }
