function time()
{

now = new Date();
hour = now.getHours();
min = now.getMinutes();
sec =now.getSeconds();

nm = "0" + min;
ns = "0" + sec;

//now lets add am or pm in here
if(hour >12)
{
condition = "PM";
}

if(hour <12)
{
condition = "AM";
}


//do the hour conversions here
switch(hour)
{
case 1:
hour = "1";
break;

case 2:
hour ="2";
break;

case 3:
hour ="3";
break;

case 4:
hour = "4";
break;

case 5:
hour = "5";
break;

case 6:
hour = "6";
break;

case 7:
hour = "7";
break;

case 8:
hour = "8";
break;

case 9:
hour = "9";
break;

case 10:
hour ="10";
break;

case 11:
hour ="11";
break;

case 12:
hour ="12";
condition ="PM";
break;

case 13:
hour ="1";
break

case 14:
hour ="2";
break;

case 15:
hour ="3";
break;

case 16:
hour ="4";
break;

case 17:
hour ="5";
break;

case 18:
hour ="6";
break;

case 19:
hour ="7";
break;

case 20:
hour ="8";
break;

case 21:
hour ="9";
break;

case 22:
hour ="10";
break;

case 23:
hour ="11";
break;

case 24:
hour ="12";
condition = "AM";
break;
}



//value is displayed here now lets do some conversions and get that 0 in there

//if min >10 && sec <10
if(min >= 10 && sec <10)
{
window.document.controlPanel.time.value = hour +":" + min + ":" + ns + " " + condition;
}

//if min <10 && sec >10
if(min <10 && sec >=10)
{
window.document.controlPanel.time.value = hour +":" + nm + ":" + sec + " " + condition;
}

//if both are < 10
if(min <10 && sec <=9)
{
window.document.controlPanel.time.value = hour + ":" + nm + ":" + ns + " " + condition;
}

//if both are >10
if(min>=10 && sec >=10)
{
window.document.controlPanel.time.value = hour + ":" + min + ":" + sec + " " + condition;
}


window.setTimeout("time()",1000);
}	//ends time



//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
function date()
{
d =new Date();

month = d.getMonth();
day = d.getDate();
year =d.getFullYear();

//now we have to switch the month because it holds a gay array of 11 0-11 elements
switch(month)
{
case 0:
month = "1";
break;

case 1:
month ="2";
break;

case 2:
month ="3";
break;

case 3:
month ="4";
break;

case 4:
month = "5";
break;

case 5:
month ="6";
break;

case 6:
month ="7";
break;

case 7:
month ="8";
break;

case 8:
month = "9";
break;

case 9:
month = "10";
break;

case 10:
month = "11";
break;

case 11:
month ="12";
break;
}	//ends switch

//this won't be that hard now will it?
window.document.controlPanel.date.value = month + "/" + day + "/" + year;

setTimeout("date()",1000);	//every 10 sec refresh
}	//ends date



//##########################################################################################################################

//Locate the user and tell where the user is currently at
function locate()
{
window.document.controlPanel.locate.value = document.title;

setTimeout("locate()",500);

}

//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$




//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//perform the on mouse feature functions
function describeHigh()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value = "Click here to goto the High School Links";
}


function describeMiddle()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value ="Click here to goto the Middle School Links";
}


function describeElementary()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to goto the Elementary School Links";
}


function describeBoard()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value ="Click here to goto the Board of Education";
}


function describeMisc()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to interact";
}


function validate()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="All of RockHill.org is valid HTML except football section. W3C does not recognize FrontPage work :P";
}

