//validate 'contact us' form
function validate() {
var themessage = "You must fill out the following fields:\n";
if (document.write_us.name.value==""){
themessage = themessage + "--name\n";
}
if (document.write_us.email.value=="") {
themessage = themessage + "--email address\n";
}
if (document.write_us.comments.value=="") {
themessage = themessage + "--comment(s) or question(s)\n";
}
if (document.write_us.spamFilter.value=="") {
themessage = themessage + "--you must answer the spam filter question\n";
}
//alert if fields are empty and cancel form submit
if (themessage == "You must fill out the following fields:\n") 
{
return true;
}
else {alert(themessage);
return false;
  }
}

//validate conference registrations
function validate_conference_registration() {
var themessage = "You must fill out the following fields:\n";
if (document.conference_registration.name.value==""){
themessage = themessage + "--name\n";
}
if (document.conference_registration.title.value==""){
themessage = themessage + "--title\n";
}
if (document.conference_registration.institution.value==""){
themessage = themessage + "--institution\n";
}
if (document.conference_registration.magazine.value==""){
themessage = themessage + "--magazine\n";
}
if (document.conference_registration.business_address.value==""){
themessage = themessage + "--business address\n";
}
if (document.conference_registration.work_phone.value==""){
themessage = themessage + "--work phone\n";
}
if (document.conference_registration.email.value==""){
themessage = themessage + "--email address\n";
}
if (document.conference_registration.payment_options.value==""){
themessage = themessage + "--payment_options\n";
}
if (document.conference_registration.spamFilter.value=="") {
themessage = themessage + "--you must answer the spam filter question\n";
}
//alert if fields are empty and cancel form submit
if (themessage == "You must fill out the following fields:\n") 
{
return true;
}
else {alert(themessage);
return false;
  }
}

