on (press) {
//checks if the fields are empty if so shows the error message
if (Name=="" or Email=="" or Message=="") {
info="Error Sending Message"

//checks if the name is more than 2 letters most names are more than 2 letters long
//if not shows the error message;
}
else if (Name.length < 2) {
info="Error Sending Message";
}
//checks if the Email is more than 3 letters most email addresses are more than 3 letters long
//if not shows the error message;
else if (Email.length < 3) {
info="Error Sending Message";
}
//checks that an @ has been entered into the Email Field
//if not shows the error message
else if (Email.indexOf("@") == -1) { 
}
//checks that an . has been entered into the Email Field
//if not shows the error message
else if (Email.indexOf(".") == -1) { 
}
//checks that the message is at least 10 letters long
//if not shows the error message
else if (Message.length < 10) {
info="Error Sending Message";
}
//if everything has passed the checks it loads the variables 
//and sends the message
else{
info="Message Was Sent";
loadVariables("send.php",'POST');
}
}
