function OpenWindow(url, w, h)
{
options='menubar=no,toolbar=no,status=yes,resizable=yes,scrollbars=yes,left=5,top=5,width=' + w + ',height=' + h;
window.open(url,'',options);
return false;
}

function CheckEmail(email)
{
	if(email=="") {
	return "\n Email";
	}
	else
	{
  	tmp=email;
   		if(tmp.indexOf("@")==-1 || tmp.indexOf(".") ==-1){
		return "\n Valid Email address";
		}
		else
		{
			return "";
		}
	}
}


function Contact_Form_Validator(frm) {
//this function is called from the onSubmit event of the Contact Us form to check that all the required fields have been filled in;
//if any required field has not been filled in, then the user will be shown a list of those fields and the form will NOT be submitted;
missinginfo = "";

if(frm.Name.value=="") {
missinginfo += "\n Name";
}

//if(frm.Telephone_Number.value=="") {
//missinginfo += "\n Telephone Number";
//}

missinginfo += CheckEmail(frm.email.value);

if (missinginfo != "") {
missinginfo ="Please fill in the following required fields:\n" +
"_____________________________\n" +
missinginfo + "\n_____________________________" +
"\n";
alert(missinginfo);
return false;
}
else{return true;}

}

function confirmformreset()
{
  return confirm("You have chosen to clear the form. Click 'OK' to continue clearing the form."
+ " Click 'Cancel' to cancel clearing the form.");
}