/*
    Web mail messaging script
    This script intercepts information from the web mail script and
    displays the appropriate message.
    Written by Mark Holdgate
*/


var qs = document.location.search;

if (qs == "?error_post") {
  alert ("There was an error sending the mail, no form data was detected.\n\nIf you entered data into a form, this could be a problem with the web page.");
}

if (qs == "?no_mail") {
  alert ("There was an error sending the mail, no e-mail address has been defined.\n\nIf there is no outgoing e-mail field on the form, this is a problem with the web page.");
}

if (qs == "?invalid_mail") {
  alert ("There was an error sending the mail, the defined e-mail address is invalid.\n\nIf there is no outgoing e-mail field on the form, this is a problem with the web page.");
}

if (qs == "?sent") {
  alert ("Your message was sent successfully.");
}

