/* Function doChallengeResponse()
 *
 * needed for phplib-extension
 *
 * PHPlib (c) by: Boris Erdmann, be@shonline.de, Kristian Köhntopp, kk@shonline.de and Sascha Schumann, sascha@schumann.cx
 *
 * Implementation done 1998-2008 by Bernhard Ostheimer, bernhard.ostheimer(at)web-site-engineering.de
 *
 * Usage not permitted!
 */

function doChallengeResponse() {
  str = document.fsic.username.value + ":" +
        document.fsic.password.value + ":" +
        document.fsic.challenge.value;
  document.fsic.response.value = MD5(str);
  document.fsic.password.value = "";
  document.fsic.submit();
}
function doChallengeResponseMD5() {
  str = document.fsic.username.value + ":" +
        MD5(document.fsic.password.value) + ":" +
        document.fsic.challenge.value;
  document.fsic.response.value = MD5(str);
  document.fsic.password.value = "";
  document.fsic.submit();
}
  
/* Function toggle_logged
 *
 * required for stay logged in
 *
 * Implementation done 1998-2008 by Bernhard Ostheimer, bernhard.ostheimer(at)web-site-engineering.de
 *
 * Usage not permitted!
 */
function toggle_logged(cookieprefix,cookiepath) {
  if(document.getElementById('logged').checked==true) {
    document.getElementById('logged').checked=true;
    document.cookie = cookieprefix + 'stay_inside=1; PATH=' + cookiepath;
  }
  else {
    document.getElementById('logged').checked=false;
    document.cookie = cookieprefix + 'stay_inside=0; PATH=' + cookiepath;
  }
}
