";};return str;};this.enable=function(){Events.addClickListener(document.getElementById(id),onClick);};var onClick=function(e){if(active){triggerEvent();};};this.onTrigger=function(target){trigger=target;};var triggerEvent=function(){if(trigger!=null){trigger(status);};};this.setLabels=function(base,success,working,button){labelA=base;labelB=success;labelC=working;buttonLabel=button};this.setStatus=function(target){if(target==1){document.getElementById(id+"_status").className="working";document.getElementById(id+"_status").innerHTML=labelC;document.getElementById(id).className="disabled";active=false;}else if(target==2){document.getElementById(id+"_status").className="success";document.getElementById(id+"_status").innerHTML=labelB;document.getElementById(id).className="disabled";active=false;}else{document.getElementById(id+"_status").className="base";document.getElementById(id+"_status").innerHTML=labelA;document.getElementById(id).className="action";active=true;};status=target;};this.getStatus=function(){return status;};};function AjaxConnect(){var connection;this.AjaxConnect=function(){};var connect=function(){try{connection=new XMLHttpRequest();}catch(e){try{connection=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{connection=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){alert("You're browser does not support AJAX, please update to the latest version of Firefox, Chrome, Safari, Internet Explorer, or Opera to use jitZul.");return false;};};};};this.send=function(variables,cb){if(connection==null){connect();};addLoad();var query="return=xml";for(var key in variables){query+="&"+key+"="+Data.encode(String(variables[key]));};Debug.group("Connection");Debug.objectLog(variables);connection.open("POST","./?return=xml",true);connection.setRequestHeader("Content-type","application/x-www-form-urlencoded");connection.setRequestHeader("Content-length",query.length);connection.setRequestHeader("Connection","close");connection.send(query);connection.onreadystatechange=function(){if(connection.readyState==4){removeLoad();if(connection.responseXML!=null){Debug.xmlLog(connection.responseXML);Debug.groupEnd();var xml=parseXML(connection.responseXML);cb(xml);}else{Debug.log(connection.responceText);Debug.groupEnd();}};};};var parseXML=function(data){var root=data.getElementsByTagName("xml");var core=parseNode(root[0]);return core;};var parseNode=function(data){var object=new Array();var nodes=new Array();for(var i=0;i