//javascript for environ login starts here

function Login(form) {
username = new Array("environ","environ2");
password = new Array("bevhills","bevhills2");
page = "http://www.beverleyhills.co.nz/environ.php";
if (form.username.value == username[0] && form.password.value == password[0] || form.username.value == username[1] && form.password.value == password[1] || form.username.value == username[2] && form.password.value == password[2] || form.username.value == username[3] && form.password.value == password[3] || form.username.value == username[4] && form.password.value == password[4] || form.username.value == username[5] && form.password.value == password[5] || form.username.value == username[6] && form.password.value == password[6] || form.username.value == username[7] && form.password.value == password[7] || form.username.value == username[8] && form.password.value == password[8] || form.username.value == username[9] && form.password.value == password[9]) {
self.location.href = page;
}
else {
alert("Either the username or password you entered is incorrect.\nPlease try again.");
form.username.focus();
}
return true;
}

// End -->

//javascript for jump menu starts here

<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

//javascript for jump menu ends here

// javascript for logo fades starts here

function makevisible(cur,which){
  if (which==0)
    cur.filters.alpha.opacity=100
  else
    cur.filters.alpha.opacity=40}

// javascript for logo fades ends here

//javascript for contact form validation starts here

function checkform(contactform){

 if(document.contactform.firstname.value == "")
	{
	alert("Please enter your first name. Thank you.")
	document.contactform.firstname.focus()
	return false;
	}
	else if(document.contactform.lastname.value == "")
	{
	alert("Please enter your last name. Thank you.")
	document.contactform.lastname.focus()
	return false;
	}
	else if((document.contactform.email.value == "") || 
   (document.contactform.email.value.indexOf('@' ) == -1) ||
   (document.contactform.email.value.indexOf('.' ) == -1))
	{
	alert("Please enter a valid email address. Thank you.")
	return false;
	}
	return true;
	}

//javascript for contact form validation ends here

//javascript for rollover menu starts here

if(document.images)
{

whatshotOut=new Image;
whatshotOver=new Image;
whatshotOut.src="images/whatsHotOut.jpg";
whatshotOver.src="images/whatsHotOver.jpg";

locationOut=new Image;
locationOver=new Image;
locationOut.src="images/locationOut.jpg";
locationOver.src="images/locationOver.jpg";

treatmentsOut=new Image;
treatmentsOver=new Image;
treatmentsOut.src="images/treatmentsOut.jpg";
treatmentsOver.src="images/treatmentsOver.jpg";

productsOut=new Image;
productsOver=new Image;
productsOut.src="images/productsOut.jpg";
productsOver.src="images/productsOver.jpg";

associatesOut=new Image;
associatesOver=new Image;
associatesOut.src="images/associatesOut.jpg";
associatesOver.src="images/associatesOver.jpg";

contactOut=new Image;
contactOver=new Image;
contactOut.src="images/contactOut.jpg";
contactOver.src="images/contactOver.jpg";

}
else
{ 
	
//for non javascript browsers

whatshotOut="";
locationOut="";
treatmentsOut="";
productsOut="";
associatesOut="";
contactOut="";

whatshotOver="";
locationOver="";
treatmentsOver="";
productsOver="";
associatesOver="";
contactOver="";

document.one="";
document.two="";
document.three="";
document.four="";
document.five="";
document.six="";

}

