<!--
  //Copyright (c) 2oo4 by Matthias Bartelt

  //### Variablen / Konstanten
  var lActiveMenu         = 0;
  var lSelPos             = 0;
  var oCloseMenu          = null;
  //---
  var MENU_INTERVAL_CLOSE = 1000;
  
  
  //### Methoden

  function vMenuHide(){
    if (lActiveMenu == 0) return;
    if (document.all){
      document.all['layMenu' + lActiveMenu].style.visibility = 'hidden';
    }else if (document.getElementById){
      document.getElementById('layMenu' + lActiveMenu).style.visibility = 'hidden';
    }
  }
  
  function vMenuKillInterval(){
    window.clearTimeout(oCloseMenu);
  }
  
  function vMenuLeft(){
    oCloseMenu = window.setTimeout('vMenuHide()', MENU_INTERVAL_CLOSE);
  }
  
  function vMenuShow(lID){
    if (lActiveMenu != 0){
      vMenuHide();
      vMenuKillInterval();
    }
    if (document.all){
      document.all['layMenu' + lID].style.left = (((lID - 1) % 10) * 100) + 5 + ((lID >= 10) ? 20 : 0) + 200;
      document.all['layMenu' + lID].style.visibility = 'visible';
      lActiveMenu = lID;
    }else if (document.getElementById){
      document.getElementById('layMenu' + lID).style.left = (((lID - 1) % 10) * 100) + ((lID >= 10) ? 20 : 0) + 200;
      document.getElementById('layMenu' + lID).style.visibility = "visible";
      lActiveMenu = lID;
    }
  }
  
  function vSendMail(sName, sDomain, sAdd){
    self.location.href = 'mailto:' + sName + '@' + sDomain + sAdd;
  }
  
  function vSetFocus(oObject){
    oObject.focus();
  }
  
  function vShowHelp(sHelpFile, lWidth, lHeight){
    vWinOpen('../inc/hlp_' + sHelpFile + '.php', ((lWidth) ? lWidth : '300'), ((lHeight) ? lHeight : '300'), true);
  }

  function vWinOpen(sURL, lWidth, lHeight, bResize){
    var posLeft = (screen.width / 2) - (lWidth / 2);
    var posTop  = (screen.height / 2) - (lHeight / 2);
    var oWin = window.open(sURL, '', 'top='+posTop+',left='+posLeft+',width=' + lWidth + ',height=' + lHeight + ',resizable=no,scrollbars=' + ((bResize) ? 'yes' : 'no'));
  }

  //### Funktionen
  
  function fAllowedChars(sText, sChars, bCaseSensitiv){  
    var sChar    = '';
    for (var nCount = 0; nCount < sText.length; nCount++){
        sChar = (bCaseSensitiv) ? sText.substr(nCount, 1) : sText.substr(nCount, 1).toLowerCase();
      if (sChars.indexOf(sChar) == -1){
        return false;
      }
    }
    return true;
  }
  
  function fCheckLength(sString, lMinLength){
    var bResult = false;
    bResult     = (sString.length >= lMinLength);
    return bResult;
  }
 
  function fCheckMail(sMailAdress){
    var bResult = false;
    var oReg    = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)(\\@)([a-zA-Z0-9\\-\\.]+)(\\.)([a-zA-Z]{2,4})$');
    bResult     = (oReg.test(sMailAdress));
    return bResult;      
  }
 
  function fCheckPassword(sPassword){
    return (fAllowedChars(sPassword, 'abcdefghijklmnopqrstuvwxyz0123456789!"§$%&/()=?'));
  }
 
  function fCheckUsername(sUsername){
    return (fAllowedChars(sUsername, 'abcdefghijklmnopqrstuvwxyz0123456789_-. '));
  }

//-->
