/*!
 * FSI Server Interface
 * http://www.fsi-viewer.com
 *
 * Copyright (C) 2000-2009 NeptuneLabs GmbH - All rights reserved.
 *
 * Version: 1.0.1
 */
;var xmlHttp=null;var debug=false;if(typeof XMLHttpRequest!="undefined"){xmlHttp=new XMLHttpRequest()}if(!xmlHttp){try{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(e){xmlHttp=null}}}function xmlGET(site,getparam,callBack){xmlSend("GET",site,getparam,callBack)}function xmlPOST(site,getparam,callBack){xmlSend("POST",site,getparam,callBack)}function xmlSend(sendmethod,site,getparam,callBack){if(xmlHttp){geturl=site;sendmethod=sendmethod.toUpperCase();if(sendmethod=="GET"&&getparam&&getparam!=""){geturl+="?"+getparam}try{xmlHttp.open(sendmethod,geturl,true);xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4&&callBack){if(xmlHttp.status=="404"){eval(callBack).call(this,"Failed to retrieve Help information.",2)}else{eval(callBack).call(this,xmlHttp.responseText,2)}}}}catch(e){eval(callBack).call(this,"An error occured while retrieving Help information.",2)}try{xmlHttp.setRequestHeader("X-Application-Agent","NeptuneLabs Ajax Engine")}catch(e){}if(sendmethod=="GET"){xmlHttp.send(null)}else{if(sendmethod=="POST"){xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.setRequestHeader("Content-Length",getparam.length);xmlHttp.setRequestHeader("Connection","close");xmlHttp.send(getparam)}}if(debug){appendDebugText("Send:\n"+getparam.replace(/&/g,"\n")+"\n\n")}}}function xmlResponseToAssoc(xmlobj){newparams=new Object();if(xmlobj){roots=xmlobj.getElementsByTagName("root");if(roots&&roots.length>0){paramobjs=roots[0].getElementsByTagName("param");if(paramobjs&&paramobjs.length>0){for(p=0;p<paramobjs.length;p++){pid=paramobjs[p].getAttribute("id");pval=paramobjs[p].getAttribute("value");newparams[pid]=pval}}}}return newparams}function processResponseCallBack(xmlobj){params=xmlResponseToAssoc(xmlobj);if(params){if(params.state=="LoginPass"){document.location=params.forward}else{if(params.state=="LoginFail"){displayTopMessage("Invalid credentials!");obj=document.getElementById("password");if(obj){obj.value=""}clearTimeout(timer_showwait);window.setTimeout("reenableLogon();",2000)}else{if(params.state=="RecoverUnknownUser"){displayTopMessage("Unknown username!");obj=document.getElementById("recovername");if(obj){obj.value=""}reenableRecover()}else{if(params.state=="RecoverNoEmail"){displayTopMessage("No Email assigned to this username.");callAdmin()}else{if(params.state=="RecoverEmailFail"){displayTopMessage("Error sending eMail");callAdmin()}else{if(params.state=="RecoverPass"){displayTopMessage("Recover eMail sent.");displayEmailSent()}else{if(params.state=="AccountDeactivated"){displayTopMessage("Account deactived");callAdmin()}else{if(params.state=="Maintenance"){displayTopMessage("Account deactived");showMaintenance()}else{displayTopMessage("Error - Internal");callAdmin();reenableLogon()}}}}}}}}}}function alertCallback(xmlobj){params=xmlResponseToAssoc(xmlobj);alert(dumpParams(params))}function debugCallback(xmlobj){params=xmlResponseToAssoc(xmlobj);appendDebugText("Retrieve:\n"+dumpParams(params))}function dumpParams(params){dump="";if(params){for(var pid in params){dump+=pid+"="+params[pid]+"\n"}}dump+="-------------------------------------";return dump}function appendDebugText(addtext){obj=document.getElementById("debugwindow");if(!obj){bodyobj=document.getElementsByTagName("BODY");if(bodyobj){obj=document.createElement("textarea");dobjclass=document.createAttribute("class");dobjclass.nodeValue="debug";obj.setAttributeNode(dobjclass);dobjclass=document.createAttribute("id");dobjclass.nodeValue="debugwindow";obj.setAttributeNode(dobjclass);textnode=document.createTextNode("DEBUG\n-----\n");obj.appendChild(textnode);bodyobj[0].appendChild(obj)}}obj.value+=addtext.replace(/\n/,"\r\n")};