<!--
  function CheckForm()
  {
    var form  = document.login;
    var error = "";

    if(form.username.value == "")
    {
      if(error == "") form.username.focus();
      error += "  * Bitte geben Sie Ihren Benutzernamen an.\n";
      form.username.className = "input2";
    }
    else form.username.className = "input";

    if(form.password.value == "")
    {
      if(error == "") form.password.focus();
      error += "  * Bitte geben Sie Ihr Passwort an.\n";
      form.password.className = "input2";
    }
    else form.password.className = "input";

    
    if(error == "") return true;
    else
    {
      alert("Folgende Fehler sind aufgetreten:\n" + error);
      return false;
    }
  }


   try
   {
     XmlHttpGlobal = new XMLHttpRequest();
   }
   catch(error)
   {
     try
     {
       XmlHttpGlobal = new ActiveXObject("Microsoft.XMLHTTP");
     }
     catch(error){/*alert('Es ist ein Fehler aufgetreten!\nBitte überprüfen Sie Ihre Sicherheitseinstellungen. Die Einstellungen "Active Scripting" und "ActiveX-Steuerelemente initialisieren und ausführen, die nicht sicher sind" müssen beide für Ajax aktiviert werden.');*/}
   }
   
 function RepeatLoad()
 {
   XmlHttpGlobal.open("GET", "index.php?COMPACT=1&ID=381&_page=UserStatus");
   XmlHttpGlobal.send(null);
   XmlHttpGlobal.onreadystatechange = handlehttpstateGlobal;

 }

 var LastFriends = -1;
 function handlehttpstateGlobal()
 {

   if(XmlHttpGlobal.readyState == 4&&
      XmlHttpGlobal.status == 200)
   {
     if(!XmlHttpGlobal.responseText) return;
     document.getElementById('BodyContent').innerHTML = XmlHttpGlobal.responseText;

     var NewMessage = false;
     if(XmlHttpGlobal.responseText.split("<NEW_MESSAGE").length == 2)
     {
        document.getElementById("HeadNewMessage").style.backgroundImage = "url(data/mandant1/HeadNavi/xmeine_nachrichten.gif)";
     }

MainPlaySound = false;
     if(!MainPlaySound) window.setTimeout("RepeatLoad();",10000);
     else
     {
       var tmp = XmlHttpGlobal.responseText.split("<FRIENDS|");
       var tmp = tmp[1].split(">");

       if(LastFriends != -1 &
          LastFriends != tmp[0])        window.setTimeout(" document.getElementById('SoundNewFriend').play();", ((NewMessage) ? 1500 : 0));

       LastFriends = tmp[0];

            if(tmp[0] == 0) tmp = 8000;
       else if(tmp[0]  < 5) tmp = 5000;
       else tmp = 4000;

       window.setTimeout("RepeatLoad();", tmp);
     }
   }
   else if(XmlHttpGlobal.readyState == 4)
   {
     window.setTimeout("RepeatLoad();", 5000);
   }
 }


MainPlaySound = false;
 if(MainPlaySound){
   document.write("<embed id='SoundNewMessage' type='audio/x-wav' autostart='false' src='data/mandant1/newmessage.wav' width='0' height='0'></embed>");
   document.write("<embed id='SoundNewFriend'  type='audio/x-wav' autostart='false' src='data/mandant1/NewFriends.wav' width='0' height='0'></embed>");
 }
//-->
