<!-- Hide from old browsers
var FormType = "Query";
function LOGIN_Validate(ctl, index) {
function isNumber(theElement, eName)
{
  s = theElement.value;
  if (isNaN(Math.abs(theElement.value)) && (s.charAt(0) != '#'))
  {
      if ( isNumber.arguments.length  < 1 ) {
         alert(eName + ":" + "Waarde moet numeriek (een getal) zijn" );
      }
      else
      {
         for (var i=0; (i <= s.length && s.charAt(i) != '.'); )
         {
          if (((s.charAt(i) >= 0) && (s.charAt(i) <= 9)) ||
               (s.charAt(i) == ',' && i != 0 && i != s.length-1) || (s.charAt(i) == '.') )
                 i++;
          else
           {
             alert( eName + ":" + " Waarde moet numeriek (een getal) zijn" );
             theElement.focus();
             return false;
           }
         }
        if (s.charAt(i) == '.')
         {
	     for (i++;i <= s.length; )
           {
            if (((s.charAt(i) >= 0) && (s.charAt(i) <= 9)))
              i++;
            else
            {
             alert( eName + ":" + "Waarde moet numeriek (een getal) zijn" );
             theElement.focus();
             return false;
            }
           }
         }
       }
  }
  return true;
}
function stripMe (theElement) {
//lro 15-10-03 14:07 probleem met spciale karakters (uitroepteken etc)
//var x = theElement.value;
//theElement.value = (x.replace(/^\W+/,'')).replace(/\W+$/,'');
return true;
}
if (!stripMe(document.forms[0].P_USERNAME) ) {
 return false;
}
if (!stripMe(document.forms[0].P_PASSWORD) ) {
 return false;
}
if ( (document.forms[0].P_USERNAME.value == "") ) {
 alert("Dossiernr: Er moet een waarde worden ingevoerd");
 document.forms[0].P_USERNAME.focus();
 return false;
}
if (!isNumber(document.forms[0].P_USERNAME, 'Dossiernr')) {
 return false;
}
if ( (document.forms[0].P_PASSWORD.value == "") ) {
 alert("Paswoord: Er moet een waarde worden ingevoerd");
 document.forms[0].P_PASSWORD.focus();
 return false;
}
 return true;
}
function btnQFU_OnClick(ctl, index) {
   if (!LOGIN_Validate(ctl)) { return false; }
   ctl.form.Z_ACTION.value = ctl.value; ctl.form.submit();
   return true;
}
function isNumber(theElement, eName)
{
  s = theElement.value;
  if (isNaN(Math.abs(theElement.value)) && (s.charAt(0) != '#'))
  {
      if ( isNumber.arguments.length  < 1 ) {
         alert(eName + ":" + "[ERRNUM]" );
      }
      else
      {
         for (var i=0; (i <= s.length && s.charAt(i) != '.'); )
         {
          if (((s.charAt(i) >= 0) && (s.charAt(i) <= 9)) ||
               (s.charAt(i) == ',' && i != 0 && i != s.length-1) || (s.charAt(i) == '.') )
                 i++;
          else
           {
             alert( eName + ":" + " [ERRNUM]" );
             theElement.focus();
             return false;
           }
         }
        if (s.charAt(i) == '.')
         {
	     for (i++;i <= s.length; )
           {
            if (((s.charAt(i) >= 0) && (s.charAt(i) <= 9)))
              i++;
            else
            {
             alert( eName + ":" + "[ERRNUM]" );
             theElement.focus();
             return false;
            }
           }
         }
       }
  }
  return true;
}
function POS_OnLoad(ctl, index) {

   if ( FormType != "PostDelete")
   {
      form_num=0;
      do
      {
         elem_num=0;
         len = document.forms[form_num].elements.length;
         if (len > 0)
         {
            while (elem_num < len &&
                   document.forms[form_num].elements[elem_num].type != "text" &&
                   document.forms[form_num].elements[elem_num].type != "password" &&
                   document.forms[form_num].elements[elem_num].type != "textarea")
            {
               elem_num++;
            }
            if (elem_num < len)
            {
               document.forms[form_num].elements[elem_num].focus();
               break;
            }
         }
         form_num++;
      } while ( form_num < document.forms.length );
   }

   return true;
}
function pwdWindow() {
  // initialize winX and winY to default values
  // for cases where Screen object isn''t supported
  var url=null;
  var name="winTot";
  var h = 250;
  var w = 400;
  var popupWin=null;
  var winX = 400;
  var winY = 100;
  url = "/NL/www/op2$sec.Paswoord";
  popupWin = window.open(url, name, "scrollbars=yes,resizable=yes," + "width=" + w + ",height=" + h + ",left=" + winX + ",top=" + winY);
}
function loginForm (type) {
 var targetDomain = document.domain;
 if (targetDomain.indexOf("dev")==-1) {  // anders gaan parameters verloren bij rewrite URL
  targetDomain="www.taxistop.be";
 } else {
  targetDomain="wwwdev.taxistop.be";
 }
 document.write('<form action="http://'+ targetDomain + '/NL/www/op2$sec.process_logon" method="POST" name="Logonform" target="_blank">');
 document.write('<table id="loginTab" cellpadding="0" cellspacing="0" border="0">');
 document.write('<tr valign="top">');
 document.write(' <td align="left" width="100">&nbsp;</td>'); // adjust box right
 document.write(' <td align="left">');
 document.write(' <table border="0" cellpadding="0" cellspacing="0">');
 document.write('  <tr valign="middle">');
 if (type=="V") { document.write('   <td align="right"><img src="/img/oppas/1dossierV.gif" alt=""></td>'); }
 else { document.write('   <td align="right"><img src="/img/oppas/1dossier.gif" alt=""></td>'); }
 document.write('   <td align="left">');
 document.write('   <input type="text" name="P_USERNAME" size="10" maxlength="7">');
 document.write('   </td>');
 document.write('  </tr>');
 document.write('  <tr valign="middle">');
 document.write('   <td align="right"><img src="/img/oppas/1paswoord.gif" alt=""></td>');
 document.write('   <td NOWRAP align="left">');
 document.write('   <input type="password" name="P_PASSWORD" size="10" maxlength="30">');
 document.write('   <input type=hidden name="P_KIND" value="' + type + '">');
 document.write('   <input type=hidden name="Z_ACTION" class="button">');
 document.write('   <input type=submit class="button" value="" onClick="return btnQFU_OnClick(this),false">');
 document.write('   </td>');
 document.write('  </tr>');
 document.write(' </table>');
 document.write(' </td>');
 document.write('</tr>');
 document.write('<tr valign="top">');
 document.write(' <td align="left">&nbsp;</td>');
 if (type=="V") {
  document.write('<td align="left"><a href="http://'+ targetDomain + '/NL/www/op2$sec.register?p_kind=V" target="_blank"><img src="/img/oppas/sub/blueLinkV.gif" alt="" align="absmiddle" border="0" hspace="5">Inschrijven</a></b>');
 }
 else {
  document.write('<td align="left"><a href="http://'+ targetDomain + '/NL/www/op2$sec.register?p_kind=O" target="_blank"><img src="/img/oppas/sub/blueLink.gif" alt="" align="absmiddle" border="0" hspace="5">Inschrijven</a></b>');
 }
 document.write(' &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; <a href="javascript:pwdWindow()">Paswoord vergeten?</a></td>');
 document.write('</tr>');
 document.write('</table>');
 document.write('</form>');
}
//-->

