
theValidator.required("form_connections","email","Please enter your email address.","EMAIL");
theValidator.required("form_connections","password","Please enter a password.");
theValidator.required("form_connections","password_confirm","Please enter a password confirmation.");
theValidator.required("form_connections","password&password_confirm","Your passwords do not match.","PASSWORD");

theValidator.required("form_connections","first_name","Please enter your first name.");
theValidator.required("form_connections","last_name","Please enter your last name.");
theValidator.required("form_connections","city","Please enter a city.");
theValidator.required("form_connections","state","Please select a state -- choose 'International' if not U.S..");
theValidator.required("form_connections","country_code","Please select a country.");

theValidator.required("form_connections","background","Please enter background information.");


function confirmDelete(sPage)
{
  if ( confirm('Are you sure you want to delete this Connection?\nAll information will be erased.') ) {
    window.location.href = sPage;
  }

}

function SelectCountry(countryField, theValidator)
{
  idx = countryField.selectedIndex;
  val = countryField.options[idx].value;

  if ( val != "US" ) {
    theValidator.unrequired("form_connections","state");
  }
  else {
    theValidator.required("form_connections","state","Please select a state -- choose 'International' if not U.S..");
  }
}
