function showTr(object, trName) {
  var where  = document.getElementById(trName);
  if (object.value != 'AIT')
    where.style.display = 'table-row';
  else where.style.display = 'none'; 
}



function formValidator(theForm)
{

  if (theForm.nameFamily.value == "")
  {
    alert("Please enter your Family Name.");
    theForm.nameFamily.focus();
    return (false);
  }

  if (theForm.nameFamily.value.length < 2)
  {
    alert("Please enter your full Family Name.");
    theForm.nameFamily.focus();
    return (false);
  }

  if (theForm.nameFirst.value == "")
  {
    alert("Please enter a your First Name.");
    theForm.nameFirst.focus();
    return (false);
  }

  if (theForm.nameFirst.value.length < 2)
  {
    alert("Please enter your full First Name.");
    theForm.nameFirst.focus();
    return (false);
  }

  if (theForm.address.value == "")
  {
    alert("Please tell us your address.");
    theForm.address.focus();
    return (false);
  }

  if (theForm.postal.value == "" )
  {
    alert("Please tell us your Japanese Postal Code.");
    theForm.postal.focus();
    return (false);
  }

  if (theForm.postal.value.length < 7 )
  {
    alert("Your postal code doesn't appear to be correct.");
    theForm.postal.focus();
    return (false);
  }

  if (theForm.postal.value.length > 8 )
  {
    alert("Your postal code doesn't appear to be correct.");
    theForm.postal.focus();
    return (false);
  }

  if (theForm.phone.value.length < 6)
  {
    alert("Please tell us your phone number.");
    theForm.phone.focus();
    return (false);
  }   

  if (theForm.email.value.length < 6)
  {
    alert("Please tell us your email address.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.language.selectedIndex == 0)
  {
    alert("Please tell us what language you want to study.");
    theForm.language.focus();
    return (false);
  }

  if ( ( theForm.language.selectedIndex > 0 ) &&
       ( theForm.speakinglevel.selectedIndex == "0") )
  {
    alert("Please tell us how well you currently speak "+theForm.language.value);
    theForm.speakinglevel.focus();
    return (false);
  }

  if (theForm.location.selectedIndex == "0")
  {
    alert("Please tell us where you want to study.");
    theForm.location.focus();
    return (false);
  }

//alert("verification finished"); return (false);
return (true);
}
