// Author :	 Wade Lockhart
// Copyright :	 ICS Web Development 2000
// Date Writen : 27-06-2000
  
  
  
  
  // Time & Date Functions
  // ***********************************************************************************
  // Function to display current Date : day/date/month/year
   
  function Current()
   {
     
   var current = new Date();
   
   var day = current.getDay();
   var month = current.getMonth();
   var year = current.getYear();
   var date = current.getDate();
  
   
   // Set day of week to a String
   
   if(day == 0)
   day = "Sunday";
   
   else if(day == 1)
   day = "Monday";
   
   else if(day == 2)
   day = "Tuesday";
   
   else if(day == 3)
   day = "Wednesday";
   
   else if(day == 4)
   day = "Thursday";
   
   else if(day == 5)
   day = "Friday";
   
   else if(day == 6)
   day = "Saturday";
   
   
   
   // Set month to a String
   
   if(month == 0)
   month = "January";
   
   
   else if(month == 1)
   month = "Febuary";
   
   else if(month == 2)
   month = "March";
   
   else if(month == 3)
   month = "April";
   
   else if(month == 4)
   month = "May";
   
   else if(month == 5)
   month = "June";
   
   else if(month == 6)
   month = "July";
   
   else if(month == 7)
   month = "August";
   
   else if(month == 8)
   month = "September";
   
   else if(month == 9)
   month = "October";
   
   else if(month == 10)
   month = "November";
   
   else if(month == 11)
   month = "December";
   
 
   // Output current Date   
   
   document.writeln("<B><FONT COLOR=\"#FFFFFF\">" + day + " " + " "+ date + " " + month + " " + year + "</FONT></B>" );   
       
   }
  
  
  // ***********************************************************************************
  // Function to create a Clock 
  
  
  
   function Clock()
    {
          var time = new Date()
          var hour = time.getHours()
          var minute = time.getMinutes()
          var second = time.getSeconds()
          var temp = "" + ((hour > 12) ? hour - 12 : hour)
          temp += ((minute < 10) ? ":0" : ":") + minute
          temp += ((second < 10) ? ":0" : ":") + second
          temp += (hour >= 12) ? " P.M." : " A.M."
          document.clockForm.digits.value = temp
          id = setTimeout("Clock()",1000)
    } 
  
    //    <FORM NAME="clockForm">
    //    <INPUT TYPE="text" NAME="digits" SIZE=12 VALUE="">
    //    </FORM>




// ******************************************************************************************
// Page lock (no right click access)

function lock(e) 
  {
  if (navigator.appName == 'Netscape' &&
  (e.which == 3 || e.which == 2))
  {
    alert("Sorry this page contains Copyrighted material. \n Please Email a request.");
    return false;
  }
  
  else if (navigator.appName == 'Microsoft Internet Explorer' &&
  (event.button == 2 || event.button == 3)) 
  {
    alert("Sorry this page contains Copyrighted material. \n Please Email a request.");
    return false;
  }
  return true;
  }

/*
document.onmousedown=lock;
document.onmouseup=lock;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=lock;
window.onmouseup=lock;
*/



// ****************************************************

// ******************************************************************************************
// Popup Window (takes URL, TITLE, WINDOW WIDTH and HEIGHT as variable inputs)

function Popup(var_url, var_title, var_width, var_height) 
  {
  	var_string_options = "\"toolbar=no,status=no,menubar=no,location=no,directories=no,width=" + var_width + ",height=" + var_height + "\"" ;
  	
  	window.open(var_url, var_title, var_string_options);

  	
  	
  }
  
  
// ****************************************************
// Function to handle the dropdown selection boxes
// must change TARGET in this function

// onChange="javascript:Selector('myform','myselect')"
	
	function Selector(whichform,whichselector)
  	{
  	  
  	  var index= eval("document." + whichform + "." + whichselector + ".selectedIndex");
  	  var url = eval("document." + whichform + "." + whichselector + ".options[index].value");
  	  top.mainframe.location.href = url;
  	
}  


// ****************************************************
// Function to change status and default status
// must change welcome Message


	
function error(mystring)
{
alert(mystring);
} 		