Вход Регистрация
Файл: usr/plugins/js/fullajax.js
Строк: 2133
<?php
/**
* Fullajax = AJAX & AHAH library
* http://www.fullajax.ru
* SiRusAjaX - SRAX v1.0.4 build 8
* Copyright(c) 2007-2010, Ruslan Sinitskiy.
* http://fullajax.ru/#:license
**/
if(!window.SRAX||window.SRAX.TYPE!="full"){function log(){SRAX.debug("log",arguments)}function info(){SRAX.debug("info",arguments)}function error(){SRAX.debug("error",arguments)}function warn(){SRAX.debug("warn",arguments)}function id(A){return SRAX.get(A)}function back(A){SRAX.Html.thread[A].go(-1)}function forward(A){SRAX.Html.thread[A].go(1)}function go(A,B){SRAX.Html.thread[B].go(A)}if(!String.trim){String.prototype.trim=function(){return(this||"").replace(/^s+|s+$/g,"")}}String.prototype.replaceAll=function(B,A){return this.split(B).join(A)};String.prototype.endWith=function(D,A){var C=A?this.toLowerCase():this,B=A?D.toLowerCase():D;return C.substring(C.length-B.length,C.length)==B};String.prototype.startWith=function(D,A){var C=A?this.toLowerCase():this,B=A?D.toLowerCase():D;return C.substring(0,B.length)==B};function abort(A){if(SRAX.Html.thread[A]){SRAX.Html.thread[A].abort()}}function hax(C,B){if(!B){B={}}if(typeof C=="string"){B.url=C}else{B=C}if(B.nohistory==null){B.nohistory=B.noHistory}var A=SRAX.Html.thread[B.id]?SRAX.Html.thread[B.id]:SRAX.HTMLThread(B.id);A.setOptions(B,1);if(SRAX.Html.ASYNCHRONOUS){A.request()}else{SRAX.Html.storage.push(A.id);if(SRAX.Html.storage.length==1){A.request()}}return A}function get(B,D,C,A,E){return typeof D=="object"?hax(B,D):hax(B,{id:D,form:C,cb:A,cbo:E})}function post(B,D,C,A,E){if(typeof D=="object"){D.method="post";return hax(B,D)}return hax(B,{method:"post",id:D,form:C,cb:A,cbo:E})}function dax(C,B){if(!B){B={}}if(typeof C=="string"){B.url=C}else{B=C}if(!B.id){B.id="undefined"}var A=SRAX.Data.thread[B.id]?SRAX.Data.thread[B.id]:SRAX.DATAThread(B.id);A.setOptions(B,1).request();return A}function abortData(A){if(SRAX.Data.thread[A]){SRAX.Data.thread[A].abort()}}function getData(B,A,F,D,E,C){return dax(B,{cb:A,id:F,cbo:D,anticache:E,destroy:C})}function postData(B,E,A,G,D,F,C){return dax(B,{method:"post",params:E,cb:A,id:G,cbo:D,anticache:F,destroy:C})}if(!window.SRAX){FLAX=SRAX={}}SRAX.extend=function(B,E,D){var A=!D;for(var C in E){if(A||!B.hasOwnProperty(C)){B[C]=E[C]}}return B};(function(B){B.extend(B,{version:"SRAX v1.0.4 build 8",TYPE:"full",Default:{prefix:"ax",sprt:":",lvl:"_lvl",loader:"loading",loader2:"loading2",loaderSufix:"_loading",DEBUG_AJAX:0,DEBUG_SCRIPT:0,DEBUG_LINK:0,DEBUG_STYLE:0,USE_FILTER_WRAP:1,NO_HISTORY:0,USE_HISTORY_CACHE:1,LENGTH_HISTORY_CACHE:100,LINK_REPEAT:0,USE_SCRIPT_CACHE:1,SCRIPT_SRC_REPEAT_APPLY:1,SCRIPT_NOAX:0,RELATIVE_CORRECTION:0,OVERWRITE:0,model2Marker:{ax:"<!-- :ax:",begin:":begin: //-->",end:":end: //-->"},HAX_AUTO_DESTROY:0,HAX_ANTICACHE:0,DAX_AUTO_DESTROY:0,DAX_ANTICACHE:0,CHARSET:"UTF-8"},debug:function(K,H){var L=window.console;if(L&&L[K]){try{L[K].apply(L,H)}catch(J){L[K](H.length==1?H[0]:H)}}else{if(window.runtime){var G=[K+": "+H[0]];for(var I=1,D=H.length;I<D;I++){G.push(H[I])}runtime.trace(G)}}},getTime:function(){return new Date().getTime()},LIST_NO_CACHE_SCRIPTS:[],LIST_NO_LOAD_SCRIPTS:[],LIST_NO_LOAD_LINKS:[],init:function(){var H=navigator.userAgent.toLowerCase();B.browser={webkit:/webkit/.test(H),safari:/safari/.test(H),opera:/opera/.test(H),msie:/msie/.test(H)&&!/opera/.test(H),mozilla:/mozilla/.test(H)&&!/(compatible|webkit)/.test(H),air:/adobeair/.test(H)};if(B.browser.msie){for(var G=0,D=[6,7,8],I=D.length;G<I;G++){if(new RegExp("msie "+D[G]).test(H)){B.browser.msieV=D[G]}}}B.addEventsListener(B.History);B.addContainerListener(B.Html);B.addContainerListener(B.Data);B.LoadUnloadContainer={};B.scriptsCache=[[],[]];B.scriptsTemp=[[],[]];B.linksCache=[];B.History.prefixListener.ax=B.go2Hax;B.readyHndlr=[];B.onReady(function(){if(E.USE_FILTER_WRAP){B.Filter.wrap()}setInterval(B.History.check,200);B.initCPLNLS();B.initCPLNLL();if(B.browser.opera){var J=document.createElement("img");J.setAttribute("style","position:absolute;left:-1px;top:-1px;opacity:0;width:0px;height:0px");J.setAttribute("alt","");J.setAttribute("src",'javascript:location.href="javascript:SRAX.xssLoading=0;SRAX.History.check()"');document.body.appendChild(J)}B.Include.parse()});document._write=document.write;document._writeln=document.writeln;B.write=function(J){document._write(J)};B.writeln=function(J){document._writeln(J)}},initOnReady:function(){if(B.isReadyInited){return }B.isReadyInited=1;if(B.browser.mozilla||B.browser.opera){B.addEvent(document,"DOMContentLoaded",B.ready)}else{if(B.browser.msie){(function(){try{document.documentElement.doScroll("left")}catch(D){setTimeout(arguments.callee,50);return }B.ready()})()}else{if(B.browser.safari){B.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(B.safariTimer);B.safariTimer=null;B.ready()}},10)}}}B.addEvent(window,"load",B.ready)},onReady:function(D){if(B.isReady){D()}else{B.readyHndlr.push(D);B.initOnReady()}},ready:function(){if(B.isReady){return }B.isReady=1;for(var H=0,D=B.readyHndlr.length;H<D;H++){try{B.readyHndlr[H]()}catch(G){error(G)}}B.readyHndlr=null},addEvent:function(H,D,G){if(H.attachEvent){H.attachEvent("on"+D,G)}else{H.addEventListener(D,G,false)}},delEvent:function(H,D,G){if(H.detachEvent){H.detachEvent("on"+D,G)}else{H.removeEventListener(D,G,false)}},get:function(D){return typeof D=="string"?document.getElementById(D):D},clearLNLS:function(){B.LIST_NO_LOAD_SCRIPTS=[]},initCPLNL:function(J){var I=B.getHead().getElementsByTagName(J),G=J=="script"?B.LIST_NO_LOAD_SCRIPTS:B.LIST_NO_LOAD_LINKS;for(var H=0,D=I.length;H<D;H++){var K=I[H].src||I[H].href;if(!K){continue}G.push(K)}},initCPLNLS:function(D){if(D){B.clearLNLS()}B.initCPLNL("script")},clearLNLL:function(){B.LIST_NO_LOAD_LINKS=[]},initCPLNLL:function(D){if(D){B.clearLNLL()}B.initCPLNL("link")},linkEqual:{},replaceLinkEqual:function(G,D){var J="replaceAll",I=B.linkEqual;if(!D){G=G[J]("?","[~q~]")}for(var H in I){G=D?G[J](I[H],H):G[J](H,I[H])}if(D){G=G[J]("[~q~]","?")}return G},Model2Blocks:{},IE_XHR_ENGINE:["Msxml2.XMLHTTP","Microsoft.XMLHTTP"],getXHR:function(){if(window.XMLHttpRequest&&!(window.ActiveXObject&&location.protocol=="file:")){return new XMLHttpRequest()}else{if(window.ActiveXObject){for(var D=0;D<B.IE_XHR_ENGINE.length;D++){try{return new ActiveXObject(B.IE_XHR_ENGINE[D])}catch(G){}}}}},delHost:function(D){if(D&&D.startWith(B.host)){D=D.replace(B.host,"")}return D},host:location.protocol+"//"+location.host,DaxPreprocessor:function(D){},HtmlPreprocessor:function(D){},XHRThread:function(I){var H={options:{},inprocess:0,id:I,setOptions:function(K,J){if(!K.url&&K.src){K.url=K.src}if(!K.cb&&K.callback){K.cb=K.callback}if(K.cbo==null&&K.callbackOps!=null){K.cbo=K.callbackOps}if(K.anticache==null&&K.nocache!=null){K.anticache=K.nocache}if(J){D={}}B.extend(D,K);if(D.async==null){D.async=true}D.url=B.delHost(D.url);this.options=D;return H},getOptions:function(){return D},isProcess:function(){return H.inprocess},getXHR:function(){if(!G){G=B.getXHR()}return G},onProgressXHR:function(){var K=H.getXHR();try{K.onprogress=function(L){H.fireEvent("progress",{id:I,thread:H,event:L,position:L.position,total:L.totalSize,percent:Math.round(100*L.position/L.totalSize)})}}catch(J){}return H},openXHR:function(){var L=H.getMethod(),K=H.getXHR(),J=(B.browser.msie&&location.protocol=="file:"&&D.url.startWith("/")?"file://":"")+D.url;if(D.user){K.open(L.toUpperCase(),J,D.async,D.user,D.pswd)}else{K.open(L.toUpperCase(),J,D.async)}return H},sendXHR:function(P,K,N){var O=H.getMethod(),M=H.getXHR();M.onreadystatechange=D.async?K:function(){};var J="setRequestHeader";if(D.cut){M[J]("AJAX_CUT_BLOCK",D.cut)}if(P){M[J]("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT")}M[J]("AJAX_ENGINE","Fullajax");M[J]("X-Requested-With","XMLHttpRequest");if(D.headers){for(var L in D.headers){M[J](L,D.headers[L])}}if(O=="post"){M[J]("Content-Type","application/x-www-form-urlencoded; Charset="+E.CHARSET)}B.showLoading(H.inprocess,H.getLoader());M.send((O=="post")?N:null);if(!D.async){K()}},init:function(){if(H.inprocess){H.abort()}H.inprocess=1;return H},getParams:function(){var J=B.createQuery(D.form),K=H.getMethod();if(D.params){if(J!=""&&!D.params.startWith("&")){J+="&"}J+=D.params}if(K!="post"&&J!=""){if(D.url.indexOf("?")==-1){D.url+="?"+J}else{D.url+=((D.url.endWith("?")||D.url.endWith("&"))?"":"&")+J}}return J},abort:function(){H.inprocess=0;if(!G){return }try{G.isAbort=1;G.abort()}catch(J){}G=null;B.showLoading(0,H.getLoader())},_getLoader:function(J){if(!H.loader){H.loader=D.loader==null?B.getLoader(I,J):B.get(D.loader)}return H.loader},getMethod:function(){var J=D.method?D.method:(D.form?D.form.method:"get");return J&&J.toLowerCase()=="post"?"post":"get"}};var G,D=H.options;B.addEventsListener(H);return H},DATAThread:function(J){var D=B.XHRThread(J),I,H;B.Data.thread[J]=D;B.Data.register(D);D.getLoader=function(){return D._getLoader(1)};D.repeat=function(K){I.params=K;D.request()};D.request=function(){I=D.getOptions();var O=D.getMethod();try{var K={url:I.url,id:J,options:I,thread:D};if(D.fireEvent("beforerequest",K)!==false){H=B.getTime();var M=D.init().getParams(),N=I.anticache!=null?I.anticache:E.DAX_ANTICACHE;if(I.text||I.xml){G({readyState:4,status:I.status==null?200:I.status,responseText:I.text,responseXML:I.xml});I.text=I.xml=null}else{D.onProgressXHR().openXHR().sendXHR(N,G,M)}if(E.DEBUG_AJAX){log(O+" "+I.url+" params:"+M+" id:"+J)}D.fireEvent("afterrequest",K)}}catch(L){D.abort();error(L);throw L}};function G(Q){if(!Q||!Q.readyState){Q=D.getXHR()}try{if(Q.readyState==4){D.inprocess=0;B.showLoading(D.inprocess,D.getLoader());var K=Q.isAbort?-1:Q.status,P=(K>=200&&K<300)||K==304||(K==0&&location.protocol=="file:"),O=Q.responseText,L=Q.responseXML,N={xhr:Q,url:I.url,id:J,status:K,success:P,cbo:I.cbo,callbackOps:I.cbo,options:I,text:O,xml:L,thread:D,responseText:O,responseXML:L,time:B.getTime()-H};D.fireEvent("response",N);if(K>-1&&B.DaxPreprocessor(N)!==false&&I.cb){I.cb(N,J,P,I.cbo);if(E.DEBUG_AJAX){log("callback id:"+J)}}if((I.destroy!=null)?I.destroy:E.DAX_AUTO_DESTROY){D.destroy()}}}catch(M){error(M);D.fireEvent("exception",{xhr:Q,url:I.url,id:J,exception:M,options:I});D.inprocess=0;B.showLoading(D.inprocess,D.getLoader());if((I.destroy!=null)?I.destroy:E.DAX_AUTO_DESTROY){D.destroy()}}}D.destroy=function(){B.Data.thread[J]=null;delete B.Data.thread[J]};return D},showLoading:function(D,I){var G=I?I.style:0;if(G){if(D){if(G.visibility){G.visibility="visible"}else{G.display="block"}}else{function H(L,J){for(var K in L){if(L[K].getLoader()!=I){continue}if(L[K]&&L[K].isProcess()){return 1}}}if(!H(B.Data.thread,1)&&!H(B.Html.thread)){if(G.visibility){G.visibility="hidden"}else{G.display="none"}}}}},getLoader:function(H,D){var G=B.get;if(H){H=G((typeof H=="string"?H:H.id)+E.loaderSufix)}return H||G(D?E.loader2:E.loader)||G(D?E.loader:E.loader2)},encode:encodeURIComponent,decode:decodeURIComponent,createQuery:function(M,D){M=B.get(M);if(!M){return""}if(!D){D={}}var O=[],N=[],U=B.encode,H=M.getElementsByTagName("input");for(var S=0;S<H.length;S++){var G=H[S],I=G.type.toLowerCase(),X=G.name?G.name:G.id,P=U(G.value);if(!X){continue}X=U(X);switch(I){case"text":case"password":case"hidden":case"button":O.push(X);N.push(P);break;case"checkbox":case"radio":if(G.checked){O.push(X);N.push((P==null||P=="")?G.checked:P)}break}}var W=M.getElementsByTagName("select");for(var S=0;S<W.length;S++){var Q=W[S],I=Q.type.toLowerCase(),X=Q.name?Q.name:Q.id;if(!X||Q.selectedIndex==-1){continue}if(I=="select-multiple"){for(var R=0,T=Q.options.length;R<T;R++){if(Q.options[R].selected){O.push(X);N.push(U(Q.options[R].value))}}}else{O.push(U(X));N.push(U(Q.options[Q.selectedIndex].value))}}var L=M.getElementsByTagName("textarea");for(var S=0;S<L.length;S++){var K=L[S],X=K.name?K.name:K.id;if(!X){continue}O.push(U(X));N.push(U(K.value))}var J=[];for(var S=0,T=O.length;S<T;S++){if(D.skipEmpty&&N[S]==""){continue}J.push(O[S]+"="+N[S])}var V=J.join("&")+(M.submitValue||"");M.submitValue=null;return V},applyParams:function(J,K){var M=J.split(" ");for(var L=M.length-1,N=0;L>=N;L--){var G=M[L],O=G.indexOf("=");if(O>-1){var I=B.indexOfAttrMarks(G,O+1),D=G.substring(0,O).trim(),H=G.substring(I[0]+1,I[1]).trim();K[D]=H}else{if(G.indexOf("<")==-1&&G.indexOf(">")==-1){K[G]=G}}}return K},indexOfAttrMarks:function(H,J){if(J==null){J=0}var G="'",D=H.indexOf(G,J),I=H.indexOf('"',J);if(I>-1&&(I<D||D==-1)){D=I;G='"'}if(D>-1){I=H.indexOf(G,D+1)}else{D=H.indexOf("=");D++;while(H.substring(D).startWith(" ")){D++}H=H.replaceAll(">","");I=H.length-1;while(H.substring(I,1).endWith(" ")){I--}D--;I++}return[D,I]},getParam:function(I,G){var D=I.toLowerCase().indexOf(" "+G);if(D>-1){var H=B.indexOfAttrMarks(I,D+G.length+1);return I.substring(H[0]+1,H[1])}},entitiesConvertor:function(D){if(D==null){return D}if(!B.tempDiv){B.tempDiv=document.createElement("div")}B.tempDiv.innerHTML=D;return B.tempDiv[this.browser.msie?"innerText":"textContent"]},makeScript:function(L){if(L.indexOf("SRAX.init()")>-1){L='<script type="text/javascript"></script>'}var H=document.createElement("script"),D=L.toLowerCase().indexOf("<script"),M=L.indexOf(">",D+1),K=L.toLowerCase().lastIndexOf("</script>");if(D>-1&&M>-1){var J=L.substring(D,M+1);B.applyParams(J,H)}if(H.src){H.src=B.entitiesConvertor(H.src)}if(K>-1){L=L.substring(M+1,K)}else{L=""}var I=(H.src?H.src:"").trim().toLowerCase(),G=I.startWith("javascript:");if(I=="//:"||G){if(G){L+="n"+I.substring(11)}H.src=""}if(L.length>0){if(B.browser.msie){H.text=L}else{H.appendChild(document.createTextNode(L))}}if(!H.id){H.id=H.src}return H},addCss:function(D,G){if(D.indexOf("{")>-1){B.addStyle("<style>"+D+"</style>",G,G)}else{B.addLink('<link rel="stylesheet" href="'+D+'">',G,G)}},addStyle:function(Q,P,L){Q=Q.toLowerCase();var N=Q.indexOf("<style"),M=Q.indexOf(">",N+1),K=Q.indexOf("</style>",M+1),I=Q.substring(N,M+1),J=B.applyParams(I,{}),O=J[F("skip")];if(O=="true"||O=="1"){return }Q=Q.substring(M+1,K);N=Q.indexOf("@import ");while(N>-1){M=Q.indexOf("(",N+1);K=Q.indexOf(")",M+1);var G=Q.substring(M+1,K);G='<link rel="stylesheet" type="text/css" href="'+G+'"/>';B.addLink(G,P,L);Q=Q.substring(0,N)+Q.substring(K+1);N=Q.indexOf("@import ")}if(L&&typeof P=="string"){Q=B.sealStyle(Q,P)}if(Q.length>0){var D=document.createElement("style");D.type="text/css";if(D.styleSheet){D.styleSheet.cssText=Q}else{if(B.browser.mozilla||B.browser.opera){D.innerHTML=Q}else{var H=document.createTextNode(Q);D.appendChild(H)}}B.getHead().appendChild(D);if(E.DEBUG_STYLE){log("Style "+Q)}}},sealStyle:function(H,K){K=K.trim();var D=-1,J=H.indexOf("{"),I=((K.startWith(".")||K.startWith("#"))?"":"#")+K+" ",G="";while(J>-1){G+=I+H.substring(D+1,J).trim().replaceAll(",",","+I);D=H.indexOf("}",J);if(D>-1){G+=H.substring(J,D+1)}J=D==-1?-1:H.indexOf("{",D)}return G},addLink:function(P,N,I){P=P.toLowerCase();var K=P.indexOf("<link"),J=P.indexOf(">",K+1);if(K>-1&&J>-1){var H=P.substring(K,J+1),M=document.createElement("link");B.applyParams(H,M);if(M.href){M.href=B.entitiesConvertor(M.href)}var O=M[F("skip")];if(O=="true"||O=="1"){return }if(M.href&&M.type=="application/rss+xml"){}var D=(I&&typeof N=="string")?(N+":"+M.href):M.href;if(B.indexOfCacheSrc(B.linksCache,D)>-1){var G=M[F("repeat")];if(!E.LINK_REPEAT||G=="false"||G=="0"){return }}else{B.linksCache.push(D)}if(B.indexOfCacheSrc(B.LIST_NO_LOAD_LINKS,D)>-1){return }if(I&&M.rel=="stylesheet"){try{dax(M.href,{cb:function(S,U,Q,T){var R=Q?S.responseText:"";B.addStyle("<style>"+R+"</style>",T,1)},id:(N?N+":":"")+M.href,cbo:N});return }catch(L){error("error seal "+M.href)}}if(document.createStyleSheet){document.createStyleSheet(M.href)}else{B.getHead().appendChild(M)}if(E.DEBUG_LINK){log("append LINK "+M.href)}}},isHTMLComment:function(G){var D=G.lastIndexOf("<!--"),H=G.indexOf("-->",D+4);return(D>-1&&H==-1)},isHTML:function(G){G=G.toLowerCase();function D(I){var H=G.lastIndexOf("<"+I),L=G.indexOf("</"+I+">",H+1),K=G.indexOf(">",H+1),J=G.indexOf("/>",H+1);return !(H>-1&&K>-1&&L==-1&&J!=K+1)}return D("script")&&D("style")},relativeCorrection:function(K,G,H){if(G.indexOf("/")==-1){G=location.pathname}var D=G.lastIndexOf("/");G=G.substring(0,D+1);D=K.toLowerCase().indexOf(" "+H);while(D>-1){var I=B.indexOfAttrMarks(K,D+2);if(B.isHTML(K.substring(0,D+2))&&I[0]>-1&&I[1]>-1){var J=K.substring(I[0]+1,I[1]);if(!J.startWith("/")&&!J.startWith("#")&&B.parseUri(J).protocol==""){K=K.substring(0,I[0]+1)+G+K.substring(I[0]+1)}}D=K.toLowerCase().indexOf(H,D+2)}return K},arrayIndexOf:function(D,H,J){var I=-1;for(var G=(J||0);G<D.length;G++){if(D[G]==H){I=G;break}}return I},toSource:function(H){switch(typeof H){case"function":return H.toString();case"string":return'"'+H.replaceAll('"','\"')+'"';case"object":if(H==null){return null}var I="";if(instanceof Array){for(var G=0,D=H.length;G<D;G++){I+=","+B.toSource(H[G])}if(I.length>0){I=I.substring(1)}return"["+I+"]"}for(var G in H){I+=","+G+":"+B.toSource(H[G])}return"{"+(I.length>0?I.substring(1):I)+"}"}return H},arrayRemoveOf:function(D,H,I){if(I){H=B.toSource(H)}for(var G=0;G<D.length;G++){if((I&&H==B.toSource(D[G]))||H==D[G]){D.splice(G--,1)}}return D},collectionToArray:function(H){var G=[];for(var I=0,D=H.length;I<D;I++){G[I]=H[I]}return G},indexOfCacheSrc:function(D,H){var G=B.arrayIndexOf(D,H);if(G==-1){H=H.startWith(location.protocol)?H.replace(location.protocol+"//"+location.host,""):location.protocol+"//"+location.host+H;G=B.arrayIndexOf(D,H)}return G},parsingText:function(T){if(!T){T={}}var J=T.owner;if(B.Html.fireEvent(T.id,"beforeload",T)===false){J.inprocess=0;return }var R=T.text,Q=T.id,G=T.url,S=T.add,L="relativeCorrection";R=B.Include.fix(R);if(T.rc==null?E.RELATIVE_CORRECTION:T.rc){R=B[L](R,G,"src");R=B[L](R,G,"href");R=B[L](R,G,"action")}R=B.parsingLinkAndStyle(R,Q,T.seal);R=B.parsingFrameset(R);L="substring";var H=R.toLowerCase().indexOf("<head>"),I="";if(H>-1){I+=R[L](0,H);R=R[L](H)}else{I=R;R=""}var D=R.toLowerCase().indexOf("</head>"),M="";if(D>-1){M+=R[L](D+7);R=R[L](0,D+7)}var P=B.Html.thread[Q],N=P?P.getOptions().notitle:0,K=B.parsingTitle(R,Q,N);R=I+K.text+M;if(!S){R=B.parsingLoadUnload(R,Q)}var O=B.parsingScript(R,Q,J&&J[F("noax")]);new B.loadHtml(Q,O.scripts,O.html,G,S,J,T.onload,T.scope,K.title)},parsingLoadUnload:function(J,M){var I,H,G=J.toLowerCase().indexOf("<body");if(G>-1){var L=J.indexOf(">",G+1);if(L>-1){var D=J.substring(G,L+1);I=B.getParam(D,"onload");H=B.getParam(D,"onunload");J=J.substring(0,G)+D.replaceAll("load","")+J.substring(L+1)}}var K="LoadUnloadContainer";if(!B[K][M]){B[K][M]={}}B[K][M].onload=I;B[K][M].onunload=B[K][M].nextonunload;B[K][M].nextonunload=H;return J},parsingTitle:function(J,L,H){var G=J.toLowerCase(),D=G.indexOf("<title>"),K=G.indexOf("</title>",D+1),I;while(D>-1&&K>-1){if(!B.isHTMLComment(J.substring(0,D))&&!I){I=J.substring(D+7,K);if(!H){B.titleChange(I,L)}}J=J.substring(0,D)+J.substring(K+8);G=J;D=G.indexOf("<title>",D+1);K=G.indexOf("</title>",D+1)}return{text:J,title:I}},titleChange:function(H,I){var G=document.title,D={oldTitle:G,newTitle:H};if(B.Html.fireEvent(I,"beforetitlechange",D)!==false){document.title=H;B.Html.fireEvent(I,"titlechange",D);return H}return false},parsingFrameset:function(J){var D=J.toLowerCase().indexOf("<frameset");if(D>-1){var K=J.toLowerCase().indexOf(">",D),I=J.toLowerCase().indexOf("</frameset>");if(K>-1&&I>-1){var G=J.substring(D,I+11),H=B.genId();G="<iframe style='height:100%;width:100%;border:0' href='javascript:true' id='"+H+"'></iframe><script>var obj = SRAX.get('"+H+"');var doc = obj[obj.contentWindow ? 'contentWindow' : 'contentDocument'].document;doc.open();doc.write('"+G.replaceAll("n","").replaceAll("r","").trim()+"');doc.close()</script>";J=J.substring(0,D)+G+J.substring(I+11)}}return J},parsingLinkAndStyle:function(K,M,J){var G=K.toLowerCase().indexOf("<link"),I=K.toLowerCase().indexOf("<style"),H="",D=-1,L=-1;if((G<I&&G>-1)||I==-1){D=G;L=K.indexOf(">",D+1)}else{D=I;L=K.toLowerCase().indexOf("</style>",D+1)}while(D>-1&&L>-1){if(D>0){H+=K.substring(0,D)}if((G<I&&G>-1)||I==-1){if(!B.isHTMLComment(K.substring(0,D))){B.addLink(K.substring(D,L+1),M,J)}K=K.substring(L+1)}else{if(!B.isHTMLComment(K.substring(0,D))){B.addStyle(K.substring(D,L+8),M,J)}K=K.substring(L+8)}G=K.toLowerCase().indexOf("<link");I=K.toLowerCase().indexOf("<style");if((G<I&&G>-1)||I==-1){D=G;L=K.indexOf(">",D+1)}else{D=I;L=K.toLowerCase().indexOf("</style>",D+1)}}if(K.length>0){H+=K}return H},parsingScript:function(T,H,J){var D=T.toLowerCase(),S=D.indexOf("<script"),Q=D.indexOf("</script>",S+1),U=9,P=T.indexOf(">",S+1),O=T.indexOf("/>",S+1);if(P>-1&&O!=-1&&P==O+1){Q=O;U=2}var R=[],G=[],K=0,L;while(S>-1&&Q>-1){if(S>0){R.push(T.substring(0,S))}var Z=B.makeScript(T.substring(S,Q+U));if(J){Z[F("noax")]=1}T=T.substring(Q+U);D=T.toLowerCase();S=D.indexOf("<script");Q=D.indexOf("</script>",S+1);U=9;P=T.indexOf(">",S+1);O=T.indexOf("/>",S+1);if(P>-1&&O!=-1&&P==O+1){Q=O;U=2}if(R.length==0||!B.isHTMLComment(R.join(""))){if(true||T.toLowerCase().indexOf("<body")==-1){if(R.length==0||R[R.length-1].indexOf("_place_of_script_")==-1){L=H+"_place_of_script_"+K++;R.push(C(L))}Z.place=L;var Y=B.get(L);if(Y){Y.id+="_old"}}var V=Z[F("skip")];if(V=="true"||V=="1"){continue}if(Z.src){if(Z.src.indexOf("fullajax.js")>-1||B.indexOfCacheSrc(B.LIST_NO_LOAD_SCRIPTS,Z.src)>-1){continue}var M=B.indexOfCacheSrc(B.scriptsCache[0],Z.src);if(M>-1){var N=Z[F("repeat")];if((N==null||(N!="false"&&N!="0"))&&E.SCRIPT_SRC_REPEAT_APPLY){B.scriptsCache[1][M].place=Z.place;Z=B.cloneScript(B.scriptsCache[1][M])}else{Z=B.makeScript('<script type="text/javascript">//no repeat '+Z.src+"</script>")}}else{try{if(B.Data.thread[Z.src]&&B.Data.thread[Z.src].isProcess()){Z=B.Data.thread[Z.src].options.cbo}else{if(E.SCRIPT_NOAX||Z[F("noax")]){Z.xss=1}else{new B.startLoadScript(Z)}}}catch(X){error(X)}}}var W=F("head"),I=Z[W];D=T.toLowerCase();Z[W]=I==null?D.indexOf("<head>")==-1&&D.indexOf("</head>")>-1:(I=="1"||I=="true");G.push(Z)}}if(T.length>0){R.push(T)}return{scripts:G,html:R}},finishLoadScript:function(K,L,G,D){var J=G?K.responseText:"",H=B.makeScript('<script type="text/javascript">'+J+"</script>");H.place=D.place;H.id=D.id?D.id:L;var I=B.indexOfCacheSrc(B.scriptsTemp[0],L);if(I==-1){I=B.scriptsTemp[0].length}B.scriptsTemp[0][I]=L;B.scriptsTemp[1][I]=H;if(E.USE_SCRIPT_CACHE&&B.indexOfCacheSrc(B.LIST_NO_CACHE_SCRIPTS,L)==-1&&!D[F("nocache")]){I=B.indexOfCacheSrc(B.scriptsCache[0],L);if(I==-1){I=B.scriptsCache[0].length}B.scriptsCache[0][I]=L;B.scriptsCache[1][I]=B.cloneScript(H)}},isXss:function(D){D=(D||"").toLowerCase();return(D.startWith("http:")||D.startWith("https:"))&&!D.startWith(B.host)},startLoadScript:function(D){try{var H=D.src;if(B.isXss(H)){throw"xss"}dax(H,{cb:B.finishLoadScript,id:H,cbo:D,anticache:D[F("nocache")]})}catch(G){if(!D.id){D.id=D.src}D.xss=D.src}},cloneScript:function(G,I){if(!I){I={}}var H=document.createElement("script"),M=["src","type","language","defer","text","id","place",F("repeat"),F("noax"),F("skip"),F("head"),F("noblock")];for(var K=0,D=M.length;K<D;K++){try{var L=G[M[K]];if(I[M[K]]!=null){L=I[M[K]]}if(L!=null&&L!=""){H[M[K]]=L}}catch(J){}}return H},serialApplyScripts:function(D,J,G,I){var H=0;this.checkload=function(){if(H>=D.length){B.docWriteTraper.apply(J);if(!B.xssLoading&&!(H>=1?(D[H-1].inprocess||D[H-1].countproc):0)){return I?I():null}}else{if(D[H].src){var L=B.indexOfCacheSrc(B.scriptsTemp[0],D[H].src);if(L>-1&&!(D[H][F("noax")]&&D[H][F("nocache")])){var K=D[H].place;D[H]=B.cloneScript(B.scriptsTemp[1][L]);D[H].place=K}}if(!D[H].src&&(H>0?!D[H-1].inprocess:1)){new B.addScript(D[H],J,G);B.docWriteTraper.apply(J);H++}else{if(D[H].src&&!B.xssLoading){if(D[H].loaded){B.docWriteTraper.apply(J);H++}else{if(D[H].xss){D[H].xss=0;new B.addScript(D[H],J,G)}}}}}var M=this;this.recall=function(){M.checkload()};setTimeout(this.recall,10)};this.checkload()},loadHtml:function(S,L,O,G,T,H,K,U,R){B.removeScripts(L);var I={id:S,scripts:L,html:O,url:G,add:T,owner:H,scope:U,title:R};B.Html.fireEvent(S,"unload",I);if(!T){B.execUnloadBody(S)}var Q=[],P=[],D=[];for(var M=0;M<L.length;M++){var V=L[M],J=V[F("head")],N=J?Q:P;N.push(V);if(J){D.push(C(V.place))}}if(D.length){B[T?"addTo":"writeTo"](D,S)}new B.serialApplyScripts(Q,S,G,function(){B[B.Model2Blocks[S]?"paintHtml2":"paintHtml"](O.join(""),S,G,T);if(!T){B.Effect.use(S)}new B.serialApplyScripts(P,S,G,function(){if(E.USE_FILTER_WRAP){var Y=B.Model2Blocks[S];if(Y){for(var Z in Y){var X=B.get(Y[Z]);if(X){B.Filter.wrap(X,G)}}}else{B.Filter.wrap(S,G)}}B.Include.parse();if(H){H.inprocess=0;if(H.countproc){H.countproc--}}if(!T){B.execLoadBody(S,G);B.execFunc(K,[I],U)}B.Html.fireEvent(S,"load",I);var W=B.Html.thread[S];if(!B.Html.ASYNCHRONOUS&&B.Html.storage[0]==S){B.Html.storage.splice(0,1);if(B.Html.storage.length>0){W.request()}}if(W){B.showLoading(0,W.getLoader())}})})},execLoadBody:function(G,D){if(B.LoadUnloadContainer[G].onload){B.parsingText({id:G,url:D,text:'<script id="'+F("script"+E.sprt+"temp")+'" type="text/javascript">'+B.LoadUnloadContainer[G].onload+"</script>",add:1})}if(B.isCOL){window._onload()}},captureOnLoad:function(){window.onloadHandlers=[];window._onload=function(){var G=window.onloadHandlers;window.onloadHandlers=[];G.push(window.onload);window.onload=null;for(var I=0,D=G.length;I<D;I++){try{if(G[I]){G[I]()}}catch(H){error(H)}}};window.onloadHandlers.push(window.onload);window.onload=function(){window.onload=null;window._onload()};window._addEvent=window[window.attachEvent?"attachEvent":"addEventListener"];window.addEventListener=window.attachEvent=function(G,H,D){if(G=="load"){window.onloadHandlers.push(H)}else{window._addEvent(G,H,D)}};B.isCOL=1},execUnloadBody:function(I,G){var H=B.LoadUnloadContainer[I],D=G?"nextonunload":"onunload";B.execFunc(H[D]);H[D]=null},paintHtml:function(H,J,G,I){var D={html:H,id:J,url:G,add:I};if(I){if(B.Html.fireEvent(J,"beforepaintadd",D)!==false){B.addTo(H,J);B.Html.fireEvent(J,"afterpaintadd",D)}}else{if(B.Html.fireEvent(J,"beforepaint",D)!==false){B.writeTo(H,J);B.Html.fireEvent(J,"afterpaint",D)}}},paintHtml2:function(K,O,G,Q){var D=B.Model2Blocks[O],I=E.model2Marker,N=K.indexOf(I.ax),M=K.indexOf(I.begin,N+1),L=K.indexOf(I.ax,M+1),J=K.indexOf(I.end,L+1);while(N>-1&&M>-1&&L>-1&&J>-1){var H=K.substring(N+I.ax.length,M),P=K.substring(M+I.begin.length,L);if(D[H]){var R={html:P,id:H,url:G,block:D[H],add:Q};if(Q){if(B.Html.fireEvent(O,"beforepaintadd",R)!==false){B.addTo(P,D[H]);B.Html.fireEvent(O,"afterpaintadd")}}else{if(B.Html.fireEvent(O,"beforepaint",R)!==false){B.writeTo(P,D[H]);B.Html.fireEvent(O,"afterpaint")}}}N=K.indexOf(I.ax,J+1);M=K.indexOf(I.begin,N+1);L=K.indexOf(I.ax,M+1);J=K.indexOf(I.end,L+1)}},docWriteTraper:new function(){var D={},H={},G={};this.add=function(K,L,J,I){if(I.inprocessTO){clearTimeout(I.inprocessTO)}I.inprocess=1;D[L]=I;H[L]=J;if(!G[L]){G[L]=""}G[L]+=K;this.checkMutiLine(L)};this.checkMutiLine=function(P){var M=G[P],J=M.indexOf("<");while(J>-1){var O=1,K=M.charAt(J+O).trim();while(K!=""&&K!=">"){if(K=="/"&&M.charAt(J+O+1)==">"){this.apply(P);return }K=M.charAt(J+(++O)).trim()}var I=M.substring(J+1,J+O),N=M.indexOf("</"+I+">",J);if(N>-1){this.apply(P);break}else{var L=M.indexOf(">",J+1+I.length);if(L>-1&&(I=="img"||I=="input"||I=="br"||I=="hr")){this.apply(P);return }J=M.indexOf("<",J+1)}}};this.apply=function(J){if(!G[J]){return }var I=G[J];delete G[J];if(!D[J].countproc){D[J].countproc=1}else{D[J].countproc++}A(B.get(D[J].place),1);B.parsingText({text:I,id:D[J].place,url:H[J],add:1,owner:D[J]})};this.applyAll=function(){for(var I in G){if(G[I]){B.docWriteTraper.apply(I)}}}},addScript:function(P,R,G,O,I,M,T){if(typeof P=="object"&&P.nodeName!="SCRIPT"){R=P.callback||P.cb;G=P.noax;I=P.place;O=P.anticache==null?P.nocache:P.anticache;M=P.storage;T=P.noblock;P=P.src||P.url}if(B.Storage&&(M==null?E.USE_STORAGE:M)&&B.Storage.isPosible()&&!B.Storage.isReady){B.Storage.onReady(function(){B.addScript(P,R,G,O,I,M)});return }if(typeof P=="string"){var Q=document.createElement("span");Q.cb=R?R:function(){};Q.id=B.genId();Q.style.display="none";A(Q,1);var H=document.getElementsByTagName("script");I=B.get(I);if(I){I.innerHTML="";I=I.appendChild(Q)}else{for(var J=0,L=H.length;J<L;J++){var S=H[J].innerHTML,N=S.indexOf("SRAX.addScript");if(N>-1){var K=S.indexOf(P);if(K>N){I=H[J].place?B.get(H[J].place):H[J];break}}}}if(I){I.parentNode.insertBefore(Q,I)}else{document.body.appendChild(Q)}hax({id:Q.id,url:P,html:"<body onload="SRAX.get('"+Q.id+'').cb()"><script type="text/javascript" src="'+P+'"'+(G?" "+F("noax")+'="1"':"")+(O?" "+F("nocache")+'="1"':"")+(T?" "+F("noblock")+'="1"':"")+"></script></body>",nohistory:1,storage:M});return }B.docWriteTraper.apply(R);document.write=function(U){B.docWriteTraper.add(U,R,G,P)};document.writeln=function(U){document.write(U+"n")};if(E.DEBUG_SCRIPT){var D=P.id;if(!D||D==""){D=P.innerHTML.trim().substring(0,100)+"n..."}log("append script -> "+D)}if(P.src){P.inprocess=1;B.xssLoading=!P[F("noblock")];P.onerror=P.onload=P.onreadystatechange=function(){var U=this;if(!U.loaded&&(!U.readyState||U.readyState=="loaded"||U.readyState=="complete")){U.loaded=1;U.onerror=U.onload=U.onreadystatechange=null;B.xssLoading=0;U.inprocessTO=setTimeout(function(){U.inprocess=0},100)}}}B.getHead().appendChild(P)},evalScript:function(G){try{if(B.browser.safari){window._evalCode=G;new B.addScript(B.makeScript('<script type="text/javascript">eval(window._evalCode)</script>'))}else{if(window.execScript){window.execScript(G)}else{window["eval"](G)}}}catch(D){error(D);return 0}return 1},removeScripts:function(H){var K=B.getHead().getElementsByTagName("script"),G=[];for(var J=0,D=H.length;J<=D;J++){if(J<H.length&&typeof H[J]=="string"){continue}var L=J<H.length?H[J].id:F("script"+E.sprt+"temp");for(var I=0,D=K.length;I<D;I++){if(L?K[I].id==L:K[I].innerHTML==H[J].innerHTML){G.push(K[I]);break}}}for(var J=0,D=G.length;J<D;J++){if(G[J].parentNode){if(E.DEBUG_SCRIPT){log("remove script "+(G[J].id?G[J].id:G[J].innerHTML))}G[J].parentNode.removeChild(G[J])}}},execFunc:function(K,G,J){if(instanceof Array){for(var I=0,D=K.length;I<D;I++){B.execFunc(K[I],G,J)}}else{if(K){try{if(!J){J=window}if(typeof K=="string"){K=K.trim();if(K.startWith("function")&&K.endWith("}")){K=B.browser.msie?"SRAX.tmp="+K:"("+K+")"}(function(){K=window["eval"](K)}).call(J);if(typeof K!="function"){return }}K.apply(J,G)}catch(H){error(H)}}}},HTMLThread:function(K){var D=B.XHRThread(K),J,I;B.Html.thread[K]=D;B.Html.register(D);D.getLoader=D._getLoader;D.repeat=function(M,L,N){J.form=M;J.nohistory=L;J.params=N;D.request()};D.request=function(){J=D.getOptions();var O=D.getMethod();try{var L={url:J.url,id:K,options:J,thread:D};if(D.fireEvent("beforerequest",L)!==false){var N=function(){I=B.getTime();var T=D.init().getParams(),S=location.href.indexOf("#"),Q=(S==-1)?location.href:location.href.substring(0,S),U=J.html!=null||(Q.endWith(J.url)||(J.anticache!=null?J.anticache:E.HAX_ANTICACHE));S=G.getIndex(J.url);var P=null;if(!U&&S>-1&&O!="post"){J.html=G.storage[S][1];P=1}if(J.html){H({readyState:4,status:200,responseText:J.html,cache:P});J.html=null}else{try{D.onProgressXHR().openXHR().sendXHR(U,H,T)}catch(R){B.Effect.use(K);throw R}}if(E.DEBUG_AJAX){log(O+" "+J.url+" params:"+T+" id:"+K)}};if(!B.Effect.use(K,1,N)){N()}D.fireEvent("afterrequest",L)}}catch(M){D.abort();error(M);throw M}};function H(Y){if(!Y||!Y.readyState){Y=D.getXHR()}try{if(Y.readyState==4){var O=Y.isAbort?-1:Y.status,W=(O>=200&&O<300)||O==304||(O==0&&location.protocol=="file:"),X=Y.responseText;try{var V=[],N={};try{V=Y.getAllResponseHeaders().split("n")}catch(T){}for(var P=0,S=V.length;P<S;P++){var M=V[P].indexOf(":");if(M>-1){N[V[P].substring(0,M).toLowerCase()]=V[P].substring(M+2)}}var R=N["content-type"];if(R){var Q=["application/x-javascript","application/javascript","text/javascript","application/json","text/json"];for(var P=0,S=Q.length;P<S;P++){if(R.indexOf(Q[P])>-1){X="<script>"+X+"</script>";J.add=1;break}}}}catch(U){}var L={xhr:Y,url:J.url,id:K,status:O,success:W,cbo:J.cbo,callbackOps:J.cbo,options:J,text:X,thread:D,responseText:X,time:B.getTime()-I};D.fireEvent("response",L);if(O>-1&&B.HtmlPreprocessor(L)!==false){if(J.cb){B.execFunc(J.cb,[L,K,W,J.cbo],J.scope);if(E.DEBUG_AJAX){log("callback id:"+K)}}D.inprocess=0;if(W){if(L.text){G.add(J.url,L.text,J);D.inprocess=1;B.parsingText({owner:D,text:L.text,id:K,url:J.url,add:J.add,rc:J.rc,seal:J.seal,onload:J.onload,scope:J.scope})}else{warn("empty response: "+K+" => "+J.url);B.Effect.use(K)}if(E.DEBUG_AJAX){log("response ok:"+J.url)}}else{B.execFunc(J.onerror,[J],J.scope);B.showMessage(J.url,Y.status,Y.statusText);B.Effect.use(K)}}B.showLoading(D.inprocess,D.getLoader());if((J.destroy!=null)?J.destroy:E.HAX_AUTO_DESTROY){D.destroy()}}}catch(U){error(U);D.fireEvent("exception",{xhr:Y,url:J.url,id:K,exception:U,options:J});B.Effect.use(K);D.inprocess=0;B.showLoading(D.inprocess,D.getLoader());if((J.destroy!=null)?J.destroy:E.HAX_AUTO_DESTROY){D.destroy()}}}D.destroy=function(){B.Html.thread[K]=null;delete B.Html.thread[K]};var G=D.history={storage:[],startPageHtml:null,startPageOps:null,startPageUrl:null,current:0,currentUrl:function(){if(this.storage.length==0||this.current<=0){return null}return this.storage[G.current][0]},add:function(U,R,M){U=decodeURIComponent(U);if(U.href){U=U.href}this.current++;var Z=location.host,O=U.indexOf(Z);if(O>-1){U=U.substring(O+Z.length)}U=B.replaceLinkEqual(U);if(J.startpage){J.startpage=0;G.startPageHtml=R;G.startPageUrl=U;G.startPageOps=B.extend({},J);B.History.setCurrent(B.getHash())}var X=!(J.nohistory!=null?J.nohistory:E.NO_HISTORY);if(G.startPageHtml==null){var S=["<head><title>"+document.title+"</title></head>"],Y=B.Model2Blocks[K];if(Y){for(var Q in Y){var T=B.get(Y[Q]);if(T){var V=T.innerHTML,L=E.model2Marker.ax,N=L+Q+E.model2Marker.begin,P=L+Q+E.model2Marker.end;V=V.replaceAll(N,"").replaceAll(P,"");S.push(N+V+P)}}}else{var T=B.get(K);if(!T){T=document.body}S.push(T.innerHTML)}G.startPageHtml=S.join("");G.startPageUrl=location.href}if(X){var W=B.parsingTitle(R,K,1).title;B.History.add(K,U,null,W)}if(this.current>E.LENGTH_HISTORY_CACHE){this.current--;this.storage.splice(0,1)}this.storage.length=this.current;this.storage.push([B.replaceLinkEqual(U,1),R,M])},get:function(L){return this.storage[L]},getIndex:function(O,N){for(var M=N||0,L=this.storage.length;M<L;M++){if(this.storage[M]!=null&&O==this.storage[M][0]){return M}}return -1}};D.go2History=function(O){if(G.currentUrl()!=O){var L=J.historycache!=null?J.historycache:E.USE_HISTORY_CACHE;if(!L||!D.go2UrlHistory(O)){O=B.replaceLinkEqual(O,1);var M=G.getIndex(O,2),N={url:O,nohistory:1};if(M>-1){B.extend(N,G.storage[M][2],1)}D.setOptions(N,M>-1).request()}}};D.go2UrlHistory=function(M){var L=G.getIndex(M);if(L>-1){D.go(L-G.current);B.History.setCurrent(B.getHash());return true}};D.go=function(Q){var N=G.current+Q;if(N<0){N=0}else{if(N>G.storage.length-1){N=G.storage.length-1}}if(N==0){return D.go2StartPage()}G.current=N;var L=G.storage[N],M=L[0],P=L[1],O=L[2]||J;if(M&&P){B.parsingText({owner:D,text:P,id:K,url:G.storage[N][0],add:O.add,rc:O.rc,seal:O.seal,onload:O.onload,scope:O.scope})}},D.go2StartPage=function(){var L=G;if(L.startPageHtml){var M=B.extend({startpage:1,owner:D,text:L.startPageHtml,id:K,url:L.startPageUrl},L.startPageOps||J,1);B.parsingText(M)}G.current=0};D.getSrartPageUrl=function(){return G.startPageUrl};return D},replaceHref:function(){var D=location,G=D.href,H=G.indexOf("#");if(H>-1&&G.length>H+1){D.replace(G.substring(0,H)+B.replaceLinkEqual(G.substring(H)))}},go:function(H,G){var D=B.parseAxHash(H);for(var I in D){hax(B.extend({id:I,url:D[I]},G))}},directLink:function(){B.onReady(function(){B.replaceHref();var D=B.getHash();B.History.setCurrent(D);B.go2Hax(1,D)})},isDirectLink:function(D){var H=FLAX.parseAxHash(FLAX.getHash());if(D){return !!H[D]}else{for(var G in H){return true}}return false},go2Hax:function(N,G){var P=B.parseAxHash(B.History.previous);if(!G){G=B.History.current}var O=B.parseAxHash(G),L=0,R={oldHash:B.History.previous,newHash:B.History.current};for(var H in O){L++;if(P[H]==O[H]){P[H]=null;continue}P[H]=null;R.id=H;R.url=O[H];if(B.Html.fireEvent(H,"beforehistorychange",R)===false){continue}if(B.Html.thread[H]){var J=function(){B.Html.thread[H].go2History(O[H])};if(!B.Effect.use(H,1,J)){J()}}else{var D=B.replaceLinkEqual(O[H],1),K=B.parseUri(D),R=B.Filter.getOptions(K.path,K.query);ind=D.indexOf("?");if(ind>-1&&R.params){var Q="&"+D.substring(ind+1)+"&",M=R.params.split("&");for(var I=0;I<M.length;I++){if(Q.indexOf("&"+M[I]+"&")>-1){M.splice(I--,1)}}R.params=M.join("&")}if(!R){R={}}R.id=H;R.nohistory=N;R.startPage=N;hax(D,R)}}for(var H in P){if(P[H]&&B.Html.thread[H]){R.id=H;R.url=B.Html.thread[H].getSrartPageUrl();R.startpage=1;if(B.Html.fireEvent(H,"beforehistorychange",R)===false){continue}var J=B.Html.thread[H].go2StartPage;if(!B.Effect.use(H,1,J)){J()}}}O.size=L;return O},makeAxHash:function(I,H,D,K){if(!K){K="ax"}var G=H.id||H,N=":"+K+":"+G+":",L=I.indexOf(N);if(L>-1){var M=I.substring(L),J=M.indexOf(":",L+N.length);while(J>-1&&M.substring(J,J+2)==":/"){J=M.indexOf(":",J+1)}if(J>-1){M=M.substring(0,J)}I=I.replace(M,N+D)}else{I+=N+D}return B.makeAxLevel((I.startWith("#")?"":"#")+I,K,G)},makeAxLevel:function(I,L,D){var N=D.indexOf(E.lvl);if(N>-1){var P=E.lvl.length,Q=parseInt(D.substring(N+P)),G=":"+L+":",M=I.indexOf(G);while(M>-1){var K=I.indexOf(":",M+G.length),O=I.substring(M+G.length,K),J=O.indexOf(E.lvl);if(J>-1){var R=parseInt(O.substring(J+P));if(R>Q){var H=I.indexOf(":",K+1);I=I.substring(0,M)+(H>-1?I.substring(H):"");K=M-1}}M=I.indexOf(G,K+1)}}return I},attrs:["id","src","url","method","form","params","callback","cb","callbackOps","cbo","nohistory","cut","rc","overwrite","destroy","html","anticache","nocache","startpage","async","historycache","seal","user","pswd","storage","etag","headers","add","target","onload","loader"],parseAttr:function(I,K){var G=null,N=I.attributes;if(!N){return G}if(!K){K=""}for(var J=0,L=(B.browser.msie?B.attrs:N).length;J<L;J++){var M=B.browser.msie?N[K+B.attrs[J]]:N[J];if(M&&M.nodeName.startWith(K)){var D=M.nodeName.substring(K.length),H=M.nodeValue;H=(H=="1"||H=="true")?1:((H=="0"||H=="false")?0:H);if(!G){G={}}G[D]=H}}return G},parseAxHash:function(G,I){if(!I){I="ax"}var H={};if(!G){return H}G=B.replaceLinkEqual(G,1);var D=G.indexOf(":"+I+":");while(D>-1){var M,L=G.indexOf(":",D+I.length+2);if(L>-1){M=G.substring(D+I.length+2,L)}else{L=D}D=G.indexOf(":"+I+":",L+1);var K=G.substring(L+1),J=K.indexOf(":");while(J>-1&&K.substring(J,J+2)==":/"){J=K.indexOf(":",J+1)}if(J>-1){K=K.substring(0,J)}if(K&&M){H[M]=K}}return H},getHead:function(){return document.getElementsByTagName("head")[0]},getHash:function(){return location.hash2||location.hash},setHash:function(G){var D=location;D.hash=G;if(D.hash2||decodeURIComponent(D.hash)!=decodeURIComponent(G)){D.hash2=G}},History:{previous:null,current:null,setCurrent:function(D){B.History.previous=B.History.current;B.History.current=D},prefixListener:{},check:function(){var J=B.getHash();var I=B.History.current;if(B.browser.msie&&B.History.frame){var L=B.replaceLinkEqual(J);if(L!=I&&L!="#"+I){B.History.write(document.title,L)}else{var K=B.History.frame,D=(K.contentWindow||K.contentDocument).document.body,G=B.replaceLinkEqual(D.innerText);if(G!=I&&"#"+G!=I){J=G;B.setHash(J)}}}var J=B.replaceLinkEqual(J);if(I!=null&&J!=I){B.History.setCurrent(J);for(var H in B.History.prefixListener){B.History.prefixListener[H]()}}},write:function(I,G){var H=B.History.frame,D=(H.contentWindow||H.contentDocument).document;D.open();D.write("<head><title>"+(I||"")+"</title></head><body>"+G+"</body>");D.close()},add:function(M,K,G,J){var H=B.replaceLinkEqual(B.getHash(),1);H=B.makeAxHash(H,M,K,G);var L=B.replaceLinkEqual(H),D=B.History.fireEvent("beforeadd",{hash:H,rhash:L,id:M,url:K,loc:K,prefix:G});if(D===false){return }else{if(typeof D=="string"){L=B.replaceLinkEqual(D)}}B.setHash(L);if((B.browser.msie&&B.browser.msieV<8)||B.browser.safari){var I=B.History.frame;if(!I){if(B.browser.msie){B.History.frame=I=document.createElement("iframe");I.style.display="none";I.src="javascript:true";document.body.appendChild(I);B.History.write(document.title,B.History.previous||"")}}if(B.browser.msie){B.History.write(J,L)}}B.History.setCurrent(L)}},Effect:{effects:{},add:function(G){if(!G){G={}}if(!G.id){G.id="document.body"}var D=B.Effect.effects[G.id];if(!D){D=[]}D.push(G);B.Effect.effects[G.id]=D},get:function(G){if(!G){G="document.body"}for(var D in B.Effect.effects){if(D==G||D=="*"){return B.Effect.effects[D]}}},use:function(M,L,G){try{var J=B.Effect.get(M);if(J){for(var I=0,D=J.length;I<D;I++){var K=(I==J.length-1)?G:null;if(!J[I]){continue}if(L){if(J[I].start){J[I].start(M,K)}}else{if(J[I].end){J[I].end(M,K)}}}}return !!J}catch(H){error(H)}}},Filter:{schema:{},add:function(G){if(!G){G={}}if(!G.id){G.id="document.body"}this.remove(G);var D=this.schema[G.id];if(!D){D=[]}D.push(G);this.schema[G.id]=D;return this},remove:function(G){if(!G){G={}}if(!G.id){G.id="document.body"}var D=this.schema[G.id];if(!D){return }B.arrayRemoveOf(D,G,1);this.schema[G.id]=D},clear:function(D){this.schema[D?D:"document.body"]=null},clearAll:function(){for(var D in this.schema){delete this.schema[D]}},getOptions:function(G,Q,H){var V=null,T=0;for(var J in this.schema){var O=this.schema[J];if(!O){continue}function S(W,d,b){var a=0;for(var Z=0,X=W.length;Z<X;Z++){var c=W[Z],Y=c&&d&&(c=="*"||((!b||b=="contain")&&d.indexOf(c)>-1)||(b=="start"&&d.startWith(c))||(b=="end"&&d.endWith(c)));if(Y&&a<c.length){a=c.length}}return a}for(var M=0,P=O.length;M<P;M++){var D=O[M].url instanceof Array?O[M].url:[O[M].url],U=S(D,G,O[M].urlType),N=O[M].query instanceof Array?O[M].query:[O[M].query],R=S(N,Q,O[M].queryType),L=O[M].join||O[M].joinLogic,I=L=="and"?U+R:(U>R?U:R);if(T<I){T=I;V={};for(var K in O[M]){V[K]=O[M][K]}V.filterSchemaId=J;if(H&&H.nodeName=="FORM"){if(H.attributes.method){V.method=H.attributes.method.nodeValue}V.form=H}}}}return V},parseStartUrl:function(D){return D.substring(0,D.indexOf("/",1))},getParentPath:function(){var G=location.pathname,D=G.lastIndexOf("/");return D>-1?G.substring(0,D+1):""},parseAxAttr:function(D){if(D.iswrapped){return }var G=B.parseAttr(D,F(""));if(G){if(D.nodeName=="FORM"){G.method=D.getAttribute("method");G.form=D}G.scope=D}return G},wrapAnchor:function(D,I){if(D.protocol=="mailto:"||D.protocol=="javascript:"){return }if(D.iswrapped){return }var H,M;if(D.nodeName=="FORM"){if(D.attributes.action){H=D.attributes.action.nodeValue}if(!H){H=location.href;var L=H.indexOf("#");H=L==-1?H:H.substring(0,L)}var G=document.createElement("a");G.href=H;var K=B.parseUri(G.href);H=K.path;M=K.query;delete G}else{if(!D.href){return }var K=B.parseUri(D.href);H=K.path;M=K.query}if(M&&M.startWith("?")){M=M.substring(1)}if(B.browser.opera||B.browser.msie){H="/"+H}var J=this.getOptions(H,M,D);if(!J&&!I){return }if(!J){J={}}if(!I){I={}}B.extend(I,J,1);if(I.type=="skip"||I.type=="nowrap"||(I.wrap!=null&&!I.wrap)||I.nowrap){return }if(!I.target&&D.attributes.target&&D.attributes.target.nodeValue!=""){return }if(I.id==null){return }this.wrapOps(D,I)},wrapSharp:function(H,N,D){if(H.iswrapped){return }var L=location.protocol,M=location.host,J=L+"//"+M+location.pathname+location.search+"#",G=H.nodeName=="FORM"?(H.attributes.action?H.attributes.action.nodeValue:0):H.href;if(G&&G.endWith("#")){if(!G.startWith(L)){G=L+"//"+M+G}if(D){var K=document.createElement("a");K.href=D+"#";D=K.href;delete K;if(!D.startWith(L)){var I=D.startWith("/")?"":B.parseUri(location.href).directory;D=L+"//"+M+I+D}}if(G==J||G==D){if(!N){N={}}H.sharp=N.sharp=1;this.wrapOps(H,N)}}},wrapOps:function(H,Q){if(!Q){return }H.options=Q;H.iswrapped=1;var O=document.createAttribute("iswrapped");O.nodeValue=1;H.setAttributeNode(O);var D=H.nodeName=="FORM"?"submit":"click",I="onprev"+D,G="on"+D;if(!Q.overwrite&&!E.OVERWRITE){if(B.browser.msie){if(H[G]){var P=document.createAttribute(I),M=H.attributes[G]||{};P.nodeValue=M.nodeValue||H[G];H.setAttributeNode(P)}}else{H[I]=H[G]}}if(D=="submit"){var L=H.getElementsByTagName("input");for(var K=0,J=L.length;K<J;K++){var N=L[K].type;if(N!="image"&&N!="submit"){continue}SRAX.addEvent(L[K],"click",N=="image"?function(W){if(!W){W=window.event}var S=W.target||W.srcElement,R=W.offsetX!=null?W.offsetX:W.pageX-S.offsetLeft+1,Y=W.offsetY!=null?W.offsetY:W.pageY-S.offsetTop+1,X="",T=S.getAttribute("name"),V=S.getAttribute("value"),U=T||"";if(U){U+="."}if(V&&T!=null){X+=T+"="+V+"&"}X="&"+X+U+"x="+R+"&"+U+"y="+Y;H.submitValue=X}:function(U){if(!U){U=window.event}var R=U.target||U.srcElement,S=R.getAttribute("name"),T=R.getAttribute("value"),V="";if(S!=null){V+="&"+S+"="+T}H.submitValue=V})}}H[G]=function(V){V=V||window.event||{};if(V.ctrlKey||V.shiftKey){return }try{var W=null;if(B.browser.msie){if(this.attributes[I]){var U=this.attributes[I].nodeValue;if(U){if(typeof U=="string"){if(!U.trim().startWith("function")){U="function(e){"+U+"}"}U=window["eval"]("SRAX.tmp="+U)}W=U.call(this,V)}}}else{if(this[I]&&(typeof this[I]=="function")){W=this[I](V)}}if(W===false){return false}}catch(X){error(X)}var S=this.options;if(this.nodeName=="FORM"&&this.enctype=="multipart/form-data"){if(S.multipart){S.multipart(this)}return true}else{if(!S.sharp){try{var R=this.getAttribute("action")||this.href;if(!R){R=location.href}if(this.nodeName=="FORM"&&(!S.method||S.method.toLowerCase()!="post")){var T=B.parseUri(R);R=R.replace("?"+T.query,"").replace("#"+T.anchor,"")}R=B.delHost(R);var Y=S.changer||S.urlChanger,Z=Y?Y(R,this):0;if(S.handler){S.handler(this,S)}else{window[S.type=="data"?"dax":"hax"](Z?Z:R,S)}}catch(X){error(X)}}}return false};if(D=="submit"){H.submit=H.onsubmit}},wrap:function(J,D){if(!J){J=document;for(var G in this.schema){this.wrap(G,D)}}var M,R=J.nodeName;if(R=="A"||R=="FORM"||R=="AREA"){M=[J]}else{J=B.get(J);if(!J){return }if(A(J)){J=document}var Q=B.collectionToArray,P="getElementsByTagName";M=Q(J[P]("a")).concat(Q(J[P]("form")),Q(J[P]("area")))}for(var I=0,K=M.length;I<K;I++){var H=M[I],O=H.attributes[F("wrap")],N=O==null||(O.nodeValue!="false"&&O.nodeValue!="0"&&O.nodeValue!=false);if(H.iswrapped){H.iswrapped=!!(H.onclick||H.onsubmit)}if(!B.isXss(H.href||H.action)&&!H.iswrapped&&N){var S=this.parseAxAttr(H),L=this.fireEvent("beforewrap",{el:H,ops:S,layer:J,url:D});if(L===false){continue}this.wrapSharp(H,S,D);this.wrapAnchor(H,S)}H=null}M=null;return this}},Include:{parse:function(G){if(G){G=B.get(G)}else{G=document}var D=G.getElementsByTagName("include");while(D.length>0){B.Include.apply(D[0])}},apply:function(I){I=B.get(I);var H=B.parseAttr(I),J=B.parseAttr(I,F(""));B.extend(H,J);if(H&&(H.url||H.src)){var D=document.createElement("a");if(!H.url){H.url=H.src}D.href=H.url;J=B.Filter.getOptions(D.pathname,D.search);delete D;if(J){B.extend(H,J,1)}var G=document.createElement("span");G.style.display="none";G.id=H.id=I.id?I.id:B.genId();A(G,1);I.parentNode.replaceChild(G,I);if(H.nohistory==null){H.nohistory=1}hax(H)}},fix:function(D){if(B.browser.msie&&/<include/i.test(D)){D='<div style="display:none">&nbsp;</div>'+D}else{if(B.browser.mozilla){D=D.replaceAll("<INCLUDE","<include")}}return D}},Uploader:function(J,L,K,H,G){if(typeof J=="object"&&J.nodeName!="FORM"){L=J.beforeStart;K=J.afterFinish;H=J.manual;G=J.html;J=from.form}var D,I=null,M=this;this.init=function(){J=B.get(J);var O=B.genId();J.setAttribute("target",O);D=document.createElement("div");D.innerHTML='<iframe style="display:none" src="javascript:true" onload="this._onload()" id="'+O+'" name="'+O+'"></iframe>';this.iframe=I=D.firstChild;this.setAfterFinish=setAfterFinish=function(P){I._onload=function(){var R=this.contentWindow||this.contentDocument,Q=R.document.body,S=Q[G?"innerHTML":(B.browser.msie?"innerText":"textContent")];P(S,M)}};if(K){var N=function(){setAfterFinish(K);if(H){J.submit()}};if(H){I._onload=N}else{N()}}else{I._onload=function(){}}J.appendChild(D);J.setAttribute("target",O);if(L){L(M)}};this.init();this.getIframe=function(){return I};this.cancel=function(){J.reset();M.destroy()};this.destroy=function(){I.src="javascript:true";SRAX.remove(D);D=null}},addEventsListener:function(D){if(D.prototype){D=D.prototype}D.on=function(G,K,L){if(!(instanceof Array)){G=[G]}for(var I=0,H=G.length;I<H;I++){var J=G[I];if(!L){this.un(J,K)}if(!this.events){this.events={}}if(!this.events[J]){this.events[J]=[]}this.events[J].push(K)}};D.un=function(G,L,J){if(!(instanceof Array)){G=[G]}for(var I=0,H=G.length;I<H;I++){var K=G[I];if(!L){return this.unall(K)}var M=this.events?this.events[K]:null;if(M){B.arrayRemoveOf(M,L,!J);this.events[K]=M}}};D.unall=function(G){if(this.events){if(G){delete this.events[G]}else{delete this.events}}};D.fireEvent=function(N,I){var G=this.events?this.events[N]:null;if(G){var L=null,H=[].slice.call(arguments);H.shift();H.push(N);for(var K=0;K<G.length;K++){try{var M=G[K].apply(this,H);if(L!==false&&M!=null){L=M}}catch(J){error(J)}}return L}};return D},addContainerListener:function(G){if(G.prototype){G=G.prototype}var H={},D={};G.register=function(J){var M=H[J.id];if(M){for(var L in M){for(var K=0,I=M[L].length;K<I;K++){J.on(L,M[L][K])}}}for(var L in D){var M=D[L];for(var K=0,I=M.length;K<I;K++){J.on(L,M[K])}}};G.on=function(I,M,L,O){if(!(instanceof Array)){I=[I]}for(var K=0,J=I.length;K<J;K++){var N=I[K];if(!H[N]){H[N]={}}if(!H[N][M]){H[N][M]=[]}H[N][M].push(L);if(this.thread[N]){this.thread[N].on(M,L,O)}}};G.onall=function(L,K,M){if(!D[L]){D[L]=[]}D[L].push(K);var J=this.thread;for(var I in J){if(J[I]){J[I].on(L,K,M)}}};G.unall=function(N,M,K){if(N){if(M){var I=D[N];B.arrayRemoveOf(I,M,!K);D[N]=I}else{D[N]=[]}}else{D={}}var L=this.thread;for(var J in L){if(L[J]){L[J].un(N,M,K)}}};G.un=function(P,I,K,R){if(!(instanceof Array)){P=[P]}for(var O=0,L=P.length;O<L;O++){var J=P[O];if(!K){if(J){if(H[J]){if(I){delete H[J][I]}else{delete H[J]}}}else{H={}}var Q={};if(J){Q[J]=this.thread[J]}else{Q=this.thread}for(var N in Q){if(Q[N]){Q[N].unall(I)}}}else{var M=H[J]?H[J][I]:null;if(M){B.arrayRemoveOf(M,K,!R);H[J][I]=M}if(this.thread[J]){this.thread[J].un(I,K,R)}}}};G.fireEvent=function(K,J,I){if(this.thread[K]){return this.thread[K].fireEvent(J,I)}};return G},Html:{thread:{},ASYNCHRONOUS:1,storage:[]},Data:{thread:{}},playsound:function(H,D){var I=document.createElement("div");if(D==null){D=10}I.setAttribute("style","position:absolute;top:-1000px;left:-1000px");if(window.ActiveXObject){var G=document.createElement("bgsound");G.src=H;I.appendChild(G)}else{I.innerHTML='<embed src="'+H+'" loop="false" autostart="true" hidden="true" mastersound>'}document.body.appendChild(I);if(D>0){setTimeout(function(){I.firstChild.src="";document.body.removeChild(I)},D*1000)}},enableUBR:function(){netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead")},Loader:{show:function(){B.showLoading(1,B.getLoader())},hide:function(){B.showLoading(0,B.getLoader())}},parseUri:function(K,H){var D={strictMode:0,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?://((?:(([^:@]*):?([^:@]*))?@)?([^:/?#]*)(?::(d*))?))?((((?:[^?#/]*/)*)([^?#]*))(?:?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?://)?((?:(([^:@]*):?([^:@]*))?@)?([^:/?#]*)(?::(d*))?)(((/(?:[^?#](?![^?#/]*.[^?#/.]+(?:[?#]|$)))*/?)?([^?#/]*))(?:?([^#]*))?(?:#(.*))?)/}};var L=H?H:D,J=L.parser[L.strictMode?"strict":"loose"].exec(K);for(var G=0,I={};G<14;G++){I[L.key[G]]=J[G]||""}I[L.q.name]={};I[L.key[12]].replace(L.q.parser,function(N,M,O){if(M){I[L.q.name][M]=O}});return I},showMessage:function(G,D,H){if(D==0){return }alert("Error "+D+" : "+G+"n"+H)},replaceHtml:function(H,G){var D=(typeof H==="string"?document.getElementById(H):H);var I=D.cloneNode(false);I.innerHTML=G;D.parentNode.replaceChild(I,D);return I},addTo:function(G,H){var D=H?B.get(H):document.body;G=G.join?G.join(""):G;if(!D){return warn("Warning => addTo : element = "+H+" not found, html = "+G.trim().substring(0,20)+"...")}var J=document.createElement("div");J.innerHTML=G;var I=A(D);while(J.childNodes.length>0){if(I){D.parentNode.insertBefore(J.childNodes[0],D)}else{D.appendChild(J.childNodes[0])}}return D},writeTo:function(G,H){var D=H?B.get(H):document.body;G=G.join?G.join(""):G;if(!D){return warn("Warning => writeTo : element = "+H+" not found, html = "+G.trim().substring(0,20)+"...")}if(A(D)){B.addTo(G,D)}else{D.innerHTML=G}return D},remove:function(D){D=D instanceof Array?D:[D];for(var H=0,G=D.length;H<G;H++){var I=B.get(D[H]);if(I){I.parentNode.removeChild(I)}}},replace:function(G,D){G=B.get(G);D=B.get(D);return D.parentNode.replaceChild(G,D)},genId:function(){return F("genid"+E.sprt)+(B.lastGenId?++B.lastGenId:B.lastGenId=1)}});var E=B.Default;var F=function(D){return E.prefix+E.sprt+D};var A=B.placeMark=function(H,D){var G=F("place"+E.sprt+"mark");if(H&&D!=null){H[G]=D}return H?(D==null?H[G]:H):G};var C=function(D){return'<span id="'+D+'" style="display:none"><!--place of script # '+D+"//--></span>"};B.addEventsListener(B.Filter);B.escape=B.encode;B.appendScript=B.addScript;B.appendLink=B.addLink;B.appendStyle=B.addStyle;arrayIndexOf=B.arrayIndexOf;arrayRemoveOf=B.arrayRemoveOf})(SRAX);SRAX.init()};
?>
Онлайн: 2
Реклама