function logon(){
  var userName = document.getElementById( "idUserName" );
  var password = document.getElementById( "idPassword" );
  var getVars = '?user=' + userName.value + '&password=' + password.value;
  var req = getHttpRequest();
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', 'IsValidLogon.php' + getVars, false);
    req.send(null);
    if( req.responseText.toString().substr(0,1)  == '1' ){
      window.location.href = 'Logon.php' + getVars;
      return;
    }
  }
  clientSideInclude('loginFailTable','Logon_Failed.php' + getVars);
}