//var ajax=new Object();ajax.READY_STATE_UNINITIALIZED=0;ajax.READY_STATE_LOADING=1;ajax.READY_STATE_LOADED=2;ajax.READY_STATE_INTERACTIVE=3;ajax.READY_STATE_COMPLETE=4;ajax.ContentLoader=function(C,H,B,F,D,A,G,E){this.hashKey=C;this.unrequestBrowser=false;this.req=null;this.onload=D;this.onerror=(A)?A:this.defaultError;this.loadXMLDoc(H,B,F,G,E)};ajax.ContentLoader.prototype={loadXMLDoc:function(H,B,F,G,E){if(!H){H="GET"}if(!G&&H=="POST"){G="application/x-www-form-urlencoded"}if(window.XMLHttpRequest){this.req=new XMLHttpRequest()}else{if(window.ActiveXObject){this.req=new ActiveXObject("Microsoft.XMLHTTP")}else{this.unrequestBrowser=true;return }}if(this.req){try{this.req.open(H,B,true);if(G){this.req.setRequestHeader("Content-Type",G)}if(E){for(var C in E){this.req.setRequestHeader(C,E[C])}}var A=this;this.req.onreadystatechange=function(){A.onReadyState.call(A)};this.req.send(F)}catch(D){this.onerror.call(this)}}},onReadyState:function(){var C=this.req;var B=C.readyState;if(B==ajax.READY_STATE_COMPLETE){var A=C.status;if(A==200||A==0){this.onload.call(this)}else{this.onerror.call(this)}}},defaultError:function(){alert("error fetching data!"+"\n\nreadyState:"+this.req.readyState+"\nstatus: "+this.req.status+"\nheaders: "+this.req.getAllResponseHeaders())}};String.prototype.md5=function(){function i(G,F){return(G<<F)|(G>>>(32-F))}function h(a,G){var c,F,I,b,H;I=(a&2147483648);b=(G&2147483648);c=(a&1073741824);F=(G&1073741824);H=(a&1073741823)+(G&1073741823);if(c&F){return(H^2147483648^I^b)}if(c|F){if(H&1073741824){return(H^3221225472^I^b)}else{return(H^1073741824^I^b)}}else{return(H^I^b)}}function Q(F,H,G){return(F&H)|((~F)&G)}function P(F,H,G){return(F&G)|(H&(~G))}function O(F,H,G){return(F^H^G)}function M(F,H,G){return(H^(F|(~G)))}function S(H,G,z,y,F,I,k){H=h(H,h(h(Q(G,z,y),F),k));return h(i(H,I),G)}function B(H,G,z,y,F,I,k){H=h(H,h(h(P(G,z,y),F),k));return h(i(H,I),G)}function e(H,G,z,y,F,I,k){H=h(H,h(h(O(G,z,y),F),k));return h(i(H,I),G)}function R(H,G,z,y,F,I,k){H=h(H,h(h(M(G,z,y),F),k));return h(i(H,I),G)}function A(a){var d;var I=a.length;var H=I+8;var G=(H-(H%64))/64;var c=(G+1)*16;var k=Array(c-1);var F=0;var b=0;while(b<I){d=(b-(b%4))/4;F=(b%4)*8;k[d]=(k[d]|(a.charCodeAt(b)<<F));b++}d=(b-(b%4))/4;F=(b%4)*8;k[d]=k[d]|(128<<F);k[c-2]=I<<3;k[c-1]=I>>>29;return k}function Y(H){var G="",I="",a,F;for(F=0;F<=3;F++){a=(H>>>(F*8))&255;I="0"+a.toString(16);G=G+I.substr(I.length-2,2)}return G}function g(G){G=G.replace(/\r\n/g,"\n");var F="";for(var I=0;I<G.length;I++){var H=G.charCodeAt(I);if(H<128){F+=String.fromCharCode(H)}else{if((H>127)&&(H<2048)){F+=String.fromCharCode((H>>6)|192);F+=String.fromCharCode((H&63)|128)}else{F+=String.fromCharCode((H>>12)|224);F+=String.fromCharCode(((H>>6)&63)|128);F+=String.fromCharCode((H&63)|128)}}}return F}var Z=Array();var n,D,f,T,C,w,v,u,t;var q=7,o=12,l=17,j=22;var X=5,W=9,V=14,U=20;var N=4,L=11,K=16,J=23;var s=6,r=10,p=15,m=21;string=g(this);Z=A(string);w=1732584193;v=4023233417;u=2562383102;t=271733878;for(n=0;n<Z.length;n+=16){D=w;f=v;T=u;C=t;w=S(w,v,u,t,Z[n+0],q,3614090360);t=S(t,w,v,u,Z[n+1],o,3905402710);u=S(u,t,w,v,Z[n+2],l,606105819);v=S(v,u,t,w,Z[n+3],j,3250441966);w=S(w,v,u,t,Z[n+4],q,4118548399);t=S(t,w,v,u,Z[n+5],o,1200080426);u=S(u,t,w,v,Z[n+6],l,2821735955);v=S(v,u,t,w,Z[n+7],j,4249261313);w=S(w,v,u,t,Z[n+8],q,1770035416);t=S(t,w,v,u,Z[n+9],o,2336552879);u=S(u,t,w,v,Z[n+10],l,4294925233);v=S(v,u,t,w,Z[n+11],j,2304563134);w=S(w,v,u,t,Z[n+12],q,1804603682);t=S(t,w,v,u,Z[n+13],o,4254626195);u=S(u,t,w,v,Z[n+14],l,2792965006);v=S(v,u,t,w,Z[n+15],j,1236535329);w=B(w,v,u,t,Z[n+1],X,4129170786);t=B(t,w,v,u,Z[n+6],W,3225465664);u=B(u,t,w,v,Z[n+11],V,643717713);v=B(v,u,t,w,Z[n+0],U,3921069994);w=B(w,v,u,t,Z[n+5],X,3593408605);t=B(t,w,v,u,Z[n+10],W,38016083);u=B(u,t,w,v,Z[n+15],V,3634488961);v=B(v,u,t,w,Z[n+4],U,3889429448);w=B(w,v,u,t,Z[n+9],X,568446438);t=B(t,w,v,u,Z[n+14],W,3275163606);u=B(u,t,w,v,Z[n+3],V,4107603335);v=B(v,u,t,w,Z[n+8],U,1163531501);w=B(w,v,u,t,Z[n+13],X,2850285829);t=B(t,w,v,u,Z[n+2],W,4243563512);u=B(u,t,w,v,Z[n+7],V,1735328473);v=B(v,u,t,w,Z[n+12],U,2368359562);w=e(w,v,u,t,Z[n+5],N,4294588738);t=e(t,w,v,u,Z[n+8],L,2272392833);u=e(u,t,w,v,Z[n+11],K,1839030562);v=e(v,u,t,w,Z[n+14],J,4259657740);w=e(w,v,u,t,Z[n+1],N,2763975236);t=e(t,w,v,u,Z[n+4],L,1272893353);u=e(u,t,w,v,Z[n+7],K,4139469664);v=e(v,u,t,w,Z[n+10],J,3200236656);w=e(w,v,u,t,Z[n+13],N,681279174);t=e(t,w,v,u,Z[n+0],L,3936430074);u=e(u,t,w,v,Z[n+3],K,3572445317);v=e(v,u,t,w,Z[n+6],J,76029189);w=e(w,v,u,t,Z[n+9],N,3654602809);t=e(t,w,v,u,Z[n+12],L,3873151461);u=e(u,t,w,v,Z[n+15],K,530742520);v=e(v,u,t,w,Z[n+2],J,3299628645);w=R(w,v,u,t,Z[n+0],s,4096336452);t=R(t,w,v,u,Z[n+7],r,1126891415);u=R(u,t,w,v,Z[n+14],p,2878612391);v=R(v,u,t,w,Z[n+5],m,4237533241);w=R(w,v,u,t,Z[n+12],s,1700485571);t=R(t,w,v,u,Z[n+3],r,2399980690);u=R(u,t,w,v,Z[n+10],p,4293915773);v=R(v,u,t,w,Z[n+1],m,2240044497);w=R(w,v,u,t,Z[n+8],s,1873313359);t=R(t,w,v,u,Z[n+15],r,4264355552);u=R(u,t,w,v,Z[n+6],p,2734768916);v=R(v,u,t,w,Z[n+13],m,1309151649);w=R(w,v,u,t,Z[n+4],s,4149444226);t=R(t,w,v,u,Z[n+11],r,3174756917);u=R(u,t,w,v,Z[n+2],p,718787259);v=R(v,u,t,w,Z[n+9],m,3951481745);w=h(w,D);v=h(v,f);u=h(u,T);t=h(t,C)}var E=Y(w)+Y(v)+Y(u)+Y(t);return E.toLowerCase()};function setCookie(B,D,G,F,C,E){if(G){var A=new Date();A.setTime(A.getTime()+(G*24*60*60*1000));var G=A.toGMTString()}document.cookie=B+"="+escape(D)+((G)?"; expires="+G:"")+((F)?"; path="+F:"")+((C)?"; domain="+C:"")+((E)?"; secure":"")}function getCookie(B){var D=" "+document.cookie;var C=" "+B+"=";var E=null;var F=0;var A=0;if(D.length>0){F=D.indexOf(C);if(F!=-1){F+=C.length;A=D.indexOf(";",F);if(A==-1){A=D.length}E=unescape(D.substring(F,A))}}return(E)}var error=new Array();var requestsHash=[];var contentType=headers=params=false;var onLoad=function(){document.getElementById("rocid_Output").innerHTML=this.req.responseText};var onError=function(){alert(error[800])};function rocidGetAjaxRequest(G,B,E,C,A,F,D){if(!B){alert("Not enough actual parameters");return }requestsHash.push(new ajax.ContentLoader(requestsHash.length,G,B,E,C,A,F,D));return requestsHash[requestsHash.length-1].unrequestBrowser}function rocidGetForm(B){var A="http://rocid.ru/widgets/registration/show.php";var C="tpl="+B;return rocidGetAjaxRequest("POST",A,C,onLoad,onError,contentType,headers)}function rocidToggle(){if(arguments.length>1){for(var A=0;A<arguments.length;A++){document.getElementById(arguments[A]).style.display=(A==0)?"block":"none"}}return false}function rocidRegistrationByRocID(){var E=document.getElementById("rocid_RocID").value;var D=document.getElementById("rocid_Password").value;if(E!=""&&D!=""){var A="http://rocid.ru/widgets/registration/reg.php";var C="proj="+proj+"&key="+pkey+"&rocid="+E+"&password="+D.md5();var B=function(){var F=this.req.responseText;if(F!=0){document.getElementById("rocid_RegistrationByRocIDLog").innerHTML=!isNaN(F*1)?error[F]:F}else{document.getElementById("rocid_Output").innerHTML=error[F]}};return rocidGetAjaxRequest("POST",A,C,B,onError,contentType,headers)}else{alert(error[900])}}function rocidRegistrationAsNew(){var A=document.getElementsByTagName("input");var B=[],E=[];for(var G=0;G<A.length;G++){if(A[G].type=="text"||A[G].type=="password"){var C=A[G].name,I=A[G].value;B[C]=I;if(I!=""){if(C=="password"||C=="password2"){I=I.md5}E[G]=encodeURIComponent(C)+"="+encodeURIComponent(I)}}}if(B["password"]==""||B["password"]!=B["password2"]){alert(error[901]);return }if(B["lastname"]!=""&&B["firstname"]!=""){var D="http://rocid.ru/widgets/registration/reg.php";var F="proj="+proj+"&key="+pkey+"&"+E.join("&").replace(/%20/g,"+");var H=function(){var J=this.req.responseText;if(J!=0){document.getElementById("rocid_RegistrationAsNewLog").innerHTML=!isNaN(J*1)?error[J]:J}else{document.getElementById("rocid_Output").innerHTML=error[J]}};return rocidGetAjaxRequest("POST",D,F,H,onError,contentType,headers)}else{alert(error[900])}};