   //All these functions are used while making the alert hover down
   var AlertHidden=1;
   var AlertStep=4;
   var AlertInterval=20;
   var AlertBegin=90;
   var AlertEnd=122;
   
   function setup()
   {
		var AlertDiv= document.getElementById("SubAlertBox");
		if (AlertDiv != null)
		{
			AlertDiv.style.top=AlertBegin;
		}
   }
	
   //Called when alert opens and automatically drops down
	function openAlert() 
	{
		var AlertDiv= document.getElementById("SubAlertBox");
		AlertDiv.style.visibility="visible";
		if ( parseInt(AlertDiv.style.top) < AlertEnd ) 
		{
         AlertDiv.style.top=parseInt(AlertDiv.style.top)+AlertStep + "px";
       x = setTimeout("openAlert()",AlertInterval);     
      }
      else 
      { 
         AlertHidden = 0; 
      }
   }
   
   //Called when alert is closed and automatically goes up
   function closeAlert() 
	{
		var AlertDiv= document.getElementById("SubAlertBox");
		if ( parseInt(AlertDiv.style.top) > AlertBegin ) 
		{
		AlertDiv.style.top=parseInt(AlertDiv.style.top)-AlertStep + "px";
		x = setTimeout("closeAlert()",AlertInterval);
		}
		else 
		{  
			AlertDiv.style.visibility= "hidden"; 
			AlertHidden = 1; 
		}
   }
   
   function tryOpenAlert()
   {
      if(AlertHidden==1)
      {  
         openAlert();
      }
   }
   
   function tryCloseAlert()
   {
      if(AlertHidden==0)
      {  
         closeAlert();
      }
   }
   
   //User calls this to toggle alerts on and off.
   function toggleAlert()
   {
      if(AlertHidden==1)
         {  
            openAlert();
         }
      else
         {  
            closeAlert();
         }
   }