//Static functions that stay the same throughout without depending on a "condition" of the page


function describeNavigate()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to navigate";
}


function describeEmail()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to check your rockhill.org email";
}


function describeSignin()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to sign in your RH account";
}



function describeHelp()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to troubleshoot any problems";
}


function describeAbout()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to see the credits";
}


function describeInteract()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to interact";
}


function describeTech()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value = "Click here to obtain info about the Technology of Rock Hill";
}


function describeText()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Type your email address here";
}


function describeSubmit()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to submit your email address";
}


function describeReset()
{
window.document.controlPanel.summary.value="";
window.document.controlPanel.summary.value="Click here to reset the text field";
}


//Email validation, make sure there is an "@" symbol in the text
function validate()
{

//store the contents in a variable named emailField
emailField = window.document.interact.email.value.indexOf("@");
checkPeriod =window.document.interact.email.value.indexOf(".");


//test for @ sign and a period
if(emailField !=-1 && checkPeriod !=-1)
{
return true;
}


//Check the "side effects" and tell the user what is wrong here
else {
alert("Enter a valid email address");
return false;
}
}	//ends validate();





function navigate()
{
box = window.document.forms[0].n;
destination = box.options[box.selectedIndex].value;


if(box.options[2].selected==true)
{
location.href="http://rockhill.org";

}


if(box.options[3].selected==true)
{
location.href="http://rockhill.org/hs/";
}


if(box.options[4].selected==true)
{
location.href="http://rockhill.org/ms/";
}


if(box.options[5].selected==true)
{
location.href="http://rockhill.org/es/";
}


if(box.options[6].selected==true)
{
location.href="http://rockhill.org/Board/";
}


if(box.options[7].selected==true)
{
location.href="http://rockhill.org/Misc/";
}


if(box.options[8].selected==true)
{
url = window.prompt("URL?","http://yahoo.com");

if(!url)
{
location.reload();
}

else
{
location.href=url;
}
}

}	//ends navigate

