///////////////////////////////////////////////////////////////////////////
//  This JavaScript validates a few fields in the aapt_sps_form.html
//
//               thomas l. gibson   April 24, 2003
///////////////////////////////////////////////////////////////////////////
function fieldIsfilled(test)
{
  if (test.value.length == 0) 
  {
    return false;
  }
return true;
}
function bigtextIsfilled(test)
{
  if (test.value.length < 20)
  {
    return false;
  }
return true;
}
function checkAbs(theForm)
{
  var test;
  test = document.forms[0].name_first;
  if ( fieldIsfilled(test) == false )
  {
    alert("Please fill in your first name.");
    return;
  }
  test = document.forms[0].name_last;
  if ( fieldIsfilled(test) == false )
  {
    alert("Please fill in your last name.");    
    return;
  }
  test = document.forms[0].aapt_sps_phone;
  if ( fieldIsfilled(test) == false )
  {
    alert("Please fill in your phone number.");
    return;
  }
  test = document.forms[0].aapt_sps_email;
  if ( fieldIsfilled(test) == false )
  {
    alert("Please fill in your e-mail address.");
    return;
  }
  test = document.forms[0].aapt_sps_title;
  if ( fieldIsfilled(test) == false )
  {
    alert("Please fill in the title for your presentation.");
    return;
  }
  test = document.forms[0].author_names;
  if ( fieldIsfilled(test) == false )
  {
    alert("Please fill in the names of the authors for your presentation.");
    return;
  }
  test = document.forms[0].session_description;
  if ( bigtextIsfilled(test) == false )
  {
    alert("Please include an abstract or brief description of your presentation.");
    return;
  }
  document.forms[0].submit(theForm);
}
