<!-- LOGIN FUNCTION  -->

function Login(){
var done=0;
var password=document.login.password.value;
if (password=="Bell") { window.location="BellePlaine.html"; done=1; }
if (password=="Example") { window.location="Example.html"; done=1; }
if (password=="Mike") { window.location="Michael.html"; done=1; }
if (password=="SCSOBFA") { window.location="Sheriff.html"; done=1; }
if (password=="Cathy")  { window.location="UnivCongChurch.html"; done=1; }
if (password=="Owls")  { window.location="Garden.htm"; done=1; }
if (password=="Clean2011")  { window.location="CleanInAWink.htm"; done=1; }
if (password=="SBEA")  { window.location="SBEA.html"; done=1; }
if (password=="Homestead")  { window.location="Homestead.htm"; done=1; }
if (done==0) { alert("Invalid login!"); }
}


<!---------- FORM ---------->



<!-- START FORM WITH FIRST NAME FIELD ONFOCUS -->

function focus(){
document.forms[0].FirstName.focus();
}



<!-- REQUIRED FORM FIELDS -->

function checkme() //check for required fields
{ 
if (document.forms[0].FirstName.value == "") 
{alert("Please provide your First Name."); 
document.forms[0].FirstName.focus();return(false) 
} 

if (document.forms[0].LastName.value == "") 
{alert("Please provide your Last Name"); 
document.forms[0].LastName.focus();return(false) 
} 
}



<!-- IF PHONE NUMBER VERIFY PHONE NUMBER GIVEN -->

function CheckPhone() {

if(document.Contact.chkPhone.checked == true && document.Contact.PhoneNumber.value==""){
   document.Contact.PhoneNumber.value=prompt("Please enter your Phone Number","");
        document.forms[0].chkHealth.focus();
	}
}



<!-- IF EMAIL ADDRESS VERIFY EMAIL ADDRESS GIVEN -->

function CheckEmail() {

if(document.Contact.chkEmail.checked == true && document.Contact.EmailAddress.value==""){
   document.Contact.EmailAddress.value=prompt("Please enter your Email Address","");
        document.forms[0].chkHealth.focus();
	}
}



<!-- WHEN HIT ENTER WILL NOT SUBMIT FORM -->

function onKeyPress() {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13) {
alert("Please Click on the Button");
return false
}
return true 
}
document.onkeypress = onKeyPress;


<!---------- END FORM ---------->



<!-- TOGGLE MENU  -->

function toggleView(Text) {
   if (Text.className=="hide") {
      Text.className="unhide";
   } else {
      Text.className="hide";
   } 
}

