var yS=0;var X2={b:function(){if(yl){var V;var D=null;try{V=new ActiveXObject("Microsoft.XMLHTTP");}catch(D){qQ("FAILED - soap::new ActiveXObject Failed"+D.message,R7.V);throw D;}return V;}else{if(D7){return new XMLHttpRequest();}else{return null;}}},V:{D:1,V:2,r:3,b:4},D:"http://scalix.com/soap/actor/client/response_processor"};X2.q=function(b,V){this.V=b;this.H=V;this.r=QM.K.createElement("m:"+b);this.r.setAttribute("xmlns:m",V);};X2.q.l="http://scalix.com/methods";X2.q.prototype.h=function(b){this.r.appendChild(b);};X2.q.prototype.D=function(b,V){var r=QM.K.createElement(b);if(V!=null){QM.N(r,V);}this.h(r);return r;};X2.q.prototype.b=function(){return this.H+"#"+this.V;};X2.q.prototype.S=function(){return this.r;};X2.H=function(){this.b=null;this.H=null;};X2.H.prototype.S=function(b,V){this.b=b;this.H=V;};X2.H.prototype.r=function(b){var V=b.firstChild;var D=QM.D(V,"message");if(D){this.b=QM.o(D);}var H=QM.D(V,"debug");if(H){this.H=QM.o(H);}};X2.H.prototype.D=function(){return this.b;};X2.H.prototype.V=function(){return this.H;};X2.h=function(b,V){var D=QM.D(V,"SOAP-ENV:Header");if(D){var r=QM.D(D,b);if(r){var H=r.nodeName.indexOf(":");this.b=(H==-1)?r.nodeName:r.nodeName.substr(H+1);var S=QM.D(r,"message");if(S){this.V=QM.o(S);}var l=QM.D(r,"debug");if(l){this.H=QM.o(l);}}}};X2.h.prototype.r=function(){return this.V;};X2.h.prototype.D=function(){return this.H;};X2.r=function(){this.q=null;this.V=null;this.H=null;this.b=null;this.D=null;};X2.r.prototype.o=function(b,V,D,r){this.q=b;this.V=V;this.H=D;this.b=r;};X2.r.prototype.S=function(b,V){var D=QM.D(b,"faultcode");if(D){this.q=QM.o(D);}var r=QM.D(b,"faultstring");if(r){this.V=QM.o(r);}var H=QM.D(b,"faultactor");if(H){this.H=QM.o(H);}var h=QM.D(b,"detail");if(h){this.b=new X2.H();this.b.r(h);}if(!this.H&&!this.b){}if(!this.b){this.D=new X2.h(this.H,V);}};X2.r.prototype.r=function(){return this.q;};X2.r.prototype.d=function(){return this.V;};X2.r.prototype.l=function(){return this.H;};X2.r.prototype.e=function(){return this.b;};X2.r.prototype.h=function(){return this.D;};X2.o=function(b,V,D,r,H,S,h){this.p=b;this.L=V;this.o=D;this.V=r;this.K=H;this.t=S;this.f=h;this.P=QM.C();this.e=this.P.createElement("SOAP-ENV:Envelope");this.e.setAttribute("xmlns:SOAP-ENV","http://schemas.xmlsoap.org/soap/envelope/");this.e.setAttribute("SOAP-ENV:encodingStyle","http://schemas.xmlsoap.org/soap/encoding/");this.e.setAttribute("xmlns:xsi","http://www.w3.org/1999/XMLSchema-instance");this.e.setAttribute("xmlns:xsd","http://www.w3.org/1999/XMLSchema");this.P.appendChild(this.e);this.H=null;this.b=this.P.createElement("SOAP-ENV:Body");this.e.appendChild(this.b);this.C=null;this.x=new Array();this.D=null;this.S=false;if(!this.f){qQ("soap::HttpRequest"+b,R7.V);}this.A=null;this.a=null;this.w=false;this.I=0;this.r=0;};X2.o.prototype.N=function(b){this.I=b;};X2.o.prototype.timeout=function(){if(this.a!=null){clearTimeout(this.a);this.a=null;}if(this.C&&this.C.readyState&&this.C.readyState!=X2.V.b){if(null!=this.I&&this.I>0){this.C.onreadystatechange=function(){};this.C.abort();this.w=false;if(!this.f){qQ("soap.HttpRequest: Request timed out for method "+this.A+" (try "+this.r+"), retrying.",R7.WARN);}this.I--;this.d();return ;}this.w=true;this.W();var b=null;try{this.C.abort();this.w=false;if(!this.f){qQ("SOAP request aborted method: "+this.A+" objID="+this.Y+" async="+this.L,R7.r);}}catch(b){if(!this.f){qQ("soap.HttpRequest::abort -> "+(yl?b.message:b),R7.r);}return ;}return ;}return ;};X2.o.prototype.q=function(){return (true==this.f);};X2.o.prototype.B=function(b){this.D=b;};X2.o.prototype.Z=function(b){this.b.appendChild(b.S());this.x[b.b()]=true;if(this.A==null){this.A=b.V;}};X2.o.prototype.l=function(b){if(!this.H){this.H=this.P.createElement("SOAP-ENV:Header");this.e.insertBefore(this.H,this.b);}this.H.appendChild(b.cloneNode(true));};X2.o.prototype.d=function(){var b=[];for(var V in this.x){IZ.b(b,V);}var D=b.join(", ");this.r++;yS++;this.Y=yS;this.C=X2.b();if(!this.f){qQ("SOAP object id="+this.Y+" CREATED",R7.V);}this.C.onreadystatechange=ps(this,this.W);var r=null;try{this.C.open("POST",this.p,this.L);this.C.setRequestHeader("SOAPAction",b.join(", "));if(this.D!=null){this.C.setRequestHeader("Accept-Language",this.D);}this.C.setRequestHeader("Content-Type","text/xml");this.C.send(this.P);if(this.t!=null){if(this.a!=null){clearTimeout(this.a);this.a=null;}this.a=Ce(this.t,this,"timeout");}}catch(r){if(!this.f){qQ("soap.HttpRequest::send -> "+(yl?r.message:r),R7.V);}this.C.onreadystatechange=function(){};return ;}if(D7&&this.C.readyState==X2.V.b&&this.L==false){this.W();}};X2.o.prototype.h=function(){if(this.C==null){return ;}this.C.onreadystatechange=function(){};var b=null;try{this.C.abort();}catch(b){if(!this.f){qQ("soap.HttpRequest::abort -> "+(yl?b.message:b),R7.V);}return ;}};X2.o.prototype.W=function(){switch(this.C.readyState){case X2.V.D:case X2.V.V:case X2.V.r:if(!this.f){qQ("soap.HttpRequest.readyState -> "+this.C.readyState+" method: "+this.A+" objID="+this.Y+" async="+this.L,R7.V);}if(this.a!=null){clearTimeout(this.a);this.a=null;}if(this.t!=null&&!this.w){this.a=Ce(this.t,this,"timeout");}if(this.w){break;}return ;case X2.V.b:if(!this.f){qQ("soap.HttpRequest.readyState -> "+this.C.readyState+" method: "+this.A+" objID="+this.Y+" async="+this.L,R7.V);}if(this.a!=null){clearTimeout(this.a);this.a=null;}break;default:if(!this.f){qQ("soap.HttpRequest.readyState -> "+this.C.readyState+" method: "+this.A+" BAD!"+" objID="+this.Y+" async="+this.L,R7.V);}if(this.a!=null){clearTimeout(this.a);this.a=null;}break;}if(this.S){return ;}this.S=true;this.C.onreadystatechange=function(){};var b=new X2.l(this);if(b.b()){var V=b.r();var D=V[0];var r=D;if(V[1]!=null){r+="\n\n";r+="Debug Info: "+V[1];}if(!this.f){qQ(r,R7.V);}if(!this.o.exists("no.report.faults")){alert(D);}if(this.K){if(!this.f){qQ("Fault in SOAP:\n"+b.r(),R7.r);}this.K(b,this.o);this.K=null;}}else{if(this.V){this.V(b,this.o);this.V=null;}}};X2.l=function(b){var V=b.C;if(D7){if(b.L){var D;try{var r=V.status;}catch(D){var H=new X2.H();var S=strings.connection_timeout+" #SOAP27";H.S(S,null);this.V=new X2.r();this.V.o("Server.ConnectionDropped",S,X2.D,H);return ;}}else{if(V.status==0){var H=new X2.H();var S=strings.connection_timeout+" #SOAP28";H.S(S,null);this.V=new X2.r();this.V.o("Server.ConnectionDropped",S,X2.D,H);return ;}}}else{if(yl){try{if(V.status>505){var H=new X2.H();var S=strings.connection_timeout+" #SOAP29";H.S(S,null);this.V=new X2.r();this.V.o("Server.ConnectionDropped",S,X2.D,H);if(!b.q()){qQ("Server.ConnectionDropped"+"\n\n xmlhttp.status="+V.status+"\nrequest xml:"+QM.B(b.P),R7.D);}return ;}}catch(e){qQ(e,R7.r);return ;}}}if(!b.q()){qQ("http request HTTP status="+V.status,R7.V);}var h=V.responseText;if(h==null){if(!b.q()){qQ("soap.HttpResponse -> xmlhttp.responseText is null",R7.V);}return ;}var o=QM.C();QM.H(o,h);var q=QM.W(o).errorCode;if(yl&&q==-1072896657){h=h.replace(" encoding=\"UTF-8\"","");QM.H(o,h);q=QM.W(o).errorCode;}if(q!=0){var e=QM.W(o);var d="";d+=e.reason;if(yl){d+="\nline: "+e.line;d+="\nlinepos: "+e.linepos;d+="\n"+e.srcText;}var S="The server failed to send back a valid XML response.";var H=new X2.H();H.S(S,d);this.V=new X2.r();this.V.o("Server.MalformedXML",S,X2.D,H);return ;}var f=o.documentElement;if(V.status==200){this.H=QM.D(f,"Body","SOAP-ENV");var N;if(this.H!=null){N=QM.D(this.H,"Fault","SOAP-ENV");if(N==null){return ;}}else{N=QM.D(f,"Fault","SOAP-ENV");}if(N!=null){this.V=new X2.r();this.V.S(N,f);return ;}else{var H=new X2.H();var S="There was no SOAP-ENV:Body in the xml payload sent by the server.";var d=V.responseText;H.S(S,d);this.V=new X2.r();this.V.o("Server.NoSoapBody",S,X2.D,H);return ;}}else{if(V.status==500){var H=new X2.H();var S="Internal Server Error: 500";H.S(S,"");this.V=new X2.r();this.V.o("Server.InternalError",S,X2.D,H);return ;}else{var S="Unknown Error";var d="";var D;try{d+="http status: "+V.status;d+="\nstatus text: "+V.statusText;d+="\nresponse text: "+V.responseText;}catch(D){d="Cannot extract info from the xmlhttp handle";}var H=new X2.H();H.S(S,d);this.V=new X2.r();this.V.o("Server.UnknownProblem",S,X2.D,H);return ;}}};X2.l.prototype.D=function(){if(this.H){return this.H;}else{return null;}};X2.l.prototype.b=function(){if(this.V){return this.V;}else{return null;}};X2.l.prototype.r=function(){var b;var V;var D=this.V.e();var H=this.V.h();if(D){b=D.D();V=D.V();}else{if(H){b=H.r();V=H.D();}}if(!b||b.strip()==""){b="An error has occurred but a message has not been provided.";}var S=[];S[0]=b;if(V!=null&&V.strip()!=""){S[1]=V;}return S;};X2.S=function(b,V,D,r,H,h){this.b=new ai();this.V=new X2.o(b,V,this.b,D,r,X2.S.r,h);if(X2.S.H){this.V.l(X2.S.H);}if(H){this.V.B(H);}};X2.S.prototype.D=function(b,V){var r=new X2.q(b,V);this.V.Z(r);return r;};X2.S.H=null;X2.S.r=null;