
function checkFields() {
var emptyString = /^\s*$/;
missinginfo = "";

if ( (document.frm_contact.name.value == "")  || (emptyString.test(document.frm_contact.name.value))  ) {
missinginfo += "\n     -  Name";
}

if ((document.frm_contact.email.value == "") || 
(document.frm_contact.email.value.indexOf('@') == -1) || 
(document.frm_contact.email.value.indexOf('.') == -1) ||
(emptyString.test(document.frm_contact.email.value)) ) {
missinginfo += "\n     -  Email Address";
}

if(  (document.frm_contact.phrase.value == "") || (emptyString.test(document.frm_contact.phrase.value))  ) {
missinginfo += "\n     -  Authentication Phrase";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}

function goTo() {
var sE = null, url;

sE = document.getElementById('locSelect');

 if(sE && (url = sE.options[sE.selectedIndex].value)) {
  if(url != "#")
  location.href = url;
 }
}
