﻿function LG_ValidateForm()
{
  __FormErrorCount=0;
  
  // Validate the e-mail addresses.  
  __ValidateNotEmpty(LG_ID+"EmailAddressTextBox");
  
  // Validate the password.
  __ValidateNotEmpty(LG_ID+"PasswordTextBox");
  
  // Error prompt.
  document.getElementById(LG_ID+"LoginResultRow").style.display=(__FormErrorCount==0?"none":"block");
  document.getElementById(LG_ID+"LoginResult").innerHTML="Please correct the errors highlighted above.";
  
  if(__FormErrorCount==0)
  {
    document.getElementById(LG_ID+"MessageDiv").style.display="block";
    document.getElementById("LoginFields").style.display="none";
  }
  
  return(__FormErrorCount==0);
}
