function ValidLoginForm() 
{
 var okSoFar=true
 with (document.phpformmailer)
 {
  if (username.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your username.")
    username.focus()
  }
  
  if (password.value=="" && okSoFar)
  {
    okSoFar=false
    alert("Please enter your password.")
    password.focus()
  }

  if (okSoFar==true)  submit();
 }
}