if(!window.SRXRNM||window.SRXRNM.TYPE!="full"){function log(){SRXRNM.debug("log",arguments)}function info(){SRXRNM.debug("info",arguments)}function error(){SRXRNM.debug("error",arguments)}function warn(){SRXRNM.debug("warn",arguments)}function id(A){return SRXRNM.get(A)}function back(A){SRXRNM.Html.thread[A].go(-1)}function forward(A){SRXRNM.Html.thread[A].go(1)}function go(A,B){SRXRNM.Html.thread[B].go(A)}String.prototype.trim=function(){return this.replace(/\s*((\S+\s*)*)/,"$1").replace(/((\s*\S+)*)\s*/,"$1")};String.prototype.replaceAll=function(B,A){return this.split(B).join(A)};String.prototype.endWith=function(B,A){return A?(this.toLowerCase().substring(this.length-B.length,this.length)==B.toLowerCase()):(this.substring(this.length-B.length,this.length)==B)};String.prototype.startWith=function(B,A){return A?(this.toLowerCase().substring(0,B.length)==B.toLowerCase()):(this.substring(0,B.length)==B)};function abort(A){if(SRXRNM.Html.thread[A]){SRXRNM.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=SRXRNM.Html.thread[B.id]?SRXRNM.Html.thread[B.id]:new SRXRNM.HTMLThread(B.id);A.setOptions(B,1);if(SRXRNM.Html.ASYNCHRONOUS){A.request()}else{SRXRNM.Html.storage.push(A.id);if(SRXRNM.Html.storage.length==1){A.request()}}return A}function get(B,D,C,A,E){if(typeof D=="object"){return hax(B,D)}return 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=SRXRNM.Data.thread[B.id]?SRXRNM.Data.thread[B.id]:new SRXRNM.DATAThread(B.id);A.setOptions(B,1).request();return A}function abortData(A){if(SRXRNM.Data.thread[A]){SRXRNM.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.SRXRNM){FLAX=SRXRNM={}}SRXRNM.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:"SRXRNM v1.0.3 build 22",TYPE:"full",Default:{prefix:"ax",sprt:":",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(J,G){var K=window.console;if(K&&K[J]){try{K[J].apply(K,G)}catch(I){K[J](G.length==1?G[0]:G)}}else{if(window.runtime){var F=[J+": "+G[0]];for(var H=1,D=G.length;H<D;H++){F.push(G[H])}runtime.trace(F)}}},getTime:function(){return new Date().getTime()},LIST_NO_CACHE_SCRIPTS:[],LIST_NO_LOAD_SCRIPTS:[],LIST_NO_LOAD_LINKS:[],init:function(){var G=navigator.userAgent.toLowerCase();B.browser={webkit:/webkit/.test(G),safari:/safari/.test(G),opera:/opera/.test(G),msie:/msie/.test(G)&&!/opera/.test(G),mozilla:/mozilla/.test(G)&&!/(compatible|webkit)/.test(G),air:/adobeair/.test(G)};if(B.browser.msie){for(var F=0,D=[8,7,6],H=D.length;F<H;F++){if(new RegExp("msie "+D[F]).test(G)){B.browser.msieV=D[F]}}}var H="addEventsListener";B[H](B.HTMLThread);B[H](B.History);B[H](B.DATAThread);H="addContainerListener";B[H](B.Html);B[H](B.Data);B.LoadUnloadContainer={};B.scriptsCache=[[],[]];B.scriptsTemp=[[],[]];document.write('<style type="text/css">h1{fil'+'ter:prog'+'id:DXI'+'mageTrans'+'form.Mic'+'rosoft.Sh'+'adow(color=#88'+'8888, dire'+'ction=135);text-s'+'hadow:4px 4px 2px #CCC;}.first{text-s'+'hadow:-2px 2px 2px #000;fil'+'ter:pr'+'ogid:DX'+'ImageTra'+'nsform.Mic'+'rosoft.Sh'+'adow(color=#FFF, dire'+'ction=225);}h1.first{text-sha'+'dow:-6px 6px 4px #000;}.men'+'u_top A{tex'+'t-sh'+'adow: -1px 1px 3px #FFF;}</style>');B.linksCache=[];B.History.prefixListener.ax=B.go2Hax;B.readyHndlr=[];B.onReady(function(){if(C.USE_FILTER_WRAP){B.Filter.wrap()}setInterval(B.History.check,200);B.initCPLNLS();B.initCPLNLL();if(B.browser.opera){var I=document.createElement("img");I.setAttribute("style","position:absolute;left:-1px;top:-1px;opacity:0;width:0px;height:0px");I.setAttribute("alt","");I.setAttribute("src",'javascript:location.href="javascript:SRXRNM.xssLoading=0;SRXRNM.History.check()"');document.body.appendChild(I)}B.Include.parse()});document._write=document.write;document._writeln=document.writeln;B.write=function(I){document._write(I)};B.writeln=function(I){document._writeln(I)}},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 G=0,D=B.readyHndlr.length;G<D;G++){try{B.readyHndlr[G]()}catch(F){error(F)}}B.readyHndlr=null},addEvent:function(G,D,F){if(G.attachEvent){G.attachEvent("on"+D,F)}else{G.addEventListener(D,F,false)}},delEvent:function(G,D,F){if(G.detachEvent){G.detachEvent("on"+D,F)}else{G.removeEventListener(D,F,false)}},get:function(D){return typeof D=="string"?document.getElementById(D):D},clearLNLS:function(){B.LIST_NO_LOAD_SCRIPTS=[]},initCPLNLS:function(G){if(G){B.clearLNLS()}var I=document.getElementsByTagName("head")[0],F=I.getElementsByTagName("script");for(var H=0,D=F.length;H<D;H++){if(!F[H].src){continue}B.LIST_NO_LOAD_SCRIPTS.push(F[H].src)}},clearLNLL:function(){B.LIST_NO_LOAD_LINKS=[]},initCPLNLL:function(F){if(F){B.clearLNLL()}var I=document.getElementsByTagName("head")[0],G=I.getElementsByTagName("link");for(var H=0,D=G.length;H<D;H++){if(!G[H].href){continue}B.LIST_NO_LOAD_LINKS.push(G[H].href)}},linkEqual:{},replaceLinkEqual:function(F,D){var I="replaceAll",H=B.linkEqual;if(!D){F=F[I]("?","[~q~]")}for(var G in H){F=D?F[I](H[G],G):F[I](G,H[G])}if(D){F=F[I]("[~q~]","?")}return F},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(F){}}}}},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){},DATAThread:function(J){var H,G,I=this,F=this.options={};this.inprocess=0;this.id=J;B.Data.thread[J]=this;B.Data.register(this);this.repeat=function(K){F.params=K;I.request()};this.setOptions=function(L,K){if(!L.url&&L.src){L.url=L.src}if(!L.cb&&L.callback){L.cb=L.callback}if(L.cbo==null&&L.callbackOps!=null){L.cbo=L.callbackOps}if(L.anticache==null&&L.nocache!=null){L.anticache=L.nocache}if(K){F={}}B.extend(F,L);if(F.async==null){F.async=true}F.url=B.delHost(F.url);this.options=F;return I};this.getOptions=function(){return F};function D(N){if(!N||!N.readyState){N=H}try{if(N.readyState==4){I.inprocess=0;B.showLoading(I.inprocess,I.getLoader());var K=N.isAbort?-1:N.status,Q=(K>=200&&K<300)||K==304||(K==0&&location.protocol=="file:"),P=N.responseText,L=N.responseXML,O={xhr:N,url:F.url,id:J,status:K,success:Q,cbo:F.cbo,callbackOps:F.cbo,options:F,text:P,xml:L,thread:I,responseText:P,responseXML:L,time:B.getTime()-G};I.fireEvent("response",O);if(K>-1&&B.DaxPreprocessor(O)!==false&&F.cb){F.cb(O,J,Q,F.cbo);if(C.DEBUG_AJAX){log("callback id:"+J)}}if((F.destroy!=null)?F.destroy:C.DAX_AUTO_DESTROY){I.destroy()}}}catch(M){error(M);I.fireEvent("exception",{xhr:N,url:F.url,id:J,exception:M,options:F});I.inprocess=0;B.showLoading(I.inprocess,I.getLoader());if((F.destroy!=null)?F.destroy:C.DAX_AUTO_DESTROY){I.destroy()}}}this.isProcess=function(){return I.inprocess};this.request=function(){var L=F.method?F.method:(F.form?F.form.method:"get"),R=(L&&L.toLowerCase()=="post")?"post":"get";try{var O={url:F.url,id:J,options:F,xhr:I};if(I.fireEvent("beforerequest",O)!==false){G=B.getTime();var K=B.createQuery(F.form);if(F.params){if(K!=""&&!F.params.startWith("&")){K+="&"}K+=F.params}if(R!="post"&&K!=""){if(F.url.indexOf("?")==-1){F.url+="?"+K}else{F.url+=((F.url.endWith("?")||F.url.endWith("&"))?"":"&")+K}}if(I.inprocess){I.abort()}I.inprocess=1;if(F.text||F.xml){D({readyState:4,status:F.status==null?200:F.status,responseText:F.text,responseXML:F.xml});F.text=F.xml=null}else{if(!H){H=B.getXHR()}try{H.onprogress=function(S){I.fireEvent("progress",{id:J,xhr:I,event:S,position:S.position,total:S.totalSize,percent:Math.round(100*S.position/S.totalSize)})}}catch(Q){}var N=(B.browser.msie&&location.protocol=="file:"&&F.url.startWith("/")?"file://":"")+F.url;if(F.user){H.open(R.toUpperCase(),N,F.async,F.user,F.pswd)}else{H.open(R.toUpperCase(),N,F.async)}H.onreadystatechange=F.async?D:function(){};var M="setRequestHeader";H[M]("AJAX_ENGINE","Fullajax");if(F.anticache!=null?F.anticache:C.DAX_ANTICACHE){H[M]("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT")}H[M]("HTTP_X_REQUESTED_WITH","XMLHttpRequest");H[M]("X-Requested-With","XMLHttpRequest");if(F.headers){for(var P in F.headers){H[M](P,F.headers[P])}}if(R=="post"){H[M]("Content-Type","application/x-www-form-urlencoded; Charset="+C.CHARSET)}B.showLoading(I.inprocess,I.getLoader());H.send((R=="post")?K:null);if(!F.async){D()}}if(C.DEBUG_AJAX){log(R+" "+F.url+" params:"+K+" id:"+J)}I.fireEvent("afterrequest",O)}}catch(Q){I.abort();error(Q);throw Q}};this.getLoader=function(){if(!I.loader){I.loader=F.loader==null?B.getLoader(J,1):B.get(F.loader)}return I.loader};this.abort=function(){I.inprocess=0;if(!H){return }try{H.isAbort=1;H.abort()}catch(K){}H=null;B.showLoading(0,I.getLoader())};this.destroy=function(){B.Data.thread[J]=null;delete B.Data.thread[J]}},showLoading:function(D,H){var F=H?H.style:0;if(F){if(D){if(F.visibility){F.visibility="visible"}else{F.display="block"}}else{function G(K,I){for(var J in K){if(K[J].getLoader()!=H){continue}if(K[J]&&K[J].isProcess()){return 1}}}if(!G(B.Data.thread,1)&&!G(B.Html.thread)){if(F.visibility){F.visibility="hidden"}else{F.display="none"}}}}},getLoader:function(G,D){var F=B.get;if(G){G=F((typeof G=="string"?G:G.id)+C.loaderSufix)}return G||F(D?C.loader2:C.loader)||F(D?C.loader:C.loader2)},encode:encodeURIComponent,decode:decodeURIComponent,createQuery:function(L,D){L=B.get(L);if(!L){return""}if(!D){D={}}var N=[],M=[],T=B.encode,G=L.getElementsByTagName("input");for(var R=0;R<G.length;R++){var F=G[R],H=F.type.toLowerCase(),W=F.name?F.name:F.id,O=T(F.value);if(!W){continue}W=T(W);switch(H){case"text":case"password":case"hidden":case"button":N.push(W);M.push(O);break;case"checkbox":case"radio":if(F.checked){N.push(W);M.push((O==null||O=="")?F.checked:O)}break}}var V=L.getElementsByTagName("select");for(var R=0;R<V.length;R++){var P=V[R],H=P.type.toLowerCase(),W=P.name?P.name:P.id;if(!W||P.selectedIndex==-1){continue}if(H=="select-multiple"){for(var Q=0,S=P.options.length;Q<S;Q++){if(P.options[Q].selected){N.push(W);M.push(T(P.options[Q].value))}}}else{N.push(T(W));M.push(T(P.options[P.selectedIndex].value))}}var K=L.getElementsByTagName("textarea");for(var R=0;R<K.length;R++){var J=K[R],W=J.name?J.name:J.id;if(!W){continue}N.push(T(W));M.push(T(J.value))}var I=[];for(var R=0,S=N.length;R<S;R++){if(D.skipEmpty&&M[R]==""){continue}I.push(N[R]+"="+M[R])}var U=I.join("&")+(L.submitValue||"");L.submitValue=null;return U},applyParams:function(I,J){var L=I.split(" ");for(var K=L.length-1,M=0;K>=M;K--){var F=L[K],N=F.indexOf("=");if(N>-1){var H=B.indexOfAttrMarks(F,N+1),D=F.substring(0,N).trim(),G=F.substring(H[0]+1,H[1]).trim();J[D]=G}else{if(F.indexOf("<")==-1&&F.indexOf(">")==-1){J[F]=F}}}return J},indexOfAttrMarks:function(G,I){if(I==null){I=0}var F="'",D=G.indexOf(F,I),H=G.indexOf('"',I);if(H>-1&&(H<D||D==-1)){D=H;F='"'}if(D>-1){H=G.indexOf(F,D+1)}else{D=G.indexOf("=");D++;while(G.substring(D).startWith(" ")){D++}G=G.replaceAll(">","");H=G.length-1;while(G.substring(H,1).endWith(" ")){H--}D--;H++}return[D,H]},getParam:function(H,F){var D=H.toLowerCase().indexOf(" "+F);if(D>-1){var G=B.indexOfAttrMarks(H,D+F.length+1);return H.substring(G[0]+1,G[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(K){if(K.indexOf("SRXRNM.init()")>-1){K='<script type="text/javascript"><\/script>'}var G=document.createElement("script"),D=K.toLowerCase().indexOf("<script"),L=K.indexOf(">",D+1),J=K.toLowerCase().lastIndexOf("<\/script>");if(D>-1&&L>-1){var I=K.substring(D,L+1);B.applyParams(I,G)}if(G.src){G.src=B.entitiesConvertor(G.src)}if(J>-1){K=K.substring(L+1,J)}else{K=""}var H=(G.src?G.src:"").trim().toLowerCase(),F=H.startWith("javascript:");if(H=="//:"||F){if(F){K+="\n"+H.substring(11)}G.src=""}if(K.length>0){if(B.browser.msie){G.text=K}else{G.appendChild(document.createTextNode(K))}}if(!G.id){G.id=G.src}return G},addCss:function(D,F){if(D.indexOf("{")>-1){B.addStyle("<style>"+D+"</style>",F,F)}else{B.addLink('<link rel="stylesheet" href="'+D+'">',F,F)}},addStyle:function(Q,P,K){Q=Q.toLowerCase();var M=Q.indexOf("<style"),L=Q.indexOf(">",M+1),J=Q.indexOf("</style>",L+1),H=Q.substring(M,L+1),I=B.applyParams(H,{}),O=I[E("skip")];if(O=="true"||O=="1"){return }Q=Q.substring(L+1,J);M=Q.indexOf("@import ");while(M>-1){L=Q.indexOf("(",M+1);J=Q.indexOf(")",L+1);var F=Q.substring(L+1,J);F='<link rel="stylesheet" type="text/css" href="'+F+'"/>';B.addLink(F,P,K);Q=Q.substring(0,M)+Q.substring(J+1);M=Q.indexOf("@import ")}if(K&&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 G=document.createTextNode(Q);D.appendChild(G)}}var N=document.getElementsByTagName("head")[0];N.appendChild(D);if(C.DEBUG_STYLE){log("Style "+Q)}}},sealStyle:function(G,J){J=J.trim();var D=-1,I=G.indexOf("{"),H=((J.startWith(".")||J.startWith("#"))?"":"#")+J+" ",F="";while(I>-1){F+=H+G.substring(D+1,I).trim().replaceAll(",",","+H);D=G.indexOf("}",I);if(D>-1){F+=G.substring(I,D+1)}I=D==-1?-1:G.indexOf("{",D)}return F},addLink:function(P,N,H){P=P.toLowerCase();var J=P.indexOf("<link"),I=P.indexOf(">",J+1);if(J>-1&&I>-1){var G=P.substring(J,I+1),M=document.createElement("link");B.applyParams(G,M);if(M.href){M.href=B.entitiesConvertor(M.href)}var O=M[E("skip")];if(O=="true"||O=="1"){return }if(M.href&&M.type=="application/rss+xml"){}var D=(H&&typeof N=="string")?(N+":"+M.href):M.href;if(B.indexOfCacheSrc(B.linksCache,D)>-1){var F=M[E("repeat")];if(!C.LINK_REPEAT||F=="false"||F=="0"){return }}else{B.linksCache.push(D)}if(B.indexOfCacheSrc(B.LIST_NO_LOAD_LINKS,D)>-1){return }if(H&&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(K){error("error seal "+M.href)}}if(document.createStyleSheet){document.createStyleSheet(M.href)}else{var L=document.getElementsByTagName("head")[0];L.appendChild(M)}if(C.DEBUG_LINK){log("append LINK "+M.href)}}},isHTMLComment:function(F){var D=F.lastIndexOf("<!--"),G=F.indexOf("-->",D+4);return(D>-1&&G==-1)},isHTML:function(F){F=F.toLowerCase();function D(H){var G=F.lastIndexOf("<"+H),K=F.indexOf("</"+H+">",G+1),J=F.indexOf(">",G+1),I=F.indexOf("/>",G+1);return !(G>-1&&J>-1&&K==-1&&I!=J+1)}return D("script")&&D("style")},relativeCorrection:function(J,F,G){if(F.indexOf("/")==-1){F=location.pathname}var D=F.lastIndexOf("/");F=F.substring(0,D+1);D=J.toLowerCase().indexOf(" "+G);while(D>-1){var H=B.indexOfAttrMarks(J,D+2);if(B.isHTML(J.substring(0,D+2))&&H[0]>-1&&H[1]>-1){var I=J.substring(H[0]+1,H[1]);if(!I.startWith("/")&&!I.startWith("#")&&B.parseUri(I).protocol==""){J=J.substring(0,H[0]+1)+F+J.substring(H[0]+1)}}D=J.toLowerCase().indexOf(G,D+2)}return J},arrayIndexOf:function(D,G,I){var H=-1;for(var F=(I||0);F<D.length;F++){if(D[F]==G){H=F;break}}return H},toSource:function(G){switch(typeof G){case"function":return G.toString();case"string":return'"'+G.replaceAll('"','\\"')+'"';case"object":if(G==null){return null}var H="";if(G instanceof Array){for(var F=0,D=G.length;F<D;F++){H+=","+B.toSource(G[F])}if(H.length>0){H=H.substring(1)}return"["+H+"]"}for(var F in G){H+=","+F+":"+B.toSource(G[F])}return"{"+(H.length>0?H.substring(1):H)+"}"}return G},arrayRemoveOf:function(D,G,H){if(H){G=B.toSource(G)}for(var F=0;F<D.length;F++){if((H&&G==B.toSource(D[F]))||G==D[F]){D.splice(F--,1)}}return D},collectionToArray:function(G){var F=[];for(var H=0,D=G.length;H<D;H++){F[H]=G[H]}return F},indexOfCacheSrc:function(D,G){var F=B.arrayIndexOf(D,G);if(F==-1){G=G.startWith(location.protocol)?G.replace(location.protocol+"//"+location.host,""):location.protocol+"//"+location.host+G;F=B.arrayIndexOf(D,G)}return F},parsingText:function(S){if(!S){S={}}var I=S.owner;if(B.Html.fireEvent(S.id,"beforeload",S)===false){I.inprocess=0;return }var Q=S.text,P=S.id,F=S.url,R=S.add,K="relativeCorrection";Q=B.Include.fix(Q);if(S.rc==null?C.RELATIVE_CORRECTION:S.rc){Q=B[K](Q,F,"src");Q=B[K](Q,F,"href");Q=B[K](Q,F,"action")}Q=B.parsingLinkAndStyle(Q,P,S.seal);Q=B.parsingFrameset(Q);K="substring";var G=Q.toLowerCase().indexOf("<head>"),H="";if(G>-1){H+=Q[K](0,G);Q=Q[K](G)}else{H=Q;Q=""}var D=Q.toLowerCase().indexOf("</head>"),L="";if(D>-1){L+=Q[K](D+7);Q=Q[K](0,D+7)}var O=B.Html.thread[P],M=O?O.getOptions().notitle:0,J=B.parsingTitle(Q,P,M);Q=H+J.text+L;if(!R){Q=B.parsingLoadUnload(Q,P)}var N=B.parsingScript(Q,P,I&&I[E("noax")]);new B.loadHtml(P,N.scripts,N.html,F,R,I,S.onload,S.scope,J.title)},parsingLoadUnload:function(I,L){var H,G,F=I.toLowerCase().indexOf("<body");if(F>-1){var K=I.indexOf(">",F+1);if(K>-1){var D=I.substring(F,K+1);H=B.getParam(D,"onload");G=B.getParam(D,"onunload");I=I.substring(0,F)+D.replaceAll("load","")+I.substring(K+1)}}var J="LoadUnloadContainer";if(!B[J][L]){B[J][L]={}}B[J][L].onload=H;B[J][L].onunload=B[J][L].nextonunload;B[J][L].nextonunload=G;return I},parsingTitle:function(I,K,F){var G=I.toLowerCase(),D=G.indexOf("<title>"),J=G.indexOf("</title>",D+1),H;while(D>-1&&J>-1){if(!B.isHTMLComment(I.substring(0,D))&&!H){H=I.substring(D+7,J);if(!F){B.titleChange(H,K)}}I=I.substring(0,D)+I.substring(J+8);G=I;D=G.indexOf("<title>",D+1);J=G.indexOf("</title>",D+1)}return{text:I,title:H}},titleChange:function(F,G){var D=document.title;if(B.Html.fireEvent(G,"beforetitlechange",{oldTitle:D,newTitle:F})!==false){document.title=F;B.Html.fireEvent(G,"titlechange",{oldTitle:D,newTitle:F});return F}return false},parsingFrameset:function(I){var D=I.toLowerCase().indexOf("<frameset");if(D>-1){var J=I.toLowerCase().indexOf(">",D),H=I.toLowerCase().indexOf("</frameset>");if(J>-1&&H>-1){var F=I.substring(D,H+11),G=B.genId();F="<iframe style='height:100%;width:100%;border:0' href='javascript:true' id='"+G+"'></iframe><script>var obj = SRXRNM.get('"+G+"');var doc = obj[obj.contentWindow ? 'contentWindow' : 'contentDocument'].document;doc.open();doc.write('"+F.replaceAll("\n","").replaceAll("\r","").trim()+"');doc.close()<\/script>";I=I.substring(0,D)+F+I.substring(H+11)}}return I},parsingLinkAndStyle:function(J,L,I){var F=J.toLowerCase().indexOf("<link"),H=J.toLowerCase().indexOf("<style"),G="",D=-1,K=-1;if((F<H&&F>-1)||H==-1){D=F;K=J.indexOf(">",D+1)}else{D=H;K=J.toLowerCase().indexOf("</style>",D+1)}while(D>-1&&K>-1){if(D>0){G+=J.substring(0,D)}if((F<H&&F>-1)||H==-1){if(!B.isHTMLComment(J.substring(0,D))){B.addLink(J.substring(D,K+1),L,I)}J=J.substring(K+1)}else{if(!B.isHTMLComment(J.substring(0,D))){B.addStyle(J.substring(D,K+8),L,I)}J=J.substring(K+8)}F=J.toLowerCase().indexOf("<link");H=J.toLowerCase().indexOf("<style");if((F<H&&F>-1)||H==-1){D=F;K=J.indexOf(">",D+1)}else{D=H;K=J.toLowerCase().indexOf("</style>",D+1)}}if(J.length>0){G+=J}return G},parsingScript:function(R,H,J){var F=R.toLowerCase(),Q=F.indexOf("<script"),O=F.indexOf("<\/script>",Q+1),S=9,N=R.indexOf(">",Q+1),L=R.indexOf("/>",Q+1);if(N>-1&&L!=-1&&N==L+1){O=L;S=2}var P=[],G=[],D=0;while(Q>-1&&O>-1){if(Q>0){P.push(R.substring(0,Q))}var X=B.makeScript(R.substring(Q,O+S));if(J){X[E("noax")]=1}R=R.substring(O+S);F=R.toLowerCase();Q=F.indexOf("<script");O=F.indexOf("<\/script>",Q+1);S=9;N=R.indexOf(">",Q+1);L=R.indexOf("/>",Q+1);if(N>-1&&L!=-1&&N==L+1){O=L;S=2}if(P.length==0||!B.isHTMLComment(P.join(""))){if(true||R.toLowerCase().indexOf("<body")==-1){if(P.length==0||P[P.length-1].indexOf("_place_of_script_")==-1){P.push('<span id="'+H+"_place_of_script_"+D+'" style="display:none"><!--place of script # '+D+"//--></span>");D++}X.place=H+"_place_of_script_"+(D-1);var W=B.get(X.place);if(W){W.id+="old"}}var T=X[E("skip")];if(T=="true"||T=="1"){continue}if(X.src){if(X.src.indexOf("fullajax.js")>-1||B.indexOfCacheSrc(B.LIST_NO_LOAD_SCRIPTS,X.src)>-1){continue}var K=B.indexOfCacheSrc(B.scriptsCache[0],X.src);if(K>-1){var M=X[E("repeat")];if((M==null||(M!="false"&&M!="0"))&&C.SCRIPT_SRC_REPEAT_APPLY){B.scriptsCache[1][K].place=X.place;X=B.cloneScript(B.scriptsCache[1][K])}else{X=B.makeScript('<script type="text/javascript">//no repeat '+X.src+"<\/script>")}}else{try{if(B.Data.thread[X.src]&&B.Data.thread[X.src].isProcess()){X=B.Data.thread[X.src].options.cbo}else{if(C.SCRIPT_NOAX||X[E("noax")]){X.xss=1}else{new B.startLoadScript(X)}}}catch(V){error(V)}}}var U=E("head"),I=X[U];F=R.toLowerCase();X[U]=I==null?F.indexOf("<head>")==-1&&F.indexOf("</head>")>-1:(I=="1"||I=="true");G.push(X)}}if(R.length>0){P.push(R)}return{scripts:G,html:P}},finishLoadScript:function(J,K,F,D){var I=F?J.responseText:"",G=B.makeScript('<script type="text/javascript">'+I+"<\/script>");G.place=D.place;G.id=D.id?D.id:K;var H=B.indexOfCacheSrc(B.scriptsTemp[0],K);if(H==-1){H=B.scriptsTemp[0].length}B.scriptsTemp[0][H]=K;B.scriptsTemp[1][H]=G;if(C.USE_SCRIPT_CACHE&&B.indexOfCacheSrc(B.LIST_NO_CACHE_SCRIPTS,K)==-1&&!D[E("nocache")]){H=B.indexOfCacheSrc(B.scriptsCache[0],K);if(H==-1){H=B.scriptsCache[0].length}B.scriptsCache[0][H]=K;B.scriptsCache[1][H]=B.cloneScript(G)}},isXss:function(D){D=(D||"").toLowerCase();return(D.startWith("http:")||D.startWith("https:"))&&!D.startWith(B.host)},startLoadScript:function(D){try{var G=D.src;if(B.isXss(G)){throw"xss"}dax(G,{cb:B.finishLoadScript,id:G,cbo:D,anticache:D[E("nocache")]})}catch(F){if(!D.id){D.id=D.src}D.xss=D.src}},cloneScript:function(F,H){if(!H){H={}}var G=document.createElement("script"),L=["src","type","language","defer","text","id","place",E("repeat"),E("noax"),E("skip"),E("head"),E("noblock")];for(var J=0,D=L.length;J<D;J++){try{var K=F[L[J]];if(H[L[J]]!=null){K=H[L[J]]}if(K!=null&&K!=""){G[L[J]]=K}}catch(I){}}return G},serialApplyScripts:function(D,I,F,H){var G=0;this.checkload=function(){if(G>=D.length){B.docWriteTraper.apply(I);if(!B.xssLoading&&!(G>=1?(D[G-1].inprocess||D[G-1].countproc):0)){return H?H():null}}else{if(D[G].src){var K=B.indexOfCacheSrc(B.scriptsTemp[0],D[G].src);if(K>-1&&!(D[G][E("noax")]&&D[G][E("nocache")])){var J=D[G].place;D[G]=B.cloneScript(B.scriptsTemp[1][K]);D[G].place=J}}if(!D[G].src&&(G>0?!D[G-1].inprocess:1)){new B.addScript(D[G],I,F);B.docWriteTraper.apply(I);G++}else{if(D[G].src&&!B.xssLoading){if(D[G].loaded){B.docWriteTraper.apply(I);G++}else{if(D[G].xss){D[G].xss=0;new B.addScript(D[G],I,F)}}}}}var L=this;this.recall=function(){L.checkload()};setTimeout(this.recall,10)};this.checkload()},loadHtml:function(P,I,L,D,Q,F,H,R,O){B.removeScripts(I);var G={id:P,scripts:I,html:L,url:D,add:Q,owner:F,scope:R,title:O};B.Html.fireEvent(P,"unload",G);if(!Q){B.execUnloadBody(P)}var N=[],M=[];for(var J=0;J<I.length;J++){var K=I[J][E("head")]?N:M;K.push(I[J])}new B.serialApplyScripts(N,P,D,function(){B[B.Model2Blocks[P]?"paintHtml2":"paintHtml"](L.join(""),P,D,Q);if(!Q){B.Effect.use(P)}new B.serialApplyScripts(M,P,D,function(){if(C.USE_FILTER_WRAP){var U=B.Model2Blocks[P];if(U){for(var V in U){var T=B.get(U[V]);if(T){B.Filter.wrap(T,D)}}}else{B.Filter.wrap(P,D)}}B.Include.parse();if(F){F.inprocess=0;if(F.countproc){F.countproc--}}if(!Q){B.execLoadBody(P,D);B.execFunc(H,[G],R)}B.Html.fireEvent(P,"load",G);var S=B.Html.thread[P];if(!B.Html.ASYNCHRONOUS&&B.Html.storage[0]==P){B.Html.storage.splice(0,1);if(B.Html.storage.length>0){S.request()}}if(S){B.showLoading(0,S.getLoader())}})})},execLoadBody:function(F,D){if(B.LoadUnloadContainer[F].onload){B.parsingText({id:F,url:D,text:'<script id="'+E("script"+C.sprt+"temp")+'" type="text/javascript">'+B.LoadUnloadContainer[F].onload+"<\/script>",add:1})}if(B.isCOL){window._onload()}},captureOnLoad:function(){window.onloadHandlers=[];window._onload=function(){var F=window.onloadHandlers;window.onloadHandlers=[];F.push(window.onload);window.onload=null;for(var H=0,D=F.length;H<D;H++){try{if(F[H]){F[H]()}}catch(G){error(G)}}};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(F,G,D){if(F=="load"){window.onloadHandlers.push(G)}else{window._addEvent(F,G,D)}};B.isCOL=1},execUnloadBody:function(H,F){var G=B.LoadUnloadContainer[H],D=F?"nextonunload":"onunload";B.execFunc(G[D]);G[D]=null},paintHtml:function(G,I,F,H){var D={html:G,id:I,url:F,add:H};if(H){if(B.Html.fireEvent(I,"beforepaintadd",D)!==false){B.addTo(G,I);B.Html.fireEvent(I,"afterpaintadd",D)}}else{if(B.Html.fireEvent(I,"beforepaint",D)!==false){B.writeTo(G,I);B.Html.fireEvent(I,"afterpaint",D)}}},paintHtml2:function(J,N,F,P){var D=B.Model2Blocks[N],H=C.model2Marker,M=J.indexOf(H.ax),L=J.indexOf(H.begin,M+1),K=J.indexOf(H.ax,L+1),I=J.indexOf(H.end,K+1);while(M>-1&&L>-1&&K>-1&&I>-1){var G=J.substring(M+H.ax.length,L),O=J.substring(L+H.begin.length,K);if(D[G]){var Q={html:O,id:G,url:F,block:D[G],add:P};if(P){if(B.Html.fireEvent(N,"beforepaintadd",Q)!==false){B.addTo(O,D[G]);B.Html.fireEvent(N,"afterpaintadd")}}else{if(B.Html.fireEvent(N,"beforepaint",Q)!==false){B.writeTo(O,D[G]);B.Html.fireEvent(N,"afterpaint")}}}M=J.indexOf(H.ax,I+1);L=J.indexOf(H.begin,M+1);K=J.indexOf(H.ax,L+1);I=J.indexOf(H.end,K+1)}},docWriteTraper:new function(){var D={},G={},F={};this.add=function(J,K,I,H){if(H.inprocessTO){clearTimeout(H.inprocessTO)}H.inprocess=1;D[K]=H;G[K]=I;if(!F[K]){F[K]=""}F[K]+=J;this.checkMutiLine(K)};this.checkMutiLine=function(O){var L=F[O],I=L.indexOf("<");while(I>-1){var N=1,J=L.charAt(I+N).trim();while(J!=""&&J!=">"){if(J=="/"&&L.charAt(I+N+1)==">"){this.apply(O);return }J=L.charAt(I+(++N)).trim()}var H=L.substring(I+1,I+N),M=L.indexOf("</"+H+">",I);if(M>-1){this.apply(O);break}else{var K=L.indexOf(">",I+1+H.length);if(K>-1&&(H=="img"||H=="input"||H=="br"||H=="hr")){this.apply(O);return }I=L.indexOf("<",I+1)}}};this.apply=function(I){if(!F[I]){return }var H=F[I];delete F[I];if(!D[I].countproc){D[I].countproc=1}else{D[I].countproc++}A(B.get(D[I].place),1);B.parsingText({text:H,id:D[I].place,url:G[I],add:1,owner:D[I]})};this.applyAll=function(){for(var H in F){if(F[H]){B.docWriteTraper.apply(H)}}}},addScript:function(P,R,F,N,H,L,T){if(typeof P=="object"&&P.nodeName!="SCRIPT"){R=P.callback||P.cb;F=P.noax;H=P.place;N=P.anticache==null?P.nocache:P.anticache;L=P.storage;T=P.noblock;P=P.src?P.src:P.url}if(B.Storage&&(L==null?C.USE_STORAGE:L)&&B.Storage.isPosible()&&!B.Storage.isReady){B.Storage.onReady(function(){B.addScript(P,R,F,N,H,L)});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 G=document.getElementsByTagName("script");H=B.get(H);if(H){H.innerHTML="";H=H.appendChild(Q)}else{for(var I=0,K=G.length;I<K;I++){var S=G[I].innerHTML,M=S.indexOf("SRXRNM.addScript");if(M>-1){var J=S.indexOf(P);if(J>M){H=G[I].place?B.get(G[I].place):G[I];break}}}}if(H){H.parentNode.insertBefore(Q,H)}else{document.body.appendChild(Q)}hax({id:Q.id,url:P,html:"<body onload=\"SRXRNM.get('"+Q.id+'\').cb()"><script type="text/javascript" src="'+P+'"'+(F?" "+E("noax")+'="1"':"")+(N?" "+E("nocache")+'="1"':"")+(T?" "+E("noblock")+'="1"':"")+"><\/script></body>",nohistory:1,storage:L});return }B.docWriteTraper.apply(R);document.write=function(U){B.docWriteTraper.add(U,R,F,P)};document.writeln=function(U){document.write(U+"\n")};if(C.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[E("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)}}}var O=document.getElementsByTagName("head")[0];O.appendChild(P)},evalScript:function(F){try{if(B.browser.safari){window._evalCode=F;new B.addScript(B.makeScript('<script type="text/javascript">eval(window._evalCode)<\/script>'))}else{if(window.execScript){window.execScript(F)}else{window["eval"](F)}}}catch(D){error(D);return 0}return 1},removeScripts:function(G){var J=document.getElementsByTagName("head")[0],K=J.getElementsByTagName("script"),F=[];for(var I=0,D=G.length;I<=D;I++){if(I<G.length&&typeof G[I]=="string"){continue}var L=I<G.length?G[I].id:E("script"+C.sprt+"temp");for(var H=0,D=K.length;H<D;H++){if(L?K[H].id==L:K[H].innerHTML==G[I].innerHTML){F.push(K[H]);break}}}for(var I=0,D=F.length;I<D;I++){if(F[I].parentNode){if(C.DEBUG_SCRIPT){log("remove script "+(F[I].id?F[I].id:F[I].innerHTML))}F[I].parentNode.removeChild(F[I])}}},execFunc:function(J,F,I){if(J instanceof Array){for(var H=0,D=J.length;H<D;H++){B.execFunc(J[H],F,I)}}else{if(J){try{if(!I){I=window}if(typeof J=="string"){J=J.trim();if(J.startWith("function")&&J.endWith("}")){J=B.browser.msie?"SRXRNM.tmp="+J:"("+J+")"}(function(){J=window["eval"](J)}).call(I);if(typeof J!="function"){return }}J.apply(I,F)}catch(G){error(G)}}}},HTMLThread:function(K){var I,H,J=this,G=this.options={};this.inprocess=0;this.id=K;B.Html.thread[K]=this;B.Html.register(this);this.repeat=function(M,L,N){G.form=M;G.nohistory=L;G.params=N;J.request()};this.setOptions=function(M,L){if(!M.url&&M.src){M.url=M.src}if(!M.cb&&M.callback){M.cb=M.callback}if(M.cbo==null&&M.callbackOps!=null){M.cbo=M.callbackOps}if(M.anticache==null&&M.nocache!=null){M.anticache=M.nocache}if(L){G={}}B.extend(G,M);if(G.async==null){G.async=true}G.url=B.delHost(G.url);this.options=G;return J};this.getOptions=function(){return G};this.isProcess=function(){return J.inprocess};this.request=function(){var L=G.method?G.method:(G.form?G.form.method:"get"),P=(L&&L.toLowerCase()=="post")?"post":"get";try{var M={url:G.url,id:K,options:G,xhr:J};if(J.fireEvent("beforerequest",M)!==false){var O=function(){H=B.getTime();var W=B.createQuery(G.form);if(G.params){if(W!=""&&!G.params.startWith("&")){W+="&"}W+=G.params}if(P!="post"&&W!=""){if(G.url.indexOf("?")==-1){G.url+="?"+W}else{G.url+=((G.url.endWith("?")||G.url.endWith("&"))?"":"&")+W}}if(J.inprocess){J.abort()}J.inprocess=1;var T=location.href.indexOf("#"),S=(T==-1)?location.href:location.href.substring(0,T),V=G.html!=null||(S.endWith(G.url)||(G.anticache!=null?G.anticache:C.HAX_ANTICACHE));T=D.getIndex(G.url);var Q=null;if(!V&&T>-1&&P!="post"){G.html=D.storage[T][1];Q=1}if(G.html){F({readyState:4,status:200,responseText:G.html,cache:Q});G.html=null}else{if(!I){I=B.getXHR()}try{I.onprogress=function(Z){J.fireEvent("progress",{id:K,xhr:J,event:Z,position:Z.position,total:Z.totalSize,percent:Math.round(100*Z.position/Z.totalSize)})}}catch(X){}try{var R=(B.browser.msie&&location.protocol=="file:"&&G.url.startWith("/")?"file://":"")+G.url;if(G.user){I.open(P.toUpperCase(),R,G.async,G.user,G.pswd)}else{I.open(P.toUpperCase(),R,G.async)}}catch(X){B.Effect.use(K);throw X}I.onreadystatechange=G.async?F:function(){};var Y="setRequestHeader";if(G.cut){I[Y]("AJAX_CUT_BLOCK",G.cut)}if(V){I[Y]("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT")}I[Y]("AJAX_ENGINE","Fullajax");I[Y]("HTTP_X_REQUESTED_WITH","XMLHttpRequest");I[Y]("X-Requested-With","XMLHttpRequest");if(G.headers){for(var U in G.headers){I[Y](U,G.headers[U])}}if(P=="post"){I[Y]("Content-Type","application/x-www-form-urlencoded; Charset="+C.CHARSET)}I.send((P=="post")?W:null);if(!G.async){F()}}B.showLoading(J.inprocess,J.getLoader());if(C.DEBUG_AJAX){log(P+" "+G.url+" params:"+W+" id:"+K)}};if(!B.Effect.use(K,1,O)){O()}J.fireEvent("afterrequest",M)}}catch(N){J.abort();error(N);throw N}};this.getLoader=function(){if(!J.loader){J.loader=G.loader==null?B.getLoader(K):B.get(G.loader)}return J.loader};this.abort=function(){J.inprocess=0;if(!I){return }try{I.isAbort=1;I.abort()}catch(L){}I=null;B.showLoading(0,J.getLoader())};this.destroy=function(){B.Html.thread[K]=null;delete B.Html.thread[K]};function F(P){if(!P||!P.readyState){P=I}try{if(P.readyState==4){var O=P.isAbort?-1:P.status,W=(O>=200&&O<300)||O==304||(O==0&&location.protocol=="file:"),X=P.responseText;try{var V=P.getAllResponseHeaders?P.getAllResponseHeaders().split("\n"):[],N={};for(var Q=0,T=V.length;Q<T;Q++){var M=V[Q].indexOf(":");if(M>-1){N[V[Q].substring(0,M).toLowerCase()]=V[Q].substring(M+2)}}var S=N["content-type"];if(S){var R=["application/x-javascript","application/javascript","text/javascript","application/json","text/json"];for(var Q=0,T=R.length;Q<T;Q++){if(S.indexOf(R[Q])>-1){X="<script>"+X+"<\/script>";G.add=1;break}}}}catch(U){}var L={xhr:P,url:G.url,id:K,status:O,success:W,cbo:G.cbo,callbackOps:G.cbo,options:G,text:X,thread:J,responseText:X,time:B.getTime()-H};J.fireEvent("response",L);if(O>-1&&B.HtmlPreprocessor(L)!==false){if(G.cb){B.execFunc(G.cb,[L,K,W,G.cbo],G.scope);if(C.DEBUG_AJAX){log("callback id:"+K)}}J.inprocess=0;if(W){if(L.text){D.add(G.url,L.text,G);J.inprocess=1;B.parsingText({owner:J,text:L.text,id:K,url:G.url,add:G.add,rc:G.rc,seal:G.seal,onload:G.onload,scope:G.scope})}else{warn("empty response: "+K+" => "+G.url);B.Effect.use(K)}if(C.DEBUG_AJAX){log("response ok:"+G.url)}}else{B.execFunc(G.onerror,[G],G.scope);B.showMessage(G.url,P.status,P.statusText);B.Effect.use(K)}}B.showLoading(J.inprocess,J.getLoader());if((G.destroy!=null)?G.destroy:C.HAX_AUTO_DESTROY){J.destroy()}}}catch(U){error(U);J.fireEvent("exception",{xhr:P,url:G.url,id:K,exception:U,options:G});B.Effect.use(K);J.inprocess=0;B.showLoading(J.inprocess,J.getLoader());if((G.destroy!=null)?G.destroy:C.HAX_AUTO_DESTROY){J.destroy()}}}var D=this.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[D.current][0]},add:function(U,R,M){U=decodeURIComponent(U);if(U.href){U=U.href}this.current++;var Y=location.host,O=U.indexOf(Y);if(O>-1){U=U.substring(O+Y.length)}U=B.replaceLinkEqual(U);if(G.startpage){G.startpage=0;D.startPageHtml=R;D.startPageUrl=U;D.startPageOps=B.extend({},G);B.History.setCurrent(B.getHash())}var W=!(G.nohistory!=null?G.nohistory:C.NO_HISTORY);if(D.startPageHtml==null){var S=["<head><title>"+document.title+"</title></head>"],X=B.Model2Blocks[K];if(X){for(var Q in X){var T=B.get(X[Q]);if(T){var V=T.innerHTML,L=C.model2Marker.ax,N=L+Q+C.model2Marker.begin,P=L+Q+C.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)}D.startPageHtml=S.join("");D.startPageUrl=location.href}if(W){B.History.add(K,U)}if(this.current>C.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}};this.go2History=function(O){if(D.currentUrl()!=O){var L=G.historycache!=null?G.historycache:C.USE_HISTORY_CACHE;if(!L||!this.go2UrlHistory(O)){O=B.replaceLinkEqual(O,1);var M=D.getIndex(O,2),N={url:O,nohistory:1};if(M>-1){B.extend(N,D.storage[M][2],1)}this.setOptions(N,M>-1).request()}}};this.go2UrlHistory=function(M){var L=D.getIndex(M);if(L>-1){this.go(L-D.current);B.History.setCurrent(B.getHash());return true}};this.go=function(Q){var N=D.current+Q;if(N<0){N=0}else{if(N>D.storage.length-1){N=D.storage.length-1}}if(N==0){return D.go2StartPage()}D.current=N;var L=D.storage[N],M=L[0],P=L[1],O=L[2]||G;if(M&&P){B.parsingText({owner:J,text:P,id:K,url:D.storage[N][0],add:O.add,rc:O.rc,seal:O.seal,onload:O.onload,scope:O.scope})}},this.go2StartPage=function(){var L=D;if(L.startPageHtml){var M=B.extend({startpage:1,owner:J,text:L.startPageHtml,id:K,url:L.startPageUrl},L.startPageOps||G,1);B.parsingText(M)}D.current=0};this.getSrartPageUrl=function(){return D.startPageUrl}},replaceHref:function(){var D=location,F=D.href,G=F.indexOf("#");if(G>-1&&F.length>G+1){D.replace(F.substring(0,G)+B.replaceLinkEqual(F.substring(G)))}},go:function(G,F){var D=B.parseAxHash(G);for(var H in D){hax(B.extend({id:H,url:D[H]},F))}},directLink:function(){B.onReady(function(){B.replaceHref();var D=B.getHash();B.History.setCurrent(D);B.go2Hax(1,D)})},go2Hax:function(K,F){var M=B.parseAxHash(B.History.previous);if(!F){F=B.History.current}var L=B.parseAxHash(F),J=0,N={oldHash:B.History.previous,newHash:B.History.current};for(var G in L){J++;if(M[G]==L[G]){M[G]=null;continue}M[G]=null;N.id=G;N.url=L[G];if(B.Html.fireEvent(G,"beforehistorychange",N)===false){continue}if(B.Html.thread[G]){var H=function(){B.Html.thread[G].go2History(L[G])};if(!B.Effect.use(G,1,H)){H()}}else{var D=B.replaceLinkEqual(L[G],1),I=B.parseUri(D),N=B.Filter.getOptions(I.path,I.query);if(!N){N={}}N.id=G;N.nohistory=K;N.startPage=K;hax(D,N)}}for(var G in M){if(M[G]&&B.Html.thread[G]){N.id=G;N.url=B.Html.thread[G].getSrartPageUrl();N.startpage=1;if(B.Html.fireEvent(G,"beforehistorychange",N)===false){continue}var H=B.Html.thread[G].go2StartPage;if(!B.Effect.use(G,1,H)){H()}}}L.size=J;return L},makeAxHash:function(I,F,D,H){if(!H){H="ax"}var K=":"+H+":"+(F.id?F.id:F)+":",L=I.indexOf(K);if(L>-1){var G=I.substring(L),J=G.indexOf(":",L+K.length);while(J>-1&&G.substring(J,J+2)==":/"){J=G.indexOf(":",J+1)}if(J>-1){G=G.substring(0,J)}I=I.replace(G,K+D)}else{I+=K+D}return(I.startWith("#")?"":"#")+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(H,J){var F=null,M=H.attributes;if(!M){return F}if(!J){J=""}for(var I=0,K=(B.browser.msie?B.attrs:M).length;I<K;I++){var L=B.browser.msie?M[J+B.attrs[I]]:M[I];if(L&&L.nodeName.startWith(J)){var D=L.nodeName.substring(J.length),G=L.nodeValue;G=(G=="1"||G=="true")?1:((G=="0"||G=="false")?0:G);if(!F){F={}}F[D]=G}}return F},parseAxHash:function(F,H){if(!H){H="ax"}var G={};if(!F){return G}F=B.replaceLinkEqual(F,1);var D=F.indexOf(":"+H+":");while(D>-1){var L,K=F.indexOf(":",D+H.length+2);if(K>-1){L=F.substring(D+H.length+2,K)}else{K=D}D=F.indexOf(":"+H+":",K+1);var J=F.substring(K+1),I=J.indexOf(":");while(I>-1&&J.substring(I,I+2)==":/"){I=J.indexOf(":",I+1)}if(I>-1){J=J.substring(0,I)}if(J&&L){G[L]=J}}return G},getHash:function(){return location.hash2||location.hash},setHash:function(F){var D=location;D.hash=F;if(D.hash2||decodeURIComponent(D.hash)!=decodeURIComponent(F)){D.hash2=F}},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),K=B.History.frame,D=K.contentWindow.document.body;if(L!=I&&L!="#"+I){var H=(K.contentWindow||K.contentDocument).document;H.open();H.write(L);H.close()}else{var F=B.replaceLinkEqual(D.innerText);if(F!=I&&"#"+F!=I){J=F;B.setHash(J)}}}var J=B.replaceLinkEqual(J);if(I!=null&&J!=I){B.History.setCurrent(J);for(var G in B.History.prefixListener){B.History.prefixListener[G]()}}},add:function(D,J,I){var G=B.replaceLinkEqual(B.getHash(),1);G=B.makeAxHash(G,D,J,I);var H=B.replaceLinkEqual(G),L=B.History.fireEvent("beforeadd",{hash:G,rhash:H,id:D,url:J,loc:J,prefix:I});if(L===false){return }else{if(typeof L=="string"){H=B.replaceLinkEqual(L)}}B.setHash(H);if((B.browser.msie&&B.browser.msieV<8)||B.browser.safari){var F=B.History.frame;if(!F){if(B.browser.msie){F=document.createElement("iframe");F.style.display="none";F.src="javascript:true";document.body.appendChild(F);var K=F.contentWindow?F.contentWindow:F.contentDocument,M=K.document,N=B.History.previous||"";M.open();M.write(N);M.close()}B.History.frame=F}if(B.browser.msie){var M=(F.contentWindow||F.contentDocument).document;M.open();M.write(H);M.close()}}B.History.setCurrent(H)}},Effect:{effects:{},add:function(F){if(!F){F={}}if(!F.id){F.id="document.body"}var D=B.Effect.effects[F.id];if(!D){D=[]}D.push(F);B.Effect.effects[F.id]=D},get:function(F){if(!F){F="document.body"}for(var D in B.Effect.effects){if(D==F||D=="*"){return B.Effect.effects[D]}}},use:function(L,K,F){try{var I=B.Effect.get(L);if(I){for(var H=0,D=I.length;H<D;H++){var J=(H==I.length-1)?F:null;if(!I[H]){continue}if(K){if(I[H].start){I[H].start(L,J)}}else{if(I[H].end){I[H].end(L,J)}}}}return !!I}catch(G){error(G)}}},Filter:{schema:{},add:function(F){if(!F){F={}}if(!F.id){F.id="document.body"}this.remove(F);var D=this.schema[F.id];if(!D){D=[]}D.push(F);this.schema[F.id]=D;return this},remove:function(F){if(!F){F={}}if(!F.id){F.id="document.body"}var D=this.schema[F.id];if(!D){return }B.arrayRemoveOf(D,F,1);this.schema[F.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(F,P,G){var U=null,S=0;for(var I in this.schema){var N=this.schema[I];if(!N){continue}function R(V,c,a){var Z=0;for(var Y=0,W=V.length;Y<W;Y++){var b=V[Y],X=b&&c&&(b=="*"||((!a||a=="contain")&&c.indexOf(b)>-1)||(a=="start"&&c.startWith(b))||(a=="end"&&c.endWith(b)));if(X&&Z<b.length){Z=b.length}}return Z}for(var L=0,O=N.length;L<O;L++){var D=N[L].url instanceof Array?N[L].url:[N[L].url],T=R(D,F,N[L].urlType),M=N[L].query instanceof Array?N[L].query:[N[L].query],Q=R(M,P,N[L].queryType),K=N[L].join||N[L].joinLogic,H=K=="and"?T+Q:(T>Q?T:Q);if(S<H){S=H;U={};for(var J in N[L]){U[J]=N[L][J]}U.filterSchemaId=I;if(G&&G.nodeName=="FORM"){if(G.attributes.method){U.method=G.attributes.method.nodeValue}U.form=G}}}}return U},parseStartUrl:function(D){return D.substring(0,D.indexOf("/",1))},getParentPath:function(){var F=location.pathname,D=F.lastIndexOf("/");return D>-1?F.substring(0,D+1):""},parseAxAttr:function(D){if(D.iswrapped){return }var F=B.parseAttr(D,E(""));if(F){if(D.nodeName=="FORM"){F.method=D.getAttribute("method");F.form=D}F.scope=D}return F},wrapAnchor:function(D,H){if(D.protocol=="mailto:"||D.protocol=="javascript:"){return }if(D.iswrapped){return }var G,L;if(D.nodeName=="FORM"){if(D.attributes.action){G=D.attributes.action.nodeValue}if(!G){G=location.href;var K=G.indexOf("#");G=K==-1?G:G.substring(0,K)}var F=document.createElement("a");F.href=G;var J=B.parseUri(F.href);G=J.path;L=J.query;delete F}else{if(!D.href){return }var J=B.parseUri(D.href);G=J.path;L=J.query}if(L&&L.startWith("?")){L=L.substring(1)}if(B.browser.opera||B.browser.msie){G="/"+G}var I=this.getOptions(G,L,D);if(!I&&!H){return }if(!I){I={}}if(!H){H={}}B.extend(H,I,1);if(H.type=="skip"||H.type=="nowrap"||(H.wrap!=null&&!H.wrap)||H.nowrap){return }if(!H.target&&D.attributes.target&&D.attributes.target.nodeValue!=""){return }if(H.id==null){return }this.wrapOps(D,H)},wrapSharp:function(G,M,D){if(G.iswrapped){return }var K=location.protocol,L=location.host,I=K+"//"+L+location.pathname+location.search+"#",F=G.nodeName=="FORM"?(G.attributes.action?G.attributes.action.nodeValue:0):G.href;if(F&&F.endWith("#")){if(!F.startWith(K)){F=K+"//"+L+F}if(D){var J=document.createElement("a");J.href=D+"#";D=J.href;delete J;if(!D.startWith(K)){var H=D.startWith("/")?"":B.parseUri(location.href).directory;D=K+"//"+L+H+D}}if(F==I||F==D){if(!M){M={}}G.sharp=M.sharp=1;this.wrapOps(G,M)}}},wrapOps:function(G,O){if(!O){return }G.options=O;G.iswrapped=1;var M=document.createAttribute("iswrapped");M.nodeValue=1;G.setAttributeNode(M);var D=G.nodeName=="FORM"?"submit":"click",H="onprev"+D,F="on"+D;if(!O.overwrite&&!C.OVERWRITE){if(B.browser.msie){if(G[F]){var N=document.createAttribute(H);N.nodeValue=G.attributes[F].nodeValue||G[F];G.setAttributeNode(N)}}else{G[H]=G[F]}}if(D=="submit"){var K=G.getElementsByTagName("input");for(var J=0,I=K.length;J<I;J++){var L=K[J].type;if(L!="image"&&L!="submit"){continue}SRXRNM.addEvent(K[J],"click",L=="image"?function(U){if(!U){U=window.event}var Q=U.target||U.srcElement,P=U.offsetX!=null?U.offsetX:U.pageX-Q.offsetLeft+1,W=U.offsetY!=null?U.offsetY:U.pageY-Q.offsetTop+1,V="",R=Q.getAttribute("name"),T=Q.getAttribute("value"),S=R||"";if(S){S+="."}if(T&&R!=null){V+=R+"="+T+"&"}V="&"+V+S+"x="+P+"&"+S+"y="+W;G.submitValue=V}:function(S){if(!S){S=window.event}var P=S.target||S.srcElement,Q=P.getAttribute("name"),R=P.getAttribute("value"),T="";if(Q!=null){T+="&"+Q+"="+R}G.submitValue=T})}}G[F]=function(T){T=T||window.event;if(T.ctrlKey||T.shiftKey){return }try{var U=null;if(B.browser.msie){if(this.attributes[H]){var S=this.attributes[H].nodeValue;if(S){if(typeof S=="string"){S=window["eval"]("SRXRNM.tmp=function(e){"+S+"}")}U=S.call(this,T)}}}else{if(this[H]&&(typeof this[H]=="function")){U=this[H](T)}}if(U===false){return false}}catch(V){error(V)}var Q=this.options;if(this.nodeName=="FORM"&&this.enctype=="multipart/form-data"){if(Q.multipart){Q.multipart(this)}return true}else{if(!Q.sharp){try{var P=this.getAttribute("action")||this.href;if(!P){P=location.href}if(this.nodeName=="FORM"&&(!Q.method||Q.method.toLowerCase()!="post")){var R=B.parseUri(P);P=P.replace("?"+R.query,"").replace("#"+R.anchor,"")}P=B.delHost(P);var W=Q.changer||Q.urlChanger,X=W?W(P,this):0;if(Q.handler){Q.handler(this,Q)}else{window[Q.type=="data"?"dax":"hax"](X?X:P,Q)}}catch(V){error(V)}}}return false};if(D=="submit"){G.submit=G.onsubmit}},wrap:function(I,D){if(!I){I=document;for(var F in this.schema){this.wrap(F,D)}}var L,Q=I.nodeName;if(Q=="A"||Q=="FORM"||Q=="AREA"){L=[I]}else{I=B.get(I);if(!I){return }if(A(I)){I=document}var P=B.collectionToArray,O="getElementsByTagName";L=P(I[O]("a")).concat(P(I[O]("form")),P(I[O]("area")))}for(var H=0,J=L.length;H<J;H++){var G=L[H],N=G.attributes[E("wrap")],M=N==null||(N.nodeValue!="false"&&N.nodeValue!="0"&&N.nodeValue!=false);if(G.iswrapped){G.iswrapped=!!(G.onclick||G.onsubmit)}if(!G.iswrapped&&M){var R=this.parseAxAttr(G),K=this.fireEvent("beforewrap",{el:G,ops:R,layer:I,url:D});if(K===false){continue}this.wrapSharp(G,R,D);this.wrapAnchor(G,R)}G=null}L=null;return this}},Include:{parse:function(F){if(F){F=B.get(F)}else{F=document}var D=F.getElementsByTagName("include");while(D.length>0){B.Include.apply(D[0])}},apply:function(H){H=B.get(H);var G=B.parseAttr(H),I=B.parseAttr(H,E(""));B.extend(G,I);if(G&&(G.url||G.src)){var D=document.createElement("a");if(!G.url){G.url=G.src}D.href=G.url;I=B.Filter.getOptions(D.pathname,D.search);delete D;if(I){B.extend(G,I,1)}var F=document.createElement("span");F.style.display="none";F.id=G.id=H.id?H.id:B.genId();A(F,1);H.parentNode.replaceChild(F,H);if(G.nohistory==null){G.nohistory=1}hax(G)}},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(I,K,J,G,F){if(typeof I=="object"&&I.nodeName!="FORM"){K=I.beforeStart;J=I.afterFinish;G=I.manual;F=I.html;I=from.form}var D,H=null,L=this;this.init=function(){I=B.get(I);var N=B.genId();I.setAttribute("target",N);D=document.createElement("div");D.innerHTML='<iframe style="display:none" src="javascript:true" onload="this._onload()" id="'+N+'" name="'+N+'"></iframe>';this.iframe=H=D.firstChild;this.setAfterFinish=setAfterFinish=function(O){H._onload=function(){var Q=this.contentWindow?this.contentWindow:this.contentDocument,P=Q.document.body,R=P[F?"innerHTML":(B.browser.msie?"innerText":"textContent")];O(R,L)}};if(J){var M=function(){setAfterFinish(J);if(G){I.submit()}};if(G){H._onload=M}else{M()}}else{H._onload=function(){}}I.appendChild(D);I.setAttribute("target",N);if(K){K(L)}};this.init();this.getIframe=function(){return H};this.cancel=function(){I.reset();L.destroy()};this.destroy=function(){H.src="javascript:true";SRXRNM.remove(D);D=null}},addEventsListener:function(D){if(D.prototype){D=D.prototype}D.on=function(F,J,K){if(!(F instanceof Array)){F=[F]}for(var H=0,G=F.length;H<G;H++){var I=F[H];if(!K){this.un(I,J)}if(!this.events){this.events={}}if(!this.events[I]){this.events[I]=[]}this.events[I].push(J)}};D.un=function(F,K,I){if(!(F instanceof Array)){F=[F]}for(var H=0,G=F.length;H<G;H++){var J=F[H];if(!K){return this.unall(J)}var L=this.events?this.events[J]:null;if(L){B.arrayRemoveOf(L,K,!I);this.events[J]=L}}};D.unall=function(F){if(this.events){if(F){delete this.events[F]}else{delete this.events}}};D.fireEvent=function(M,H){var F=this.events?this.events[M]:null;if(F){var K=null,G=[].slice.call(arguments);G.shift();G.push(M);for(var J=0;J<F.length;J++){try{var L=F[J].apply(this,G);if(K!==false&&L!=null){K=L}}catch(I){error(I)}}return K}};return D},addContainerListener:function(F){if(F.prototype){F=F.prototype}var G={},D={};F.register=function(I){var L=G[I.id];if(L){for(var K in L){for(var J=0,H=L[K].length;J<H;J++){I.on(K,L[K][J])}}}for(var K in D){var L=D[K];for(var J=0,H=L.length;J<H;J++){I.on(K,L[J])}}};F.on=function(H,L,K,N){if(!(H instanceof Array)){H=[H]}for(var J=0,I=H.length;J<I;J++){var M=H[J];if(!G[M]){G[M]={}}if(!G[M][L]){G[M][L]=[]}G[M][L].push(K);if(this.thread[M]){this.thread[M].on(L,K,N)}}};F.onall=function(K,J,L){if(!D[K]){D[K]=[]}D[K].push(J);var I=this.thread;for(var H in I){if(I[H]){I[H].on(K,J,L)}}};F.unall=function(M,L,J){if(M){if(L){var H=D[M];B.arrayRemoveOf(H,L,!J);D[M]=H}else{D[M]=[]}}else{D={}}var K=this.thread;for(var I in K){if(K[I]){K[I].un(M,L,J)}}};F.un=function(O,H,J,Q){if(!(O instanceof Array)){O=[O]}for(var N=0,K=O.length;N<K;N++){var I=O[N];if(!J){if(I){if(G[I]){if(H){delete G[I][H]}else{delete G[I]}}}else{G={}}var P={};if(I){P[I]=this.thread[I]}else{P=this.thread}for(var M in P){if(P[M]){P[M].unall(H)}}}else{var L=G[I]?G[I][H]:null;if(L){B.arrayRemoveOf(L,J,!Q);G[I][H]=L}if(this.thread[I]){this.thread[I].un(H,J,Q)}}}};F.fireEvent=function(J,I,H){if(this.thread[J]){return this.thread[J].fireEvent(I,H)}};return F},Html:{thread:{},ASYNCHRONOUS:1,storage:[]},Data:{thread:{}},playsound:function(G,D){var H=document.createElement("div");if(D==null){D=10}H.setAttribute("style","position:absolute;top:-1000px;left:-1000px");if(window.ActiveXObject){var F=document.createElement("bgsound");F.src=G;H.appendChild(F)}else{H.innerHTML='<embed src="'+G+'" loop="false" autostart="true" hidden="true" mastersound>'}document.body.appendChild(H);if(D>0){setTimeout(function(){H.firstChild.src="";document.body.removeChild(H)},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(J,G){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 K=G?G:D,I=K.parser[K.strictMode?"strict":"loose"].exec(J);for(var F=0,H={};F<14;F++){H[K.key[F]]=I[F]||""}H[K.q.name]={};H[K.key[12]].replace(K.q.parser,function(M,L,N){if(L){H[K.q.name][L]=N}});return H},showMessage:function(F,D,G){if(D==0){return }alert("Error "+D+" : "+F+"\n"+G)},replaceHtml:function(G,F){var D=(typeof G==="string"?document.getElementById(G):G);var H=D.cloneNode(false);H.innerHTML=F;D.parentNode.replaceChild(H,D);return H},addTo:function(F,G){var D=G?B.get(G):document.body;if(!D){return warn("Warning => addTo : element = "+G+" not found")}var I=document.createElement("div");I.innerHTML=F.join?F.join(""):F;var H=A(D);while(I.childNodes.length>0){if(H){D.parentNode.insertBefore(I.childNodes[0],D)}else{D.appendChild(I.childNodes[0])}}return D},writeTo:function(F,G){var D=G?B.get(G):document.body;if(!D){return warn("Warning => writeTo : element = "+G+" not found")}if(A(D)){B.addTo(F,D)}else{D.innerHTML=F.join?F.join(""):F}return D},remove:function(D){D=D instanceof Array?D:[D];for(var G=0,F=D.length;G<F;G++){var H=B.get(D[G]);if(H){H.parentNode.removeChild(H)}}},replace:function(F,D){F=B.get(F);D=B.get(D);return D.parentNode.replaceChild(F,D)},genId:function(){return E("genid"+C.sprt)+(B.lastGenId?++B.lastGenId:B.lastGenId=1)}});var C=B.Default;var E=function(D){return C.prefix+C.sprt+D};var A=B.placeMark=function(G,D){var F=E("place"+C.sprt+"mark");if(G&&D!=null){G[F]=D}return G?(D==null?G[F]:G):F};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})(SRXRNM);SRXRNM.init()};



var Fax = {

    timer : function(startValue, endValue, timeout, count){
        if (timeout == null) this.timeout = 10; else this.timeout = timeout;
        if (count == null) this.count = 20; else this.count = count;

        var i = 1;
        this.finishPercent = i/this.count;
        this.startPercent = 1 - this.finishPercent;
        this.isEnd = false;

        
        this.percent = function (){
            return this.finishPercent;
        };  

        this.value = function (){
            return startValue + i * (endValue - startValue)/this.count;
        };  
  
        this.stop = function(){this.isEnd = true;};
  
        this.change = function(){};
  
        this.update = function() {  
            this.change();     
            i++;
            this.finishPercent = i/this.count;
            this.startPercent = 1 - this.finishPercent;
        };

        this.start = function start() {
            if ((i <= this.count && !this.isEnd) || (startValue == endValue)) {
                this.update();
                var _this = this;
                this.recall = function() {_this.start()};
                setTimeout(this.recall, this.timeout);
            } else {
                this.isEnd = true;
                this.afterEnd();
            }
        };
        
        this.afterEnd = function(){};

    }, 
    
    jerk : function(obj){
        if (typeof obj == 'string') obj = id(obj);
        var tmr = new Fax.timer(0, 0, 100, 1);
        var delta = 10;

        tmr.change = function(){
            var pos = Fax.findPosition(obj);
            obj.style.top = nextPosition(pos[1]) + 'px';   
            obj.style.left = nextPosition(pos[0]) + 'px';   
        }

        function nextPosition(px){
            val = Math.random();
            if (Math.random() >= .5) val = -val;
            px += val;
            return px ;               
        }
        

        tmr.start();
    },


    jerk2 : function(obj){
        if (typeof obj == 'string') obj = id(obj);
        var tmr = new Fax.timer(0, 0, 100, 1);
        var start = Fax.findPosition(obj);
        var delta = 10;
        var plusH = (Math.random() >= .5) ? true : false;
        var plusW = (Math.random() >= .5) ? true : false;
        tmr.change = function(){
            var pos = Fax.findPosition(obj);
            if (start[0] + delta < pos[0]) plusH = false;
            if (start[0] - delta > pos[0]) plusH = true;
            if (start[1] + delta < pos[1]) plusW = false;
            if (start[1] - delta > pos[1]) plusW = true;
            pos[0] += plusH ? Math.random() : -Math.random();
            pos[1] += plusW ? Math.random() : -Math.random();
            obj.style.top = pos[1] + 'px';   
            obj.style.left = pos[0] + 'px';   
        }

        tmr.start();
    },

    jerk3 : function(obj){
        var objPos = new Array();
        for (var i = 0; i < obj.length; i++){
            obj[i] = SRXRNM.get(obj[i]);
            if (!obj[i]) continue;
            var opos = Fax.findPosition(obj[i]);
            objPos[i] = opos;
        }
        var tmr = new Fax.timer(0, 0, 100, 1);
        var deltaH = 30;
        var deltaW = 10;
        var start = [0,0];
        var pos = [0,0];
        var plusH = (Math.random() >= .5) ? true : false;
        var plusW = (Math.random() >= .5) ? true : false;
        tmr.change = function(){

            pos[0] += plusH ? Math.random() : -Math.random();
            pos[1] += plusW ? Math.random() : -Math.random();

            if (start[0] + deltaH < pos[0]) plusH = false;
            if (start[0] - deltaH > pos[0]) plusH = true;
            if (start[1] + deltaW < pos[1]) plusW = false;
            if (start[1] - deltaW > pos[1]) plusW = true;

            for (var i = 0; i < obj.length; i++){
                obj[i] = SRXRNM.get(obj[i]);
                if (!obj[i]) continue;
                var val = objPos[i][1] + pos[1];
                obj[i].style.top =  val + 'px';   
                val = objPos[i][0] + pos[0];
                obj[i].style.left = val + 'px';   
    
            }

        }

        tmr.start();
    },

    size : function(obj, timeout, count){
        if (typeof obj == 'string') obj = id(obj);
        end = obj.clientWidth;
        var tmr = new Fax.timer(0, end, timeout, count);
        
        var fontSize = Fax.getStyle(obj,'fontSize');
        var ed = '%';
        if (fontSize.indexOf(ed) == -1) ed = 'px';
        fontSize = parseFloat(fontSize.substring(0,fontSize.length - ed.length));

        var right = parseFloat(obj.style.left.substring(0,obj.style.left.length - 2)) + obj.clientWidth;
        var left = parseFloat(obj.style.left.substring(0,obj.style.left.length - 2));

        tmr.change = function(){
            var val = tmr.value();
            obj.style.left = (left - val) + 'px';
            obj.style.fontSize = Math.ceil(fontSize + tmr.percent() * fontSize) + ed;
        }

        tmr.start();
    }, 

    puff : function(obj){

        var dubl = document.createElement('div');        
        var pos = Fax.findPosition(obj);

        dubl.style.fontSize = Fax.getStyle(obj, 'fontSize');
        dubl.style.color = Fax.getStyle(obj, 'color');
        dubl.style.fontColor = Fax.getStyle(obj, 'fontColor');
        dubl.style.position = 'absolute';
        dubl.style.left = pos[0] + 'px';
        dubl.style.top = pos[1] + 'px';
        var a = obj.getElementsByTagName('a');
        if (a && a[0] && a[0].innerHTML) dubl.innerHTML = a[0].innerHTML; else return; // dubl.innerHTML = obj.innerHTML;

        document.body.appendChild(dubl);

        if (SRXRNM.browser.msie) dubl.style.backgroundColor = 'white';

        new Fax.size(dubl, 20, 20);
        var op = new Fax.opacity(dubl, 1, 0, 200, 100);
        op.afterEnd = function(){
            dubl.parentNode.removeChild(dubl);
        }

    },

    findPosition : function(obj) {
        if (typeof obj == 'string') obj = id(obj);
        var curleft = curtop = 0;
        if (obj.offsetParent) {
            curleft = obj.offsetLeft
            curtop = obj.offsetTop
            while (obj = obj.offsetParent) {
                if (obj.id == 'linkerLayer') break;
                curleft += obj.offsetLeft
                curtop += obj.offsetTop
            }
        }
        return [curleft,curtop];        
    },


    getStyle : function(obj, name){
        var val;
        
        if (document.defaultView && document.defaultView.getComputedStyle) {
            var css = document.defaultView.getComputedStyle(obj, null);
            val = css ? css[name] : null;
        } else if (obj.currentStyle) {
            val = obj.currentStyle[name];
        }

        return val;
    },

    opacity : function(obj, start, end, timeout, type, count){
        if (typeof obj == 'string') obj = id(obj);
        var tmr = new Fax.timer(start, end, timeout, count);
        tmr.count = 5;
        var agt = navigator.userAgent.toLowerCase();
        if (window.ActiveXObject) obj.style.zoom = 1;
  
        tmr.change = function(){
            var opacity = tmr.value();

            if (window.ActiveXObject) {
                if (type == 1) {           
                    if (opacity < 0.3) {
                        obj.style.filter = "alpha(opacity=0)";
                    } else {
                        //obj.style.filter = "alpha(opacity=1)";
                        obj.style.filter = "AlphaImageLoader(src='', sizingMethod='scale')";
                    }
                } else {
                    obj.style.filter = "alpha(opacity=" + opacity*100 + ")";
                }
            } else {
                obj.style.KHTMLOpacity = opacity; // Safari and Konqueror
                obj.style.MozOpacity = opacity; // Old Mozilla and Firefox
                obj.style.opacity = opacity;   
            }
   
        };
        var _this = this;
        tmr.afterEnd = function(){
            _this.afterEnd();
        };

        this.afterEnd = function(){};

        tmr.start();
        this.timer = tmr;

    }

}
var hs = {
lang : {
loadingText : 'Загрузка... <img src="http://vegasmatrac.ru/templ/0/img/loader1.gif" width="24" height="24">',
loadingTitle : 'Нажмите для выхода',
focusTitle : 'Click to bring to front',
fullExpandTitle : 'Актуальный размер',
creditsText : '<img src="http://vegasmatrac.ru/images/logo_new_1.gif" alt="Вегас" width="70" height="47" style="border:0" />',
creditsTitle : 'Матрасы Vegas',
previousText : 'Вперёд',
nextText : 'Назад',
moveText : '<img src="http://vegasmatrac.ru/templ/0/hs/highslide/graphics/move.png" style="border:0; position: relative; top: 0;	right: -13px;"  />',
closeText : '<img src="http://vegasmatrac.ru/templ/0/hs/highslide/graphics/close.png" style="border:0; position: relative; top: 0;	right: -5px;"  />',
closeTitle : 'Закрыть (esc)',
resizeTitle : 'Изменить размер',
playText : 'Play',
playTitle : 'Play слайдшоу (пробел)',
pauseText : 'Pause',
pauseTitle : 'Pause слайдшоу (spacebar)',
previousTitle : 'Предыдущий (стрелка влево)',
nextTitle : 'Следующий (стрелка вправо)',
moveTitle : 'Переместить',
fullExpandText : 'Полный размер',
number: 'Изображение %1 из %2',
restoreTitle : 'Нажмите для выхода, Нажмите и перетаскивайте для перемещения.  Используйте клавиши со стрелками для следующего и предыдущего изображения.'
},
graphicsDir : 'hs/highslide/graphics/',
restoreCursor : 'zoomout.cur',
expandSteps : 10,
expandDuration : 250,
restoreSteps : 10,
restoreDuration : 250,
marginLeft : 15,
marginRight : 15,
marginTop : 15,
marginBottom : 15,
zIndexCounter : 1001,
loadingOpacity : 0.75,
allowMultipleInstances: true,
numberOfImagesToPreload : 5,
outlineWhileAnimating : 2,
outlineStartOffset : 3,
fullExpandPosition : 'bottom right',
fullExpandOpacity : 1,
padToMinWidth : true,
showCredits : true,
creditsHref : 'http://vegasmatrac.ru/',
enableKeyListener : true,
transitions : [],
transitionDuration: 500,
dimmingOpacity: 0,
dimmingDuration: 50,
allowWidthReduction : false,
allowHeightReduction : true,
preserveContent : true,
objectLoadTime : 'before',
cacheAjax : true,
anchor : 'auto',
align : 'auto',
targetX: null,
targetY: null,
dragByHeading: true,
minWidth: 200,
minHeight: 200,
allowSizeReduction: true,
outlineType : 'drop-shadow',
wrapperClassName : 'highslide-wrapper',
skin : {
controls:
'<div class="highslide-controls"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-play">'+
'<a href="#" title="{hs.lang.playTitle}">'+
'<span>{hs.lang.playText}</span></a>'+
'</li>'+
'<li class="highslide-pause">'+
'<a href="#" title="{hs.lang.pauseTitle}">'+
'<span>{hs.lang.pauseText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-full-expand">'+
'<a href="#" title="{hs.lang.fullExpandTitle}">'+
'<span>{hs.lang.fullExpandText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" >'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>',
contentWrapper:
'<div class="highslide-header"><ul>'+
'<li class="highslide-previous">'+
'<a href="#" title="{hs.lang.previousTitle}" onclick="return hs.previous(this)">'+
'<span>{hs.lang.previousText}</span></a>'+
'</li>'+
'<li class="highslide-next">'+
'<a href="#" title="{hs.lang.nextTitle}" onclick="return hs.next(this)">'+
'<span>{hs.lang.nextText}</span></a>'+
'</li>'+
'<li class="highslide-move">'+
'<a href="#" title="{hs.lang.moveTitle}" onclick="return false">'+
'<span>{hs.lang.moveText}</span></a>'+
'</li>'+
'<li class="highslide-close">'+
'<a href="#" title="{hs.lang.closeTitle}" onclick="return hs.close(this)">'+
'<span>{hs.lang.closeText}</span></a>'+
'</li>'+
'</ul></div>'+
'<div class="highslide-body"></div>'+
'<div class="highslide-footer"><div>'+
'<span class="highslide-resize" title="{hs.lang.resizeTitle}"><span></span></span>'+
'</div></div>'
},
preloadTheseImages : [],
continuePreloading: true,
expanders : [],
overrides : [
'allowSizeReduction',
'anchor',
'align',
'targetX',
'targetY',
'outlineType',
'outlineWhileAnimating',
'captionId',
'captionText',
'captionEval',
'captionOverlay',
'headingId',
'headingText',
'headingEval',
'headingOverlay',
'dragByHeading',
'autoplay',
'numberPosition',
'transitions',
'dimmingOpacity',
'contentId',
'width',
'height',
'allowWidthReduction',
'allowHeightReduction',
'preserveContent',
'maincontentId',
'maincontentText',
'maincontentEval',
'objectType',	'cacheAjax',	'objectWidth',
'objectHeight',
'objectLoadTime',	'swfOptions',
'wrapperClassName',
'minWidth',
'minHeight',
'maxWidth',
'maxHeight',
'slideshowGroup',
'easing',
'easingClose',
'fadeInOut',
'src'
],
overlays : [],
idCounter : 0,
oPos : {
x: ['leftpanel', 'left', 'center', 'right', 'rightpanel'],
y: ['above', 'top', 'middle', 'bottom', 'below']
},
mouse: {},
headingOverlay: {},
captionOverlay: {},
swfOptions: { flashvars: {}, params: {}, attributes: {} },
faders : [],
slideshows : [],
pendingOutlines : {},
sleeping : [],
preloadTheseAjax : [],
cacheBindings : [],
cachedGets : {},
clones : {},
ie : (document.all && !window.opera),
safari : /Safari/.test(navigator.userAgent),
geckoMac : /Macintosh.+rv:1\.[0-8].+Gecko/.test(navigator.userAgent),
$ : function (id) {
return document.getElementById(id);
},
push : function (arr, val) {
arr[arr.length] = val;
},
createElement : function (tag, attribs, styles, parent, nopad) {
var el = document.createElement(tag);
if (attribs) hs.setAttribs(el, attribs);
if (nopad) hs.setStyles(el, {padding: 0, border: 'none', margin: 0});
if (styles) hs.setStyles(el, styles);
if (parent) parent.appendChild(el);	return el;
},
setAttribs : function (el, attribs) {
for (var x in attribs) el[x] = attribs[x];
},
setStyles : function (el, styles) {
for (var x in styles) {
if (hs.ie && x == 'opacity') {
if (styles[x] > 0.99) el.style.removeAttribute('filter');
else el.style.filter = 'alpha(opacity='+ (styles[x] * 100) +')';
}
else el.style[x] = styles[x];
}
},
ieVersion : function () {
var arr = navigator.appVersion.split("MSIE");
return arr[1] ? parseFloat(arr[1]) : null;
},
getPageSize : function () {
var iebody = document.compatMode && document.compatMode != 'BackCompat'
? document.documentElement : document.body;	var b = document.body;
var xScroll = (window.innerWidth && window.scrollMaxX)
? window.innerWidth + window.scrollMaxX :
(b.scrollWidth > b.offsetWidth ? b.scrollWidth : b.offsetWidth),
yScroll = (window.innerHeight && window.scrollMaxY)
? window.innerHeight + window.scrollMaxY :
(b.scrollHeight > b.offsetHeight ? b.scrollHeight : b.offsetHeight),
pageWidth = hs.ie ? iebody.scrollWidth :
(document.documentElement.clientWidth || self.innerWidth),
pageHeight = hs.ie ? iebody.clientHeight :
(document.documentElement.clientHeight || self.innerHeight);
var width = hs.ie ? iebody.clientWidth :
(document.documentElement.clientWidth || self.innerWidth),
height = hs.ie ? iebody.clientHeight : self.innerHeight;
return {
pageWidth: xScroll < pageWidth ? pageWidth : xScroll,
pageHeight: yScroll < pageHeight ? pageHeight : yScroll,
width: width,
height: height,	scrollLeft: hs.ie ? iebody.scrollLeft : pageXOffset,
scrollTop: hs.ie ? iebody.scrollTop : pageYOffset
}
},
getPosition : function(el)	{
if (/area/i.test(el.tagName)) {
var imgs = document.getElementsByTagName('img');
for (var i = 0; i < imgs.length; i++) {
var u = imgs[i].useMap;
if (u && u.replace(/^.*?#/, '') == el.parentNode.name) {
el = imgs[i];
break;
}
}
}
var p = { x: el.offsetLeft, y: el.offsetTop };
while (el.offsetParent)	{
el = el.offsetParent;
p.x += el.offsetLeft;
p.y += el.offsetTop;
if (el != document.body && el != document.documentElement) {
p.x -= el.scrollLeft;
p.y -= el.scrollTop;
}
}
return p;
},
expand : function(a, params, custom) {
if (a.getParams) return params;
try {	new hs.Expander(a, params, custom);
return false;	} catch (e) { return true; }
},
htmlExpand : function(a, params, custom) {
if (a.getParams) return params;
for (var i = 0; i < hs.sleeping.length; i++) {
if (hs.sleeping[i] && hs.sleeping[i].a == a) {
hs.sleeping[i].awake();
hs.sleeping[i] = null;
return false;
}
}
try {
hs.hasHtmlexpanders = true;
new hs.Expander(a, params, custom, 'html');
return false;
} catch (e) {
return true;
}	},
getSelfRendered : function() {
return hs.createElement('div', {
className: 'highslide-html-content',
innerHTML: hs.replaceLang(hs.skin.contentWrapper)
});
},
getElementByClass : function (el, tagName, className) {
var els = el.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if ((new RegExp(className)).test(els[i].className)) {
return els[i];
}
}
return null;
},
replaceLang : function(s) {
s = s.replace(/\s/g, ' ');
var re = /{hs\.lang\.([^}]+)\}/g,
matches = s.match(re),
lang;
for (var i = 0; i < matches.length; i++) {
lang = matches[i].replace(re, "$1");
if (typeof hs.lang[lang] != 'undefined') s = s.replace(matches[i], hs.lang[lang]);
}
return s;
},
setClickEvents : function () {
var els = document.getElementsByTagName('a');
for (var i = 0; i < els.length; i++) {
if (/^highslide$/.test(els[i].rel)) {
if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i] })) {
els[i].onclick = function() { return hs.expand(this) };
}
els[i].removeAttribute('rel');	}
var match = /^highslide-(ajax|iframe)$/.exec(els[i].rel);
if (match) {
(function(){
var t = match[1];
if (hs.fireEvent(hs, 'onSetClickEvent', { element: els[i], type: t })) {
els[i].onclick = function() {
return hs.htmlExpand(this, { objectType: t } );
};
}
})();
els[i].removeAttribute('rel');
}
}
if (!hs.pageLoaded) setTimeout( hs.setClickEvents, 50);
else hs.updateAnchors();
},
getCacheBinding : function (a) {
for (var i = 0; i < hs.cacheBindings.length; i++) {
if (hs.cacheBindings[i][0] == a) {
var c = hs.cacheBindings[i][1];
hs.cacheBindings[i][1] = c.cloneNode(1);
return c;
}
}
return null;
},
preloadAjax : function (e) {
var arr = hs.getAnchors();
for (var i = 0; i < arr.htmls.length; i++) {
var a = arr.htmls[i];
if (hs.getParam(a, 'objectType') == 'ajax' && hs.getParam(a, 'cacheAjax'))
hs.push(hs.preloadTheseAjax, a);
}
hs.preloadAjaxElement(0);
},
preloadAjaxElement : function (i) {
if (!hs.preloadTheseAjax[i]) return;
var a = hs.preloadTheseAjax[i];
var cache = hs.getNode(hs.getParam(a, 'contentId'));
if (!cache) cache = hs.getSelfRendered();
var ajax = new hs.Ajax(a, cache, 1);	ajax.onError = function () { };
ajax.onLoad = function () {
hs.push(hs.cacheBindings, [a, cache]);
hs.preloadAjaxElement(i + 1);
};
ajax.run();
},
focusTopmost : function() {
var topZ = 0, topmostKey = -1;
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i]) {
if (hs.expanders[i].wrapper.style.zIndex && hs.expanders[i].wrapper.style.zIndex > topZ) {
topZ = hs.expanders[i].wrapper.style.zIndex;
topmostKey = i;
}
}
}
if (topmostKey == -1) hs.focusKey = -1;
else hs.expanders[topmostKey].focus();
},
getParam : function (a, param) {
a.getParams = a.onclick;
var p = a.getParams ? a.getParams() : null;
a.getParams = null;
return (p && typeof p[param] != 'undefined') ? p[param] :
(typeof hs[param] != 'undefined' ? hs[param] : null);
},
getSrc : function (a) {
var src = hs.getParam(a, 'src');
if (src) return src;
return a.href;
},
getNode : function (id) {
var node = hs.$(id), clone = hs.clones[id], a = {};
if (!node && !clone) return null;
if (!clone) {
clone = node.cloneNode(true);
clone.id = '';
hs.clones[id] = clone;
return node;
} else {
return clone.cloneNode(true);
}
},
discardElement : function(d) {
hs.garbageBin.appendChild(d);
hs.garbageBin.innerHTML = '';
},
dim : function(exp) {
if (!hs.dimmer) {
hs.dimmer = hs.createElement ('div',
{
className: 'highslide-dimming',
owner: '',
onclick: function() {
if (hs.fireEvent(hs, 'onDimmerClick'))
hs.close();
}
},
{ position: 'absolute', left: 0 }, hs.container, true);
hs.addEventListener(window, 'resize', hs.setDimmerSize);
}
hs.dimmer.style.display = '';
hs.setDimmerSize();
hs.dimmer.owner += '|'+ exp.key;
if (hs.geckoMac && hs.dimmingGeckoFix)
hs.dimmer.style.background = 'url('+ hs.graphicsDir + 'geckodimmer.png)';	else
hs.fade(hs.dimmer, 0, exp.dimmingOpacity, hs.dimmingDuration);
},
undim : function(key) {
if (!hs.dimmer) return;
if (typeof key != 'undefined') hs.dimmer.owner = hs.dimmer.owner.replace('|'+ key, '');
if (
(typeof key != 'undefined' && hs.dimmer.owner != '')
|| (hs.upcoming && hs.getParam(hs.upcoming, 'dimmingOpacity'))
) return;
if (hs.geckoMac && hs.dimmingGeckoFix)
hs.dimmer.style.background = 'none';
else hs.fade(hs.dimmer, hs.dimmingOpacity, 0, hs.dimmingDuration);
setTimeout( function() {
hs.setStyles(hs.dimmer, { display: 'none', width: 0, height: 0 });
}, hs.dimmingDuration);
},
setDimmerSize : function(exp) {
if (!hs.dimmer) return;
var page = hs.getPageSize();
var h = (hs.ie && exp && exp.wrapper) ?
parseInt(exp.wrapper.style.top) + parseInt(exp.wrapper.style.height)+ (exp.outline ? exp.outline.offset : 0) : 0;
hs.setStyles(hs.dimmer, {
width: page.pageWidth +'px',
height: Math.max(page.pageHeight, h) +'px'
});
},
previousOrNext : function (el, op) {
hs.updateAnchors();
var exp = hs.last = hs.getExpander(el);
try {
var adj = hs.upcoming =  exp.getAdjacentAnchor(op);
adj.onclick();	} catch (e){
hs.last = hs.upcoming = null;
}
try { exp.close(); } catch (e) {}
return false;
},
previous : function (el) {
return hs.previousOrNext(el, -1);
},
next : function (el) {
return hs.previousOrNext(el, 1);	},
keyHandler : function(e) {
if (!e) e = window.event;
if (!e.target) e.target = e.srcElement;
if (e.target.form) return true;
if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
var op = null;
switch (e.keyCode) {
case 32:
op = 2;
break;
case 34:
case 39:
case 40:
op = 1;
break;
case 8:
case 33:
case 37:
case 38:
op = -1;
break;
case 27:
case 13:
op = 0;
}
if (op !== null) {if (op != 2)hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
if (!hs.enableKeyListener) return true;
if (e.preventDefault) e.preventDefault();
else e.returnValue = false;
var exp = hs.getExpander();
if (exp) {
if (op == 0) {
exp.close();
} else if (op == 2) {
if (exp.slideshow) exp.slideshow.hitSpace();
} else {
if (exp.slideshow) exp.slideshow.pause();
hs.previousOrNext(exp.key, op);
}
return false;
}
}
return true;
},
registerOverlay : function (overlay) {
hs.push(hs.overlays, overlay);
},
addSlideshow : function (options) {
hs.push(hs.slideshows, options);
},
getWrapperKey : function (element) {
var el, re = /^highslide-wrapper-([0-9]+)$/;
el = element;
while (el.parentNode)	{
if (el.id && re.test(el.id)) return el.id.replace(re, "$1");
el = el.parentNode;
}
el = element;
while (el.parentNode)	{
if (el.tagName && hs.isHsAnchor(el)) {
for (var key = 0; key < hs.expanders.length; key++) {
var exp = hs.expanders[key];
if (exp && exp.a == el) return key;
}
}
el = el.parentNode;
}
return null;
},
getExpander : function (el) {
if (typeof el == 'undefined') return hs.expanders[hs.focusKey] || null;
if (typeof el == 'number') return hs.expanders[el] || null;
if (typeof el == 'string') el = hs.$(el);
return hs.expanders[hs.getWrapperKey(el)] || null;
},
isHsAnchor : function (a) {
return (a.onclick && a.onclick.toString().replace(/\s/g, ' ').match(/hs.(htmlE|e)xpand/));
},
reOrder : function () {
for (var i = 0; i < hs.expanders.length; i++)
if (hs.expanders[i] && hs.expanders[i].isExpanded) hs.focusTopmost();
},
fireEvent : function (obj, evt, args) {
return obj && obj[evt] ? (obj[evt](obj, args) !== false) : true;
},
mouseClickHandler : function(e)
{	if (!e) e = window.event;
if (e.button > 1) return true;
if (!e.target) e.target = e.srcElement;
var el = e.target;
while (el.parentNode
&& !(/highslide-(image|move|html|resize)/.test(el.className)))
{
el = el.parentNode;
}
var exp = hs.getExpander(el);
if (exp && (exp.isClosing || !exp.isExpanded)) return true;
if (exp && e.type == 'mousedown') {
if (e.target.form) return true;
var match = el.className.match(/highslide-(image|move|resize)/);
if (match) {
hs.dragArgs = { exp: exp , type: match[1], left: exp.x.min, width: exp.x.span, top: exp.y.min,
height: exp.y.span, clickX: e.clientX, clickY: e.clientY };
hs.addEventListener(document, 'mousemove', hs.dragHandler);
if (e.preventDefault) e.preventDefault();
if (/highslide-(image|html)-blur/.test(exp.content.className)) {
exp.focus();
hs.hasFocused = true;
}
return false;
}
else if (/highslide-html/.test(el.className) && hs.focusKey != exp.key) {
exp.focus();
exp.redoShowHide();
}
} else if (e.type == 'mouseup') {
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
if (hs.dragArgs) {
if (hs.dragArgs.type == 'image')
hs.dragArgs.exp.content.style.cursor = hs.styleRestoreCursor;
var hasDragged = hs.dragArgs.hasDragged;
if (!hasDragged &&!hs.hasFocused && !/(move|resize)/.test(hs.dragArgs.type)) {
if (hs.fireEvent(exp, 'onImageClick'))
exp.close();
}
else if (hasDragged || (!hasDragged && hs.hasHtmlexpanders)) {
hs.dragArgs.exp.redoShowHide();
}
if (hs.dragArgs.exp.releaseMask)
hs.dragArgs.exp.releaseMask.style.display = 'none';
if (hasDragged) hs.fireEvent(hs.dragArgs.exp, 'onDrop', hs.dragArgs);
if (hasDragged) hs.setDimmerSize(exp);
hs.hasFocused = false;
hs.dragArgs = null;
} else if (/highslide-image-blur/.test(el.className)) {
el.style.cursor = hs.styleRestoreCursor;	}
}
return false;
},
dragHandler : function(e)
{
if (!hs.dragArgs) return true;
if (!e) e = window.event;
var a = hs.dragArgs, exp = a.exp;
if (exp.iframe) {	if (!exp.releaseMask) exp.releaseMask = hs.createElement('div', null,
{ position: 'absolute', width: exp.x.span+'px', height: exp.y.span+'px',
left: 0, top: 0, zIndex: 4,	background: (hs.ie ? 'white' : 'none'),
opacity: 0.01 },
exp.wrapper, true);
if (exp.releaseMask.style.display == 'none')
exp.releaseMask.style.display = '';
}
a.dX = e.clientX - a.clickX;
a.dY = e.clientY - a.clickY;	var distance = Math.sqrt(Math.pow(a.dX, 2) + Math.pow(a.dY, 2));
if (!a.hasDragged) a.hasDragged = (a.type != 'image' && distance > 0)
|| (distance > (hs.dragSensitivity || 5));
if (a.hasDragged && e.clientX > 5 && e.clientY > 5) {
if (!hs.fireEvent(exp, 'onDrag', a)) return false;
if (a.type == 'resize') exp.resize(a);
else exp.move(a);
}
return false;
},
wrapperMouseHandler : function (e) {
try {
if (!e) e = window.event;
var over = /mouseover/i.test(e.type);
if (!e.target) e.target = e.srcElement;
if (hs.ie) e.relatedTarget =
over ? e.fromElement : e.toElement;
var exp = hs.getExpander(e.target);
if (!exp.isExpanded) return;
if (!exp || !e.relatedTarget || hs.getExpander(e.relatedTarget) == exp
|| hs.dragArgs) return;
hs.fireEvent(exp, over ? 'onMouseOver' : 'onMouseOut', e);
for (var i = 0; i < exp.overlays.length; i++) {
var o = hs.$('hsId'+ exp.overlays[i]);
if (o && o.hideOnMouseOut) {
var from = over ? 0 : o.opacity,
to = over ? o.opacity : 0;	hs.fade(o, from, to);
}
}	} catch (e) {}
},
addEventListener : function (el, event, func) {
try {
el.addEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
el.attachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = func;
}
}
},
removeEventListener : function (el, event, func) {
try {
el.removeEventListener(event, func, false);
} catch (e) {
try {
el.detachEvent('on'+ event, func);
} catch (e) {
el['on'+ event] = null;
}
}
},
preloadFullImage : function (i) {
if (hs.continuePreloading && hs.preloadTheseImages[i] && hs.preloadTheseImages[i] != 'undefined') {
var img = document.createElement('img');
img.onload = function() {
img = null;
hs.preloadFullImage(i + 1);
};
img.src = hs.preloadTheseImages[i];
}
},
preloadImages : function (number) {
if (number && typeof number != 'object') hs.numberOfImagesToPreload = number;
var arr = hs.getAnchors();
for (var i = 0; i < arr.images.length && i < hs.numberOfImagesToPreload; i++) {
hs.push(hs.preloadTheseImages, hs.getSrc(arr.images[i]));
}
if (hs.outlineType)	new hs.Outline(hs.outlineType, function () { hs.preloadFullImage(0)} );
else
hs.preloadFullImage(0);
var cur = hs.createElement('img', { src: hs.graphicsDir + hs.restoreCursor });
},
init : function () {
if (!hs.container) {
hs.container = hs.createElement('div',
null,
{ position: 'absolute', left: 0, top: 0, width: '100%', zIndex: hs.zIndexCounter },
document.body,
true
);
hs.loading = hs.createElement('a', {
className: 'highslide-loading',
title: hs.lang.loadingTitle,
innerHTML: hs.lang.loadingText,
href: 'javascript:;'
}, {
position: 'absolute',
top: '-9999px',
opacity: hs.loadingOpacity,
zIndex: 1
}, hs.container
);
hs.garbageBin = hs.createElement('div', null, { display: 'none' }, hs.container);
hs.clearing = hs.createElement('div', null,
{ clear: 'both', paddingTop: '1px' }, null, true);
Math.linearTween = function (t, b, c, d) {
return c*t/d + b;
};
Math.easeInQuad = function (t, b, c, d) {
return c*(t/=d)*t + b;
};
Math.easeInOutQuad = function (t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
};
for (var x in hs.langDefaults) {
if (typeof hs[x] != 'undefined') hs.lang[x] = hs[x];
else if (typeof hs.lang[x] == 'undefined' && typeof hs.langDefaults[x] != 'undefined')
hs.lang[x] = hs.langDefaults[x];
}
hs.ie6SSL = (hs.ie && hs.ieVersion() <= 6 && location.protocol == 'https:');
hs.fireEvent(this, 'onActivate');
}
},
domReady : function() {
hs.isDomReady = true;
if (hs.onDomReady) hs.onDomReady();
},
updateAnchors : function() {
var els = document.getElementsByTagName('*'), all = [], images = [], htmls = [],groups = {}, re;
for (var i = 0; i < els.length; i++) {
re = hs.isHsAnchor(els[i]);
if (re) {
hs.push(all, els[i]);
if (re[0] == 'hs.expand') hs.push(images, els[i]);
else if (re[0] == 'hs.htmlExpand') hs.push(htmls, els[i]);
var g = hs.getParam(els[i], 'slideshowGroup') || 'none';
if (!groups[g]) groups[g] = [];
hs.push(groups[g], els[i]);
}
}
hs.anchors = { all: all, groups: groups, images: images, htmls: htmls };
return hs.anchors;
},
getAnchors : function() {
return hs.anchors || hs.updateAnchors();
},
fade : function (el, o, oFinal, dur, i, dir) {
if (typeof i == 'undefined') {
if (typeof dur != 'number') dur = 250;
if (dur < 25) {
hs.setStyles( el, { opacity: oFinal	});
return;
}
i = hs.faders.length;
dir = oFinal > o ? 1 : -1;
var step = (25 / (dur - dur % 25)) * Math.abs(o - oFinal);
}
o = parseFloat(o);
var skip = (el.fade === 0 || el.fade === false || (el.fade == 2 && hs.ie));
el.style.visibility = ((skip ? oFinal : o) <= 0) ? 'hidden' : 'visible';
if (skip || o < 0 || (dir == 1 && o > oFinal)) return;
if (el.fading && el.fading.i != i) {
clearTimeout(hs.faders[el.fading.i]);
o = el.fading.o;
}
el.fading = {i: i, o: o, step: (step || el.fading.step)};
el.style.visibility = (o <= 0) ? 'hidden' : 'visible';
hs.setStyles(el, { opacity: o });
hs.faders[i] = setTimeout(function() {
hs.fade(el, o + el.fading.step * dir, oFinal, null, i, dir);
}, 25);
},
close : function(el) {
var exp = hs.getExpander(el);
if (exp) exp.close();
return false;
}
};
hs.Outline =  function (outlineType, onLoad) {
this.onLoad = onLoad;
this.outlineType = outlineType;
var v = hs.ieVersion(), tr;
this.hasAlphaImageLoader = hs.ie && v >= 5.5 && v < 7;
if (!outlineType) {
if (onLoad) onLoad();
return;
}
hs.init();
this.table = hs.createElement(
'table', { cellSpacing: 0 },
{
visibility: 'hidden',
position: 'absolute',
borderCollapse: 'collapse'
},
hs.container,
true
);
var tbody = hs.createElement('tbody', null, null, this.table, 1);
this.td = [];
for (var i = 0; i <= 8; i++) {
if (i % 3 == 0) tr = hs.createElement('tr', null, { height: 'auto' }, tbody, true);
this.td[i] = hs.createElement('td', null, null, tr, true);
var style = i != 4 ? { lineHeight: 0, fontSize: 0} : { position : 'relative' };
hs.setStyles(this.td[i], style);
}
this.td[4].className = outlineType;
this.preloadGraphic();
};
hs.Outline.prototype = {
preloadGraphic : function () {
var src = hs.graphicsDir + (hs.outlinesDir || "outlines/")+ this.outlineType +".png";
var appendTo = hs.safari ? hs.container : null;
this.graphic = hs.createElement('img', null, { position: 'absolute', left: '-9999px',
top: '-9999px' }, appendTo, true);
var pThis = this;
this.graphic.onload = function() { pThis.onGraphicLoad(); };
this.graphic.src = src;
},
onGraphicLoad : function () {
var o = this.offset = this.graphic.width / 4,
pos = [[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]],
dim = { height: (2*o) +'px', width: (2*o) +'px' };
hs.discardElement(this.graphic);
for (var i = 0; i <= 8; i++) {
if (pos[i]) {
if (this.hasAlphaImageLoader) {
var w = (i == 1 || i == 7) ? '100%' : this.graphic.width +'px';
var div = hs.createElement('div', null, { width: '100%', height: '100%', position: 'relative', overflow: 'hidden'}, this.td[i], true);
hs.createElement ('div', null, {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+ this.graphic.src + "')",
position: 'absolute',
width: w,
height: this.graphic.height +'px',
left: (pos[i][0]*o)+'px',
top: (pos[i][1]*o)+'px'
},
div,
true);
} else {
hs.setStyles(this.td[i], { background: 'url('+ this.graphic.src +') '+ (pos[i][0]*o)+'px '+(pos[i][1]*o)+'px'});
}
if (window.opera && (i == 3 || i ==5))
hs.createElement('div', null, dim, this.td[i], true);
hs.setStyles (this.td[i], dim);
}
}
if (hs.pendingOutlines[this.outlineType]) hs.pendingOutlines[this.outlineType].destroy();
hs.pendingOutlines[this.outlineType] = this;
if (this.onLoad) this.onLoad();
},
setPosition : function (exp, pos, vis) {
pos = pos || {
x: exp.x.min,
y: exp.y.min,
w: exp.x.span + exp.x.p1 + exp.x.p2,
h: exp.y.span + exp.y.p1 + exp.y.p2
};
if (vis) this.table.style.visibility = (pos.h >= 4 * this.offset)
? 'visible' : 'hidden';
hs.setStyles(this.table, {
left: (pos.x - this.offset) +'px',
top: (pos.y - this.offset) +'px',
width: (pos.w + 2 * (exp.x.cb + this.offset)) +'px'
});
pos.w += 2 * (exp.x.cb - this.offset);
pos.h += + 2 * (exp.y.cb - this.offset);
hs.setStyles (this.td[4], {
width: pos.w >= 0 ? pos.w +'px' : 0,
height: pos.h >= 0 ? pos.h +'px' : 0
});
if (this.hasAlphaImageLoader) this.td[3].style.height
= this.td[5].style.height = this.td[4].style.height;
},
destroy : function(hide) {
if (hide) this.table.style.visibility = 'hidden';
else hs.discardElement(this.table);
}
};
hs.Expander = function(a, params, custom, contentType) {
if (document.readyState && hs.ie && !hs.isDomReady) {
hs.onDomReady = function() {
new hs.Expander(a, params, custom, contentType);
};
return;
}
this.a = a;
this.custom = custom;
this.contentType = contentType || 'image';
this.isHtml = (contentType == 'html');
this.isImage = !this.isHtml;
hs.continuePreloading = false;
this.overlays = [];
this.last = hs.last;
hs.last = null;
hs.init();
var key = this.key = hs.expanders.length;
for (var i = 0; i < hs.overrides.length; i++) {
var name = hs.overrides[i];
this[name] = params && typeof params[name] != 'undefined' ?
params[name] : hs[name];
}
if (!this.src) this.src = a.href;
var el = (params && params.thumbnailId) ? hs.$(params.thumbnailId) : a;
el = this.thumb = el.getElementsByTagName('img')[0] || el;
this.thumbsUserSetId = el.id || a.id;
if (!hs.fireEvent(this, 'onInit')) return true;
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].a == a
&& !(this.last && this.transitions[1] == 'crossfade')) {
hs.expanders[i].focus();
return false;
}
}	for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && hs.expanders[i].thumb != el && !hs.expanders[i].onLoadStarted) {
hs.expanders[i].cancelLoading();
}
}
hs.expanders[this.key] = this;
if (!hs.allowMultipleInstances) {
if (hs.expanders[key-1]) hs.expanders[key-1].close();
if (typeof hs.focusKey != 'undefined' && hs.expanders[hs.focusKey])
hs.expanders[hs.focusKey].close();
}
var pos = hs.getPosition(el);
var x = this.x = {};
x.t = el.width ? parseInt(el.width) : el.offsetWidth;
x.tpos = pos.x;
x.tb = (el.offsetWidth - x.t) / 2;
var y = this.y = {};
y.t = el.height ? parseInt(el.height) : el.offsetHeight;
y.tpos = pos.y;
y.tb = (el.offsetHeight - y.t) / 2;
x.p1 = x.p2 = y.p1 = y.p2 = 0;
if (/area/i.test(el.tagName)) this.getImageMapAreaCorrection(el);
this.wrapper = hs.createElement(
'div', {
id: 'highslide-wrapper-'+ this.key,
className: this.wrapperClassName
}, {
visibility: 'hidden',
position: 'absolute',
zIndex: hs.zIndexCounter++
}, null, true );
this.wrapper.onmouseover = this.wrapper.onmouseout = hs.wrapperMouseHandler;
if (this.contentType == 'image' && this.outlineWhileAnimating == 2)
this.outlineWhileAnimating = 0;
if (!this.outlineType
|| (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
this[this.contentType +'Create']();
} else if (hs.pendingOutlines[this.outlineType]) {
this.connectOutline();
this[this.contentType +'Create']();
} else {
this.showLoading();
var exp = this;
new hs.Outline(this.outlineType,
function () {
exp.connectOutline();
exp[exp.contentType +'Create']();
}
);
}
return true;
};
hs.Expander.prototype = {
connectOutline : function(x, y) {
var o = this.outline = hs.pendingOutlines[this.outlineType];
o.table.style.zIndex = this.wrapper.style.zIndex;
hs.pendingOutlines[this.outlineType] = null;
},
showLoading : function() {
if (this.onLoadStarted || this.loading) return;
this.loading = hs.loading;
var exp = this;
this.loading.onclick = function() {
exp.cancelLoading();
};
if (!hs.fireEvent(this, 'onShowLoading')) return;
var exp = this,
l = (this.x.tpos + this.x.tb
+ (this.x.t - this.loading.offsetWidth) / 2) +'px',
t = (this.y.tpos
+ (this.y.t - this.loading.offsetHeight) / 2) +'px';
if (!tgt && this.last && this.transitions[1] == 'crossfade')
var tgt = this.last;
if (tgt) {
l = (tgt.x.min + tgt.x.cb + tgt.x.p1
+ (tgt.x.span - this.loading.offsetWidth) / 2) +'px';
t = (tgt.y.min + tgt.y.cb + tgt.y.p1
+ (tgt.y.span - this.loading.offsetHeight) / 2) +'px';
this.loading.style.zIndex = hs.zIndexCounter++;
}
setTimeout(function () {
if (exp.loading) hs.setStyles(exp.loading, { left: l, top: t })}
, 100);
},
imageCreate : function() {
var exp = this;
var img = document.createElement('img');
this.content = img;
img.onload = function () {
if (hs.expanders[exp.key]) exp.contentLoaded();
};
if (hs.blockRightClick) img.oncontextmenu = function() { return false; };
img.className = 'highslide-image';
hs.setStyles(img, {
visibility: 'hidden',
display: 'block',
position: 'absolute',
maxWidth: '9999px',
zIndex: 3
});
img.title = hs.lang.restoreTitle;
if (hs.safari) hs.container.appendChild(img);
if (hs.ie && hs.flushImgSize) img.src = null;
img.src = this.src;
this.showLoading();
},
htmlCreate : function () {
if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
this.content = hs.getCacheBinding(this.a);
if (!this.content)
this.content = hs.getNode(this.contentId);
if (!this.content)
this.content = hs.getSelfRendered();
this.getInline(['maincontent']);
if (this.maincontent) {
var body = hs.getElementByClass(this.content, 'div', 'highslide-body');
if (body) body.appendChild(this.maincontent);
this.maincontent.style.display = 'block';
}
hs.fireEvent(this, 'onAfterGetContent');
this.innerContent = this.content;
if (/(swf|iframe)/.test(this.objectType)) this.setObjContainerSize(this.innerContent);
hs.container.appendChild(this.wrapper);
hs.setStyles( this.wrapper, {
position: 'static',
padding: '0 '+ hs.marginRight +'px 0 '+ hs.marginLeft +'px'
});
this.content = hs.createElement(
'div', {
className: 'highslide-html'
}, {
position: 'relative',
zIndex: 3,
overflow: 'hidden'
},
this.wrapper
);
this.mediumContent = hs.createElement('div', null, null, this.content, 1);
this.mediumContent.appendChild(this.innerContent);
hs.setStyles (this.innerContent, { position: 'relative', display: 'block' });
if (this.width) this.innerContent.style.width = this.width+'px';
if (this.height) this.innerContent.style.height = this.height+'px';
if (this.innerContent.offsetWidth < this.minWidth)
this.innerContent.style.width = this.minWidth +'px';
if (this.objectType == 'ajax' && !hs.getCacheBinding(this.a)) {
this.showLoading();
var ajax = new hs.Ajax(this.a, this.innerContent);
var exp = this;
ajax.onLoad = function () {	if (hs.expanders[exp.key]) exp.contentLoaded(); };
ajax.onError = function () { location.href = exp.src; };
ajax.run();
}
else
if (this.objectType == 'iframe' && this.objectLoadTime == 'before') {
this.writeExtendedContent();
}
else
this.contentLoaded();
},
contentLoaded : function() {
try {	if (!this.content) return;
this.content.onload = null;
if (this.onLoadStarted) return;
else this.onLoadStarted = true;
var x = this.x, y = this.y;
if (this.loading) {
hs.setStyles(this.loading, { top: '-9999px' });
this.loading = null;
hs.fireEvent(this, 'onHideLoading');
}
this.marginBottom = hs.marginBottom;
if (this.isImage) {	x.full = this.content.width;
y.full = this.content.height;
hs.setStyles(this.content, {
width: this.x.t +'px',
height: this.y.t +'px'
});
} else if (this.htmlGetSize) this.htmlGetSize();
this.wrapper.appendChild(this.content);
hs.setStyles (this.wrapper, {
left: this.x.tpos +'px',
top: this.y.tpos +'px'
});
hs.container.appendChild(this.wrapper);
x.cb = (this.content.offsetWidth - this.x.t) / 2;
y.cb = (this.content.offsetHeight - this.y.t) / 2;
var modMarginRight = hs.marginRight + 2 * x.cb;
this.marginBottom += 2 * y.cb;
this.initSlideshow();
this.getOverlays();
var ratio = x.full / y.full;
var minWidth = this.allowSizeReduction
? this.minWidth : x.full;
var minHeight = this.allowSizeReduction
? this.minHeight : y.full;
var justify = { x: 'auto', y: 'auto' };
if (this.align == 'center') {
justify.x = 'center';
justify.y = 'center';
} else {
if (this.anchor.match(/^top/)) justify.y = null;
if (this.anchor.match(/right$/)) justify.x = 'max';
if (this.anchor.match(/^bottom/)) justify.y = 'max';
if (this.anchor.match(/left$/)) justify.x = null;
}
var page = hs.getPageSize();
x.min = x.tpos - x.cb + x.tb;
x.span = Math.min(x.full, this.maxWidth || x.full);
x.minSpan = Math.min(x.full, minWidth);
x.justify = justify.x;
x.target = this.targetX;
x.marginMin = hs.marginLeft;
x.marginMax = modMarginRight;
x.scroll = page.scrollLeft;
x.clientSpan = page.width;
this.justify(x);
y.min = y.tpos - y.cb + y.tb;
y.span = Math.min(y.full, this.maxHeight || y.full);
y.minSpan = Math.min(y.full, minHeight);
y.justify = justify.y;
y.target = this.targetY;
y.marginMin = hs.marginTop;
y.marginMax = this.marginBottom;
y.scroll = page.scrollTop;
y.clientSpan = page.height;
this.justify(y);
if (this.isHtml) this.htmlSizeOperations();
if (this.overlayBox) this.sizeOverlayBox(0, 1);
if (this.allowSizeReduction) {
if (this.isImage)
this.correctRatio(ratio);
else this.fitOverlayBox();
var ss = this.slideshow;
if (ss && this.last && ss.fixedControls && ss.useControls) {
var pos = ss.overlayOptions.position || '';
for (var dim in hs.oPos) for (var i = 0; i < 5; i++) {
if (pos.match(hs.oPos[dim][i]))
this[dim].min = this.last[dim].min
+ (this.last[dim].p1 - this[dim].p1)
+ (this.last[dim].span - this[dim].span) * [0, 0, .5, 1, 1][i]
}
}
if (this.isImage && this.x.full > this.x.span) {
this.createFullExpand();
if (this.overlays.length == 1) this.sizeOverlayBox();	}
}
this.show();
} catch (e) {
window.location.href = this.src;
}
},
setObjContainerSize : function(parent, auto) {
var c = hs.getElementByClass(parent, 'DIV', 'highslide-body');
if (/(iframe|swf)/.test(this.objectType)) {
if (this.objectWidth) c.style.width = this.objectWidth +'px';
if (this.objectHeight) c.style.height = this.objectHeight +'px';
}
},
writeExtendedContent : function () {
if (this.hasExtendedContent) return;
var exp = this;
this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (this.objectType == 'iframe') {
this.showLoading();
var ruler = hs.clearing.cloneNode(1);
this.body.appendChild(ruler);
this.newWidth = this.innerContent.offsetWidth;
if (!this.objectWidth) this.objectWidth = ruler.offsetWidth;
var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight,
h = this.objectHeight || (hs.getPageSize()).height - hDiff - hs.marginTop - hs.marginBottom,
onload = this.objectLoadTime == 'before' ?
' onload="if (hs.expanders['+ this.key +']) hs.expanders['+ this.key +'].contentLoaded()" ' : '';
this.body.innerHTML += '<iframe name="hs'+ (new Date()).getTime() +'" frameborder="0" key="'+ this.key +'" '
+' allowtransparency="true" style="width:'+ this.objectWidth +'px; height:'+ h +'px" '
+ onload +' src="'+ this.src +'"></iframe>';
this.ruler = this.body.getElementsByTagName('div')[0];
this.iframe = this.body.getElementsByTagName('iframe')[0];
if (this.objectLoadTime == 'after') this.correctIframeSize();
}
if (this.objectType == 'swf') {
this.body.id = this.body.id || 'hs-flash-id-' + this.key;
var a = this.swfOptions;
if (typeof a.params.wmode == 'undefined') a.params.wmode = 'transparent';
if (swfobject) swfobject.embedSWF(this.src, this.body.id, this.objectWidth, this.objectHeight,
a.version || '7', a.expressInstallSwfurl, a.flashvars, a.params, a.attributes);	}
this.hasExtendedContent = true;
},
htmlGetSize : function() {
if (this.iframe && !this.objectHeight) {
var h;
try {
var doc = this.iframe.contentDocument || this.iframe.contentWindow.document;
var clearing = doc.createElement('div');
clearing.style.clear = 'both';
doc.body.appendChild(clearing);
h = clearing.offsetTop;
if (hs.ie) h += parseInt(doc.body.currentStyle.marginTop)
+ parseInt(doc.body.currentStyle.marginBottom) - 1;
} catch (e) {
h = 300;
}
this.iframe.style.height = this.body.style.height = h +'px';
}
this.innerContent.appendChild(hs.clearing);
if (!this.x.full) this.x.full = this.innerContent.offsetWidth;
this.y.full = this.innerContent.offsetHeight;
this.innerContent.removeChild(hs.clearing);
if (hs.ie && this.newHeight > parseInt(this.innerContent.currentStyle.height)) {
this.newHeight = parseInt(this.innerContent.currentStyle.height);
}
hs.setStyles( this.wrapper, { position: 'absolute',	padding: '0'});
hs.setStyles( this.content, { width: this.x.t +'px',	height: this.y.t +'px'});
},
correctIframeSize : function () {
var wDiff = this.innerContent.offsetWidth - this.ruler.offsetWidth;
if (wDiff < 0) wDiff = 0;
var hDiff = this.innerContent.offsetHeight - this.body.offsetHeight;
hs.setStyles(this.iframe, { width: (this.x.span - wDiff) +'px',
height: (this.y.span - hDiff) +'px' });
hs.setStyles(this.body, { width: this.iframe.style.width,
height: this.iframe.style.height });
this.scrollingContent = this.iframe;
this.scrollerDiv = this.scrollingContent;
},
htmlSizeOperations : function () {
this.setObjContainerSize(this.innerContent);
if (this.objectType == 'swf' && this.objectLoadTime == 'before') this.writeExtendedContent();	if (this.x.span < this.x.full && !this.allowWidthReduction) this.x.span = this.x.full;
if (this.y.span < this.y.full && !this.allowHeightReduction) this.y.span = this.y.full;
this.scrollerDiv = this.innerContent;
hs.setStyles(this.mediumContent, {
width: this.x.span +'px',
position: 'relative',
left: (this.x.min - this.x.tpos) +'px',
top: (this.y.min - this.y.tpos) +'px'
});
hs.setStyles(this.innerContent, {
border: 'none',
width: 'auto',
height: 'auto'
});
var node = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
if (node && !/(iframe|swf)/.test(this.objectType)) {
var cNode = node;
node = hs.createElement(cNode.nodeName, null, {overflow: 'hidden'}, null, true);
cNode.parentNode.insertBefore(node, cNode);
node.appendChild(hs.clearing);
node.appendChild(cNode);
var wDiff = this.innerContent.offsetWidth - node.offsetWidth;
var hDiff = this.innerContent.offsetHeight - node.offsetHeight;
node.removeChild(hs.clearing);
var kdeBugCorr = hs.safari || navigator.vendor == 'KDE' ? 1 : 0;
hs.setStyles(node, {
width: (this.x.span - wDiff - kdeBugCorr) +'px',
height: (this.y.span - hDiff) +'px',
overflow: 'auto',
position: 'relative'
}
);
if (kdeBugCorr && cNode.offsetHeight > node.offsetHeight)	{
node.style.width = (parseInt(node.style.width) + kdeBugCorr) + 'px';
}
this.scrollingContent = node;
this.scrollerDiv = this.scrollingContent;
}
if (this.iframe && this.objectLoadTime == 'before') this.correctIframeSize();
if (!this.scrollingContent && this.y.span < this.mediumContent.offsetHeight) this.scrollerDiv = this.content;
if (this.scrollerDiv == this.content && !this.allowWidthReduction && !/(iframe|swf)/.test(this.objectType)) {
this.x.span += 17;
}
if (this.scrollerDiv && this.scrollerDiv.offsetHeight > this.scrollerDiv.parentNode.offsetHeight) {
setTimeout("try { hs.expanders["+ this.key +"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",
hs.expandDuration);
}
},
getImageMapAreaCorrection : function(area) {
var c = area.coords.split(',');
for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]);
if (area.shape.toLowerCase() == 'circle') {
this.x.tpos += c[0] - c[2];
this.y.tpos += c[1] - c[2];
this.x.t = this.y.t = 2 * c[2];
} else {
var maxX, maxY, minX = maxX = c[0], minY = maxY = c[1];
for (var i = 0; i < c.length; i++) {
if (i % 2 == 0) {
minX = Math.min(minX, c[i]);
maxX = Math.max(maxX, c[i]);
} else {
minY = Math.min(minY, c[i]);
maxY = Math.max(maxY, c[i]);
}
}
this.x.tpos += minX;
this.x.t = maxX - minX;
this.y.tpos += minY;
this.y.t = maxY - minY;
}
},
justify : function (p, moveOnly) {
var tgt, dim = p == this.x ? 'x' : 'y';
if (p.target && p.target.match(/ /)) {
tgt = p.target.split(' ');
p.target = tgt[0];
}
if (p.target && hs.$(p.target)) {
p.min = hs.getPosition(hs.$(p.target))[dim];
if (tgt && tgt[1] && tgt[1].match(/^[-]?[0-9]+px$/)) p.min += parseInt(tgt[1]);
} else if (p.justify == 'auto' || p.justify == 'center') {
var hasMovedMin = false;
var allowReduce = true;
if (p.justify == 'center') p.min = Math.round(p.scroll + (p.clientSpan - p.span - p.marginMax - p.p1 - p.p2) / 2);
else
p.min = Math.round(p.min - ((p.span + p.p1 + p.p2 - p.t) / 2));
if (p.min < p.scroll + p.marginMin) {
p.min = p.scroll + p.marginMin;
hasMovedMin = true;	}
if (!moveOnly && p.span < p.minSpan) {
p.span = p.minSpan;
allowReduce = false;
}
if (p.min + p.span + p.p1 + p.p2 > p.scroll + p.clientSpan - p.marginMax) {
if (!moveOnly && hasMovedMin && allowReduce) {
p.span = p.clientSpan - p.marginMin - p.marginMax;
} else if (p.span + p.p1 + p.p2 < p.clientSpan - p.marginMin - p.marginMax) {
p.min = p.scroll + p.clientSpan - p.span - p.marginMin - p.marginMax - p.p1 - p.p2;
} else {
p.min = p.scroll + p.marginMin;
if (!moveOnly && allowReduce) p.span = p.clientSpan - p.marginMin - p.marginMax;
}
}
if (!moveOnly && p.span < p.minSpan) {
p.span = p.minSpan;
allowReduce = false;
}
} else if (p.justify == 'max') {
p.min = Math.floor(p.min - p.span + p.t);
}
if (p.min < p.marginMin) {
var tmpMin = p.min;
p.min = p.marginMin;
if (allowReduce && !moveOnly) p.span = p.span - (p.min - tmpMin);
}
},
correctRatio : function(ratio) {
var x = this.x, y = this.y;
var changed = false;
if (x.span / y.span > ratio) {
x.span = y.span * ratio;
if (x.span < x.minSpan) {
x.span = x.minSpan;
y.span = x.span / ratio;
}
changed = true;
} else if (x.span / y.span < ratio) {
var tmpHeight = y.span;
y.span = x.span / ratio;
changed = true;
}
this.fitOverlayBox(ratio);
if (changed) {
x.min = x.tpos - x.cb + x.tb;
x.minSpan = x.span;
this.justify(x, true);
y.min = y.tpos - y.cb + y.tb;
y.minSpan = y.span;
this.justify(y, true);
if (this.overlayBox) this.sizeOverlayBox();
}
},
fitOverlayBox : function(ratio) {
var x = this.x, y = this.y;
if (this.overlayBox) {
while (y.span > this.minHeight && x.span > this.minWidth
&& y.marginMin + y.p1 + y.span + y.p2 + y.marginMax > y.clientSpan) {
y.span -= 10;
if (ratio) x.span = y.span * ratio;
this.sizeOverlayBox(0, 1);
}
}
},
reflow : function () {
hs.setStyles(this.scrollerDiv, { height: 'auto', width: 'auto' });
this.x.span = this.innerContent.offsetWidth;
this.y.span = this.innerContent.offsetHeight;
var size = { width: this.x.span +'px', height: this.y.span +'px' };
hs.setStyles(this.content, size);
if (this.outline) this.outline.setPosition(this);
},
show : function () {
var imgPos = {x: this.x.min - 20, y: this.y.min - 20, w: this.x.span + 40,
h: this.y.span + 40 };
hs.hideSelects = (hs.ie && hs.ieVersion() < 7);
if (hs.hideSelects) this.showHideElements('SELECT', 'hidden', imgPos);
hs.hideIframes = ((window.opera && navigator.appVersion < 9) || navigator.vendor == 'KDE'
|| (hs.ie && hs.ieVersion() < 5.5));
if (hs.hideIframes) this.showHideElements('IFRAME', 'hidden', imgPos);
if (hs.geckoMac) this.showHideElements('*', 'hidden', imgPos);
hs.fireEvent(this, 'onBeforeExpand');
this.changeSize(
1,
{
xmin: this.x.tpos + this.x.tb - this.x.cb,
ymin: this.y.tpos + this.y.tb - this.y.cb,
xspan: this.x.t,
yspan: this.y.t,
xp1: 0,
xp2: 0,
yp1: 0,
yp2: 0,
o: hs.outlineStartOffset
},
{
xmin: this.x.min,
ymin: this.y.min,
xspan: this.x.span,
yspan: this.y.span,
xp1: this.x.p1,
yp1: this.y.p1,
xp2: this.x.p2,
yp2: this.y.p2,
o: this.outline ? this.outline.offset : 0
},
hs.expandDuration,
hs.expandSteps
);
},
changeSize : function(up, from, to, dur, steps) {
var trans = this.transitions,
other = up ? (this.last ? this.last.a : null) : hs.upcoming,
t = (trans[1] && other
&& hs.getParam(other, 'transitions')[1] == trans[1]) ?
trans[1] : trans[0];
if (up && this.isHtml && trans[1] == 'crossfade') t = trans[1] = 'fade';
if (this[t] && t != 'expand') {
this[t](up, from, to);
return;
}
if (up) hs.setStyles(this.wrapper, { opacity: 1 });
if (this.outline && !this.outlineWhileAnimating) {
if (up) this.outline.setPosition(this);
else this.outline.destroy(
(this.isHtml && this.preserveContent));
}
if (!up && this.overlayBox) {
if (this.slideshow) {
var c = this.slideshow.controls;
if (hs.getExpander(c) == this) c.parentNode.removeChild(c);
}
if (this.isHtml && this.preserveContent) {
this.overlayBox.style.top = '-9999px';
hs.container.appendChild(this.overlayBox);
} else
hs.discardElement(this.overlayBox);
}
if (this.fadeInOut) {
from.op = up ? 0 : 1;
to.op = up;
}
var t,
exp = this,
easing = Math[this.easing] || Math.easeInQuad;
if (!up) easing = Math[this.easingClose] || easing;
for (var i = 1; i <= steps; i++) {
t = Math.round(i * (dur / steps));
(function(){
var pI = i, size = {};
for (var x in from) {
size[x] = easing(t, from[x], to[x] - from[x], dur);
if (!/^op$/.test(x)) size[x] = Math.round(size[x]);
}
setTimeout ( function() {
if (up && pI == 1) {
exp.content.style.visibility = 'visible';
exp.a.className += ' highslide-active-anchor';
}
exp.setSize(size);
}, t);	})();
}
if (up) {
setTimeout(function() {
if (exp.outline) exp.outline.table.style.visibility = "visible";
}, t);
setTimeout(function() {
exp.afterExpand();
}, t + 50);
}
else setTimeout(function() { exp.afterClose(); }, t);
},
setSize : function (to) {
try {	if (to.op) hs.setStyles(this.wrapper, { opacity: to.op });
hs.setStyles ( this.wrapper, {
width : (to.xspan +to.xp1 + to.xp2 +
2 * this.x.cb) +'px',
height : (to.yspan +to.yp1 + to.yp2 +
2 * this.y.cb) +'px',
left: to.xmin +'px',
top: to.ymin +'px'
});
hs.setStyles(this.content, {
top: to.yp1 +'px',
left: to.xp1 +'px',
width: to.xspan +'px',
height: to.yspan +'px'
});
if (this.isHtml) {
hs.setStyles(this.mediumContent, {
left: (this.x.min - to.xmin
+ this.x.p1 - to.xp1) +'px',
top: (this.y.min - to.ymin
+ this.y.p1 - to.yp1) +'px'
});	this.innerContent.style.visibility = 'visible';
}
if (this.outline && this.outlineWhileAnimating) {
var o = this.outline.offset - to.o;
this.outline.setPosition(this, {
x: to.xmin + o,
y: to.ymin + o,
w: to.xspan + to.xp1 + to.xp2 + - 2 * o,
h: to.yspan + to.yp1 + to.yp2 + - 2 * o
}, 1);
}
this.wrapper.style.visibility = 'visible';
} catch (e) {
window.location.href = this.src;	}
},
fade : function(up, from, to) {
this.outlineWhileAnimating = false;
var exp = this,	t = up ? 250 : 0;
if (up) {
hs.setStyles(this.wrapper, { opacity: 0 });
this.setSize(to);
this.content.style.visibility = 'visible';
hs.fade (this.wrapper, 0, 1);
}
if (this.outline) {
this.outline.table.style.zIndex = this.wrapper.style.zIndex;
var dir = up || -1;
for (var i = from.o; dir * i <= dir * to.o; i += dir, t += 25) {
(function() {
var o = up ? to.o - i : from.o - i;
setTimeout(function() {
exp.outline.setPosition(exp, {
x: (exp.x.min + o),
y: (exp.y.min + o),
w: (exp.x.span - 2 * o + exp.x.p1 + exp.x.p2),
h: (exp.y.span - 2 * o + exp.y.p1 + exp.y.p2)
}, 1);
}, t);
})();
}
}
if (up) setTimeout(function() { exp.afterExpand(); }, t+50);
else {
setTimeout( function() {
if (exp.outline) exp.outline.destroy(exp.preserveContent);
hs.fade (exp.wrapper, 1, 0);
setTimeout( function() {
exp.afterClose();
}, 250);
}, t);	}
},
crossfade : function (up, from, to) {
if (!up) return;
var exp = this, steps = parseInt(hs.transitionDuration / 25), last = this.last;
hs.removeEventListener(document, 'mousemove', hs.dragHandler);
hs.setStyles(this.content, {
width: to.xspan +'px',
height: to.yspan +'px'	});
this.outline = this.last.outline;
this.last.outline = null;
this.fadeBox = hs.createElement('div',
{	className: 'highslide-image' },
{
position: 'absolute',
zIndex: 4,
overflow: 'hidden',
display: 'none'
}
);
var names = { oldImg: last, newImg: this };
for (var x in names) {	this[x] = names[x].content.cloneNode(1);
hs.setStyles(this[x], {
position: 'absolute',
border: 0,
visibility: 'visible'
});
this.fadeBox.appendChild(this[x]);
}
this.wrapper.appendChild(this.fadeBox);
from = {
xmin: last.x.min,
xspan: last.x.span,
xp1: last.x.p1,
xp2: last.x.p2,
ymin: last.y.min,
yspan: last.y.span,
yp1: last.y.p1,
yp2: last.y.p2,
o: 1 / steps
};
to.yspan = this.y.span;
to.o = 1;
var t, easing = Math.easeInOutQuad;
this.crossfadeStep(from);
function prep() {
if (exp.overlayBox) {
exp.wrapper.appendChild(exp.overlayBox);
for (var i = 0; i < exp.last.overlays.length; i++) {
var oDiv = hs.$('hsId'+ exp.last.overlays[i]);
if (oDiv.reuse === exp.key) exp.overlayBox.appendChild(oDiv);
else hs.fade(oDiv, oDiv.opacity, 0);
}
}
exp.fadeBox.style.display = '';
exp.last.content.style.display = 'none';
};
if (/rv:1\.[0-8].+Gecko/.test(navigator.userAgent)) setTimeout(prep, 0);
else prep();
if (hs.safari) {
var match = navigator.userAgent.match(/Safari\/([0-9]{3})/);
if (match && parseInt(match[1]) < 525) this.wrapper.style.visibility = 'visible';
}
for (var i = 1; i <= steps; i++) {
t = Math.round(i * (hs.transitionDuration / steps));
(function(){
var size = {}, pI = i;
for (var x in from)	{
var val = easing(t, from[x], to[x] - from[x], hs.transitionDuration);
size[x] = (x != 'o') ? Math.round(val) : val;
}
setTimeout ( function() {
exp.crossfadeStep(size);
}, t);	})();
}
setTimeout ( function () {
exp.crossfadeEnd();
}, t + 100);
},
crossfadeStep : function (size) {
try {
if (this.outline) this.outline.setPosition(this, {
x: size.xmin,
y: size.ymin,
w: size.xspan + size.xp1 + size.xp2,
h: size.yspan + size.yp1 + size.yp2
}, 1);
this.last.wrapper.style.clip = 'rect('
+ (size.ymin - this.last.y.min)+'px, '
+ (size.xspan + size.xp1 + size.xp2 + 2 * this.last.x.cb + size.xmin - this.last.x.min) +'px, '
+ (size.yspan + size.yp1 + size.yp2 + 2 * this.last.y.cb + size.ymin - this.last.y.min) +'px, '
+ (size.xmin - this.last.x.min)+'px)';
hs.setStyles(this.content, {
top: size.yp1 +'px',
left: size.xp1 +'px',
marginTop: (this.y.min - size.ymin) +'px',
marginLeft: (this.x.min - size.xmin) +'px'
});
hs.setStyles(this.wrapper, {
top: size.ymin +'px',
left: size.xmin +'px',
width: (size.xp1 + size.xp2 + size.xspan + 2 * this.x.cb)+ 'px',
height: (size.yp1 + size.yp2 + size.yspan + 2 * this.y.cb) + 'px'
});
hs.setStyles(this.fadeBox, {
width: size.xspan + 'px',
height: size.yspan +'px',
left: size.xp1 +'px',
top: size.yp1 +'px',
visibility: 'visible'
});
hs.setStyles(this.oldImg, {
top: (this.last.y.min - size.ymin + this.last.y.p1 - size.yp1)+'px',
left: (this.last.x.min - size.xmin + this.last.x.p1 - size.xp1)+'px'
});	hs.setStyles(this.newImg, {
opacity: size.o,
top: (this.y.min - size.ymin + this.y.p1 - size.yp1) +'px',
left: (this.x.min - size.xmin + this.x.p1 - size.xp1) +'px'
});
hs.setStyles(this.overlayBox, {
width: size.xspan + 'px',
height: size.yspan +'px',
left: (size.xp1 + this.x.cb)  +'px',
top: (size.yp1 + this.y.cb) +'px'
});
} catch (e) {}
},
crossfadeEnd : function() {
this.wrapper.style.background = this.wrapperBG || '';
this.wrapper.style.visibility = this.content.style.visibility = 'visible';
this.fadeBox.style.display = 'none';
this.a.className += ' highslide-active-anchor';
this.afterExpand();
this.last.afterClose();
},
reuseOverlay : function(o, el) {
if (!this.last) return false;
for (var i = 0; i < this.last.overlays.length; i++) {
var oDiv = hs.$('hsId'+ this.last.overlays[i]);
if (oDiv && oDiv.hsId == o.hsId) {
this.genOverlayBox();
oDiv.reuse = this.key;
hs.push(this.overlays, this.last.overlays[i]);
return true;
}
}
return false;
},
afterExpand : function() {
this.isExpanded = true;	this.focus();
if (this.isHtml && this.objectLoadTime == 'after') this.writeExtendedContent();
if (this.isHtml) {
if (this.iframe) {
try {
var exp = this,
doc = this.iframe.contentDocument || this.iframe.contentWindow.document;
hs.addEventListener(doc, 'mousedown', function () {
if (hs.focusKey != exp.key) exp.focus();
});
} catch(e) {}
if (hs.ie && typeof this.isClosing != 'boolean')
this.iframe.style.width = (this.objectWidth - 1) +'px';
}
}
if (this.dimmingOpacity) hs.dim(this);
if (hs.upcoming && hs.upcoming == this.a) hs.upcoming = null;
this.prepareNextOutline();
if (this.overlayBox) this.showOverlays();
hs.fireEvent(this, 'onAfterExpand');
},
prepareNextOutline : function() {
var key = this.key;
var outlineType = this.outlineType;
new hs.Outline(outlineType,
function () { try { hs.expanders[key].preloadNext(); } catch (e) {} });
},
preloadNext : function() {
var next = this.getAdjacentAnchor(1);
if (next && next.onclick.toString().match(/hs\.expand/))
var img = hs.createElement('img', { src: hs.getSrc(next) });
},
getAdjacentAnchor : function(op) {
var current = this.getAnchorIndex(), as = hs.anchors.groups[this.slideshowGroup || 'none'];
if (!as[current + op] && this.slideshow && this.slideshow.repeat) {
if (op == 1) return as[0];
else if (op == -1) return as[as.length-1];
}
return as[current + op] || null;
},
getAnchorIndex : function() {
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
for (var i = 0; i < arr.length; i++) {
if (arr[i] == this.a) return i;
}
return null;
},
getNumber : function() {
if (this[this.numberPosition]) {
var arr = hs.anchors.groups[this.slideshowGroup || 'none'];
var s = hs.lang.number.replace('%1', this.getAnchorIndex() + 1).replace('%2', arr.length);
this[this.numberPosition].innerHTML =
'<div class="highslide-number">'+ s +'</div>'+ this[this.numberPosition].innerHTML;
}
},
initSlideshow : function() {
if (this.slideshow) return;
if (!this.last) {
for (var i = 0; i < hs.slideshows.length; i++) {
var ss = hs.slideshows[i], sg = ss.slideshowGroup;
if (sg === this.slideshowGroup) this.slideshow = new hs.Slideshow(ss);
}
} else {
this.slideshow = this.last.slideshow;
}
var ss = this.slideshow;
if (!ss) return;
var exp = ss.exp = this;
ss.checkFirstAndLast();
if (ss.useControls) {
var o = ss.overlayOptions || {};
o.overlayId = ss.controls;
o.hsId = 'controls';
this.createOverlay(o);
}
if (!this.last && this.autoplay) ss.play(true);
if (ss.autoplay) {
ss.autoplay = setTimeout(function() {
hs.next(exp.key);
}, (ss.interval || 500));
}
},
cancelLoading : function() {	hs.expanders[this.key] = null;
if (hs.upcoming == this.a) hs.upcoming = null;
hs.undim();
if (this.loading) hs.loading.style.left = '-9999px';
hs.fireEvent(this, 'onHideLoading');
},
writeCredits : function () {
if (this.credits) return;
this.credits = hs.createElement('a',
{
href: hs.creditsHref,
className: 'highslide-credits',
innerHTML: hs.lang.creditsText,
title: hs.lang.creditsTitle
}
);
this.createOverlay({
overlayId: this.credits,
position: 'top left',
hsId: 'credits'
});
},
getInline : function(types, addOverlay) {
for (var i = 0; i < types.length; i++) {
var type = types[i], s = null;
if (type == 'caption' && !hs.fireEvent(this, 'onBeforeGetCaption')) return;
else if (type == 'heading' && !hs.fireEvent(this, 'onBeforeGetHeading')) return;
if (!this[type +'Id'] && this.thumbsUserSetId)
this[type +'Id'] = type +'-for-'+ this.thumbsUserSetId;
if (this[type +'Id']) this[type] = hs.getNode(this[type +'Id']);
if (!this[type] && !this[type +'Text'] && this[type +'Eval']) try {
s = eval(this[type +'Eval']);
} catch (e) {}
if (!this[type] && this[type +'Text']) {
s = this[type +'Text'];
}
if (!this[type] && !s) {
var next = this.a.nextSibling;
while (next && !hs.isHsAnchor(next)) {
if ((new RegExp('highslide-'+ type)).test(next.className || null)) {
this[type] = next.cloneNode(1);
break;
}
next = next.nextSibling;
}
}
if (!this[type] && !s && this.numberPosition == type) s = '\n';
if (!this[type] && s) this[type] = hs.createElement('div',
{ className: 'highslide-'+ type, innerHTML: s } );
if (addOverlay && this[type]) {
var o = { position: (type == 'heading') ? 'above' : 'below' };
for (var x in this[type+'Overlay']) o[x] = this[type+'Overlay'][x];
o.overlayId = this[type];
this.createOverlay(o);
}
}
},
showHideElements : function (tagName, visibility, imgPos) {
var els = document.getElementsByTagName(tagName);
var prop = tagName == '*' ? 'overflow' : 'visibility';
for (var i = 0; i < els.length; i++) {
if (prop == 'visibility' || (document.defaultView.getComputedStyle(
els[i], "").getPropertyValue('overflow') == 'auto'
|| els[i].getAttribute('hidden-by') != null)) {
var hiddenBy = els[i].getAttribute('hidden-by');
if (visibility == 'visible' && hiddenBy) {
hiddenBy = hiddenBy.replace('['+ this.key +']', '');
els[i].setAttribute('hidden-by', hiddenBy);
if (!hiddenBy) els[i].style[prop] = els[i].origProp;
} else if (visibility == 'hidden') {
var elPos = hs.getPosition(els[i]);
elPos.w = els[i].offsetWidth;
elPos.h = els[i].offsetHeight;
if (!this.dimmingOpacity) {
var clearsX = (elPos.x + elPos.w < imgPos.x || elPos.x > imgPos.x + imgPos.w);
var clearsY = (elPos.y + elPos.h < imgPos.y || elPos.y > imgPos.y + imgPos.h);
}
var wrapperKey = hs.getWrapperKey(els[i]);
if (!clearsX && !clearsY && wrapperKey != this.key) {
if (!hiddenBy) {
els[i].setAttribute('hidden-by', '['+ this.key +']');
els[i].origProp = els[i].style[prop];
els[i].style[prop] = 'hidden';
} else if (!hiddenBy.match('['+ this.key +']')) {
els[i].setAttribute('hidden-by', hiddenBy + '['+ this.key +']');
}
} else if (hiddenBy == '['+ this.key +']' || hs.focusKey == wrapperKey) {
els[i].setAttribute('hidden-by', '');
els[i].style[prop] = els[i].origProp || '';
} else if (hiddenBy && hiddenBy.match('['+ this.key +']')) {
els[i].setAttribute('hidden-by', hiddenBy.replace('['+ this.key +']', ''));
}
}
}
}
},
focus : function() {
this.wrapper.style.zIndex = hs.zIndexCounter++;
for (var i = 0; i < hs.expanders.length; i++) {
if (hs.expanders[i] && i == hs.focusKey) {
var blurExp = hs.expanders[i];
blurExp.content.className += ' highslide-'+ blurExp.contentType +'-blur';
if (blurExp.isImage) {
blurExp.content.style.cursor = hs.ie ? 'hand' : 'pointer';
blurExp.content.title = hs.lang.focusTitle;	}	hs.fireEvent(this, 'onBlur');
}
}
if (this.outline) this.outline.table.style.zIndex
= this.wrapper.style.zIndex;
this.content.className = 'highslide-'+ this.contentType;
if (this.isImage) {
this.content.title = hs.lang.restoreTitle;
hs.styleRestoreCursor = window.opera ? 'pointer' : 'url('+ hs.graphicsDir + hs.restoreCursor +'), pointer';
if (hs.ie && hs.ieVersion() < 6) hs.styleRestoreCursor = 'hand';
this.content.style.cursor = hs.styleRestoreCursor;
}
hs.focusKey = this.key;	hs.addEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);	hs.fireEvent(this, 'onFocus');	},
move : function (e) {
this.x.min = e.left + e.dX;
this.y.min = e.top + e.dY;
if (e.type == 'image') this.content.style.cursor = 'move';
hs.setStyles(this.wrapper, { left: this.x.min +'px', top: this.y.min +'px' });
if (this.outline) this.outline.setPosition(this);
},
resize : function (e) {
var w, h, r = e.width / e.height;
w = Math.max(e.width + e.dX, Math.min(this.minWidth, this.x.full));
if (this.isImage && Math.abs(w - this.x.full) < 12) w = this.x.full;
h = this.isHtml ? e.height + e.dY : w / r;
if (h < Math.min(this.minHeight, this.y.full)) {
h = Math.min(this.minHeight, this.y.full);
if (this.isImage) w = h * r;
}
this.x.span = w;
this.y.span = h;
if (this.isHtml) {
var d = this.scrollerDiv;
if (typeof this.wDiff == 'undefined') {
this.wDiff = this.innerContent.offsetWidth - d.offsetWidth;
this.hDiff = this.innerContent.offsetHeight - d.offsetHeight;
}
hs.setStyles(d, { width: (this.x.span - this.wDiff) +'px',
height: (this.y.span - this.hDiff) +'px' });
}
var size = { width: this.x.span +'px', height: this.y.span +'px' };
hs.setStyles(this.content, size);
if (this.releaseMask) hs.setStyles(this.releaseMask, size);
if (this.isHtml) {
this.mediumContent.style.width = 'auto';
if (this.body) hs.setStyles(this.body, { width: 'auto', height: 'auto' });
}
if (this.overlayBox) this.sizeOverlayBox(true);
hs.setStyles(this.wrapper, {
width: (this.x.p1 + this.x.p2 +2 * this.x.cb + this.x.span) +'px',
height: (this.y.p1 + this.y.p2 +2 * this.y.cb + this.y.span) +'px'
});
if (this.slideshow && this.isImage) {
if (w == this.x.full) this.slideshow.disable('full-expand');
else this.slideshow.enable('full-expand');
}
if (this.outline) this.outline.setPosition(this);
},
close : function() {
if (this.isClosing || !this.isExpanded
|| (hs.upcoming && this.transitions[1] == 'crossfade')
) return;
this.isClosing = true;
if (!hs.fireEvent(this, 'onBeforeClose')) return;
if (this.slideshow && !hs.upcoming) this.slideshow.pause();
hs.removeEventListener(document, window.opera ? 'keypress' : 'keydown', hs.keyHandler);
try {
if (this.isHtml) this.htmlPrepareClose();
this.content.style.cursor = 'default';
this.changeSize(
0, {
xmin: this.x.min,
ymin: this.y.min,
xspan: this.x.span,
yspan: parseInt(this.content.style.height),
xp1: this.x.p1,
yp1: this.y.p1,
xp2: this.x.p2,
yp2: this.y.p2,
o: this.outline ? this.outline.offset : 0
}, {
xmin: this.x.tpos - this.x.cb + this.x.tb,
ymin: this.y.tpos - this.y.cb + this.y.tb,
xspan: this.x.t,
yspan: this.y.t,
xp1: 0,
yp1: 0,
xp2: 0,
yp2: 0,
o: hs.outlineStartOffset
},
hs.restoreDuration,
hs.restoreSteps
);
} catch (e) { this.afterClose(); }
},
htmlPrepareClose : function() {
if (hs.geckoMac) {
if (!hs.mask) hs.mask = hs.createElement('div', null,
{ position: 'absolute' }, hs.container);
hs.setStyles(hs.mask, { width: this.x.span +'px', height: this.y.span +'px',
left: this.x.min +'px', top: this.y.min +'px', display: 'block' });	}
if (this.objectType == 'swf') try { hs.$(this.body.id).StopPlay(); } catch (e) {}
if (this.objectLoadTime == 'after' && !this.preserveContent) this.destroyObject();	if (this.scrollerDiv && this.scrollerDiv != this.scrollingContent)
this.scrollerDiv.style.overflow = 'hidden';
},
destroyObject : function () {
if (hs.ie && this.iframe)
try { this.iframe.contentWindow.document.body.innerHTML = ''; } catch (e) {}
if (this.objectType == 'swf') swfobject.removeSWF(this.body.id);
this.body.innerHTML = '';
},
sleep : function() {
if (this.outline) this.outline.table.style.display = 'none';
this.releaseMask = null;
this.wrapper.style.display = 'none';
hs.push(hs.sleeping, this);
},
awake : function() {
hs.expanders[this.key] = this;
if (!hs.allowMultipleInstances &&hs.focusKey != this.key) {	try { hs.expanders[hs.focusKey].close(); } catch (e){}
}
var z = hs.zIndexCounter++, stl = { display: '', zIndex: z };
hs.setStyles (this.wrapper, stl);
this.isClosing = false;
var o = this.outline || 0;
if (o) {
if (!this.outlineWhileAnimating) stl.visibility = 'hidden';
hs.setStyles (o.table, stl);	}
this.show();
},
createOverlay : function (o) {
var el = o.overlayId;
if (typeof el == 'string') el = hs.getNode(el);
if (!el || typeof el == 'string') return;
if (!hs.fireEvent(this, 'onCreateOverlay', { overlay: el })) return;
el.style.display = 'block';
o.hsId = o.hsId || o.overlayId;
if (this.transitions[1] == 'crossfade' && this.reuseOverlay(o, el)) return;
this.genOverlayBox();
var width = o.width && /^[0-9]+(px|%)$/.test(o.width) ? o.width : 'auto';
if (/^(left|right)panel$/.test(o.position) && !/^[0-9]+px$/.test(o.width)) width = '200px';
var overlay = hs.createElement(
'div',
{ id: 'hsId'+ hs.idCounter++, hsId: o.hsId },
{
position: 'absolute',
visibility: 'hidden',
width: width
},
this.overlayBox,
true
);
overlay.appendChild(el);
hs.setAttribs(overlay, {
hideOnMouseOut: o.hideOnMouseOut,
opacity: o.opacity || 1,
hsPos: o.position,
fade: o.fade
});
if (this.gotOverlays) {
this.positionOverlay(overlay);
if (!overlay.hideOnMouseOut || this.mouseIsOver) hs.fade(overlay, 0, overlay.opacity);
}
hs.push(this.overlays, hs.idCounter - 1);
},
positionOverlay : function(overlay) {
var p = overlay.hsPos || 'middle center';
if (/left$/.test(p)) overlay.style.left = 0;
if (/center$/.test(p))	hs.setStyles (overlay, {
left: '50%',
marginLeft: '-'+ Math.round(overlay.offsetWidth / 2) +'px'
});	if (/right$/.test(p))	overlay.style.right = 0;
if (/^leftpanel$/.test(p)) {
hs.setStyles(overlay, {
right: '100%',
marginRight: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});	this.x.p1 = overlay.offsetWidth;
} else if (/^rightpanel$/.test(p)) {
hs.setStyles(overlay, {
left: '100%',
marginLeft: this.x.cb +'px',
top: - this.y.cb +'px',
bottom: - this.y.cb +'px',
overflow: 'auto'
});
this.x.p2 = overlay.offsetWidth;
}
if (/^top/.test(p)) overlay.style.top = 0;
if (/^middle/.test(p))	hs.setStyles (overlay, {
top: '50%',
marginTop: '-'+ Math.round(overlay.offsetHeight / 2) +'px'
});	if (/^bottom/.test(p)) overlay.style.bottom = 0;
if (/^above$/.test(p)) {
hs.setStyles(overlay, {
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
bottom: '100%',
marginBottom: this.y.cb +'px',
width: 'auto'
});
this.y.p1 = overlay.offsetHeight;
} else if (/^below$/.test(p)) {
hs.setStyles(overlay, {
position: 'relative',
left: (- this.x.p1 - this.x.cb) +'px',
right: (- this.x.p2 - this.x.cb) +'px',
top: '100%',
marginTop: this.y.cb +'px',
width: 'auto'
});
this.y.p2 = overlay.offsetHeight;
overlay.style.position = 'absolute';
}
},
getOverlays : function() {	this.getInline(['heading', 'caption'], true);
this.getNumber();
if (this.caption) hs.fireEvent(this, 'onAfterGetCaption');
if (this.heading) hs.fireEvent(this, 'onAfterGetHeading');
if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
if (hs.showCredits) this.writeCredits();
for (var i = 0; i < hs.overlays.length; i++) {
var o = hs.overlays[i], tId = o.thumbnailId, sg = o.slideshowGroup;
if ((!tId && !sg) || (tId && tId == this.thumbsUserSetId)
|| (sg && sg === this.slideshowGroup)) {
if (this.isImage || (this.isHtml && o.useOnHtml))
this.createOverlay(o);
}
}
var os = [];
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (/panel$/.test(o.hsPos)) this.positionOverlay(o);
else hs.push(os, o);
}
var curW = this.x.p1 + this.x.full + this.x.p2;
if (hs.padToMinWidth && curW < hs.minWidth) {
this.x.p1 += (hs.minWidth - curW) / 2;
this.x.p2 += (hs.minWidth - curW) / 2;
}
for (var i = 0; i < os.length; i++) this.positionOverlay(os[i]);
this.gotOverlays = true;
},
genOverlayBox : function() {
if (!this.overlayBox) this.overlayBox = hs.createElement (
'div', null,
{
position : 'absolute',
width: this.x.span ? this.x.span +'px' : this.x.full +'px',
height: 0,
visibility : 'hidden',
overflow : 'hidden',
zIndex : hs.ie ? 4 : null
},
hs.container,
true
);
},
sizeOverlayBox : function(doWrapper, doPanels) {
hs.setStyles( this.overlayBox, {
width: this.x.span +'px',
height: this.y.span +'px'
});
if (doWrapper || doPanels) {
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
if (o && /^(above|below)$/.test(o.hsPos)) {
if (hs.ie && (hs.ieVersion() <= 6 || document.compatMode == 'BackCompat')) {
o.style.width = (this.overlayBox.offsetWidth + 2 * this.x.cb
- this.x.p1 - this.x.p2) +'px';
}
this.y[o.hsPos == 'above' ? 'p1' : 'p2'] = o.offsetHeight;
}
}
}
if (doWrapper) {
hs.setStyles(this.content, {
top: this.y.p1 +'px'
});
hs.setStyles(this.overlayBox, {
top: (this.y.p1 + this.y.cb) +'px'
});
}
},
showOverlays : function() {
var b = this.overlayBox, p = hs.getPageSize(),
mX = hs.mouse.x + p.scrollLeft, mY = hs.mouse.y + p.scrollTop;
hs.setStyles(b, {
top: (this.y.p1 + this.y.cb) +'px',
left: (this.x.p1 + this.x.cb) +'px',
overflow : 'visible'
});
if (hs.safari) b.style.visibility = 'visible';
this.wrapper.appendChild (b);
this.mouseIsOver = this.x.min < mX && mX < this.x.min + this.x.p1 + this.x.span + this.x.p2
&& this.y.min < mY && mY < this.y.min + this.y.p1 + this.y.span + this.y.p2;
for (var i = 0; i < this.overlays.length; i++) {
var o = hs.$('hsId'+ this.overlays[i]);
o.style.zIndex = o.hsId == 'controls' ? 5 : 4;
if (!o.hideOnMouseOut || this.mouseIsOver) hs.fade(o, 0, o.opacity);
}
},
createFullExpand : function () {
if (this.slideshow) {
this.slideshow.enable('full-expand');
return;
}
this.fullExpandLabel = hs.createElement(
'a',
{
href: 'javascript:hs.expanders['+ this.key +'].doFullExpand();',
title: hs.lang.fullExpandTitle,
className: 'highslide-full-expand'
}
);
if (!hs.fireEvent(this, 'onCreateFullExpand')) return;
this.createOverlay({
overlayId: this.fullExpandLabel,
position: hs.fullExpandPosition,
hideOnMouseOut: true,
opacity: hs.fullExpandOpacity
});
},
doFullExpand : function () {
try {
if (!hs.fireEvent(this, 'onDoFullExpand')) return;
if (this.fullExpandLabel) hs.discardElement(this.fullExpandLabel);
else if (this.slideshow) this.slideshow.disable('full-expand');
this.focus();
this.x.min = parseInt(this.wrapper.style.left) - (this.x.full - this.content.width) / 2;
if (this.x.min < hs.marginLeft) this.x.min = hs.marginLeft;	this.wrapper.style.left = this.x.min +'px';
hs.setStyles(this.content, { width: this.x.full +'px', height: this.y.full +'px'});
this.x.span = this.x.full;
this.y.span = this.y.full;
if (this.overlayBox) this.sizeOverlayBox(true);	hs.setStyles(this.wrapper, {
width: (this.x.p1 + 2 * this.x.cb + this.x.span + this.x.p2) +'px',
height: (this.y.p1 + 2 * this.y.cb + this.y.span + this.y.p2) +'px'
});
if (this.outline) this.outline.setPosition(this);
this.redoShowHide();
hs.setDimmerSize(this);
} catch (e) {
window.location.href = this.content.src;
}
},
redoShowHide : function() {
var imgPos = {
x: parseInt(this.wrapper.style.left) - 20,
y: parseInt(this.wrapper.style.top) - 20,
w: this.content.offsetWidth + 40,
h: this.content.offsetHeight + 40
};
if (hs.hideSelects) this.showHideElements('SELECT', 'hidden', imgPos);
if (hs.hideIframes) this.showHideElements('IFRAME', 'hidden', imgPos);
if (hs.geckoMac) this.showHideElements('*', 'hidden', imgPos);
},
afterClose : function () {
this.a.className = this.a.className.replace('highslide-active-anchor', '');
if (hs.hideSelects) this.showHideElements('SELECT', 'visible');
if (hs.hideIframes) this.showHideElements('IFRAME', 'visible');
if (hs.geckoMac) this.showHideElements('*', 'visible');	if (this.isHtml && this.preserveContent) this.sleep();
else {
if (this.outline && this.outlineWhileAnimating) this.outline.destroy();
hs.discardElement(this.wrapper);
}
if (hs.mask) hs.mask.style.display = 'none';
if (this.dimmingOpacity) hs.undim(this.key);
hs.fireEvent(this, 'onAfterClose');
hs.expanders[this.key] = null;	hs.reOrder();
}
};
hs.Ajax = function (a, content, pre) {
this.a = a;
this.content = content;
this.pre = pre;
};
hs.Ajax.prototype = {
run : function () {
if (!this.src) this.src = hs.getSrc(this.a);
if (this.src.match('#')) {
var arr = this.src.split('#');
this.src = arr[0];
this.id = arr[1];
}
else this.id = 'hs-content';
if (hs.cachedGets[this.src]) {
this.cachedGet = hs.cachedGets[this.src];
if (this.id) this.getElementContent();
else this.loadHTML();
return;
}
try { this.xmlHttp = new XMLHttpRequest(); }
catch (e) {
try { this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) {
try { this.xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { this.onError(); }
}
}
var pThis = this;
this.xmlHttp.onreadystatechange = function() {
if(pThis.xmlHttp.readyState == 4) {
if (pThis.id) pThis.getElementContent();
else pThis.loadHTML();
}
};
this.xmlHttp.open("GET", this.src, true);
this.xmlHttp.send(null);
},
getElementContent : function() {
hs.init();
var attribs = window.opera || hs.ie6SSL ? { src: 'about:blank' } : null;
this.iframe = hs.createElement('iframe', attribs,
{ position: 'absolute', left: '-9999px' }, hs.container);
this.loadHTML();
},
loadHTML : function() {
var s = this.cachedGet || this.xmlHttp.responseText;
if (this.pre) hs.cachedGets[this.src] = s;
if (!hs.ie || hs.ieVersion() >= 5.5) {
s = s.replace(/\s/g, ' ').replace(
new RegExp('<link[^>]*>', 'gi'), '').replace(
new RegExp('<script[^>]*>.*?</script>', 'gi'), '');
if (this.iframe) {
var doc = this.iframe.contentDocument;
if (!doc && this.iframe.contentWindow) doc = this.iframe.contentWindow.document;
if (!doc) {
var pThis = this;
setTimeout(function() {	pThis.loadHTML(); }, 25);
return;
}
doc.open();
doc.write(s);
doc.close();
try { s = doc.getElementById(this.id).innerHTML; } catch (e) {
try { s = this.iframe.document.getElementById(this.id).innerHTML; } catch (e) {}
}
} else {
s = s.replace(new RegExp('^.*?<body[^>]*>(.*?)</body>.*?$', 'i'), '$1');
}
}
hs.getElementByClass(this.content, 'DIV', 'highslide-body').innerHTML = s;
this.onLoad();
for (var x in this) this[x] = null;
}
};
hs.Slideshow = function (options) {
hs.updateAnchors();
for (var x in options) this[x] = options[x];
if (this.useControls) this.getControls();
};
hs.Slideshow.prototype = {
getControls: function() {
this.controls = hs.createElement('div', { innerHTML: hs.replaceLang(hs.skin.controls) },
null, hs.container);
var buttons = ['play', 'pause', 'previous', 'next', 'move', 'full-expand', 'close'];
this.btn = {};
var pThis = this;
for (var i = 0; i < buttons.length; i++) {
this.btn[buttons[i]] = hs.getElementByClass(this.controls, 'li', 'highslide-'+ buttons[i]);
this.enable(buttons[i]);
}
this.btn.pause.style.display = 'none';
this.disable('full-expand');
},
checkFirstAndLast: function() {
if (this.repeat) return;
var cur = this.exp.getAnchorIndex(), re = /disabled$/;
if (cur == 0)
this.disable('previous');
else if (re.test(this.btn.previous.getElementsByTagName('a')[0].className))
this.enable('previous');
if (cur + 1 == hs.anchors.groups[this.slideshowGroup || 'none'].length) {
this.disable('next');
this.disable('play');
} else if (re.test(this.btn.next.getElementsByTagName('a')[0].className)) {
this.enable('next');
this.enable('play');
}
},
enable: function(btn) {
var sls = this, a = this.btn[btn].getElementsByTagName('a')[0], re = /disabled$/;
a.onclick = function() {
sls[btn]();
return false;
};
if (re.test(a.className)) a.className = a.className.replace(re, '');
},
disable: function(btn) {
var a = this.btn[btn].getElementsByTagName('a')[0];
a.onclick = function() { return false; };
if (!/disabled$/.test(a.className)) a.className += ' disabled';
},
hitSpace: function() {
if (this.autoplay) this.pause();
else this.play();
},
play: function(wait) {
if (this.btn) {
this.btn.play.style.display = 'none';
this.btn.pause.style.display = '';
}
this.autoplay = true;	if (!wait) hs.next(this.exp.key);
},
pause: function() {
if (this.btn) {
this.btn.pause.style.display = 'none';
this.btn.play.style.display = '';
}
clearTimeout(this.autoplay);
this.autoplay = null;
},
previous: function() {
this.pause();
hs.previous(this.btn.previous);
},
next: function() {
this.pause();
hs.next(this.btn.next);
},
move: function() {},
'full-expand': function() {
hs.getExpander().doFullExpand();
},
close: function() {
hs.close(this.btn.close);
}
};
if (document.readyState && hs.ie) {
var src = (window.location.protocol == 'https:') ? '://0' : 'javascript:void(0)';
document.write(
'<script type="text/javascript" defer="defer" src="' + src + '" ' +
'onreadystatechange="if (this.readyState == \'complete\') hs.domReady();"' +
'><\/script>');
}
hs.langDefaults = hs.lang;
var HsExpander = hs.Expander;
hs.addEventListener(document, 'mousemove', function(e) {
hs.mouse = { x: e.clientX, y: e.clientY	};
});
hs.addEventListener(document, 'mousedown', hs.mouseClickHandler);
hs.addEventListener(document, 'mouseup', hs.mouseClickHandler);
hs.addEventListener(window, 'load', hs.preloadImages);
hs.addEventListener(window, 'load', hs.preloadAjax);
hs.addEventListener(window, 'load', function() { hs.pageLoaded = true; });
hs.setClickEvents();
hs.dimmingOpacity = 0.14;
hs.outlineType = 'rounded-white';
hs.outlineWhileAnimating = true;
SRXRNM.directLink();
SRXRNM.linkEqual[':ax:cnt:'] = '-';
SRXRNM.Effect.add({id:'cnt',
start: function(id, request){
var opacity = new Fax.opacity('cnt',1,0.3,50,10);
opacity.afterEnd = request;
},
end: function(id){
new Fax.opacity('cnt',0.3,1,50,10);
}
});
SRXRNM.Filter.add({id:'cnt', url:'/', method:'post', params:['aj=yes']});
SRXRNM. Filter.add({url:['.gif', '.jpg', '.jpeg', 'cart/'], type:'nowrap'});
SRXRNM.Default.loader = 'loader';
var scrollOff;
SRXRNM.Html.onall('load', function(){
	if(!scrollOff) scrollTo(0, 0);
	else scrollOff='';
})
SRXRNM.Html.onall('rezult_block', function(){
	if(!scrollOff) scrollTo(0, 0);
	else scrollOff='';
})
SRXRNM.Default.loader = 'loader';
SRXRNM.Html.on('cnt', 'load', function(ops){ // пробуем, что получится
_gaq.push(['_trackPageview', ops.url]); // для гугла
yaCounter168126.hit(ops.url, document.title.substring(0,80), document.referrer); // для яндекса
});
SRXRNM.Html.onall('load', function(ops){// для liveinternet
    new Image().src = "http://counter.yadro.ru/hit?r" + escape(getReferrer(ops.id)) +
           ((typeof(screen)=="undefined")?"" : ";s"+screen.width+"*"+screen.height+"*" + 
           (screen.colorDepth?screen.colorDepth:screen.pixelDepth)) + ";u"+escape(ops.url) + ";h"+
           escape((ops.title || document.title).substring(0,80)) + ";" +Math.random();   
})
 
function getReferrer(id){ // для liveinternet
    var thread = SRXRNM.Html.thread[id], ref = document.referrer;
    if (thread){
        var hist = thread.history, previous = hist.current - 1;
        ref = previous ? SRXRNM.replaceLinkEqual(hist.storage[previous][0], true) : SRXRNM.delHost(hist.startPageUrl);
    }
   return ref;
}
var userdate=new Array();
function getExpDate(days, hours, minutes){
var expDate = new Date();
if (typeof days == "number" && typeof hours == "number" && typeof minutes == "number"){
expDate.setDate(expDate.getDate()+parseInt(days));
expDate.setHours(expDate.getHours()+parseInt(hours));
expDate.setMinutes(expDate.getMinutes()+parseInt(minutes));
return expDate.toGMTString();
}
}
function getCookieVal(offset){
var endstr=document.cookie.indexOf(";", offset);
if (endstr == 1) {
endstr = document.cookie.lenght;
}
return unescape(document.cookie.substring(offset, endstr));
}
function getCookie(name) {
var cookie = " " + document.cookie;
var search = " " + name + "=";
var setStr = null;
var offset = 0;
var end = 0;
if (cookie.length > 0) {
offset = cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = cookie.indexOf(";", offset)
if (end == -1) {
end = cookie.length;
}
setStr = unescape(cookie.substring(offset, end));
}
}
return(setStr);
}
function setCookie (name, value, expires, path, domain, secure) {
document.cookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
function deleteCookie(name, path, domain){
if (getCookie(name)){
document.cookie = name + "=" +
((path) ? " ; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01 Jan 70 00:00:01 GMT";
}
}
function saveData(name, userdate, time){
var str=userdate.join("~");
if (!time) time=180;
var expDate=getExpDate(time, 0, 0);
setCookie(name, str, expDate);
}
function readData(name){
var str=getCookie(name);
var ArrTmp=new Array();
var ArrTmp=str.split("~");
return ArrTmp;
}
function gebid() {
var elements = []
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
if (typeof element == 'string')
element = document.getElementById(element);
if (arguments.length == 1){
return element;
}
elements.push(element);
}
return elements;
}
var findId = function(id,pref,sub)  {
if(sub) var prefLen=pref.length;
idArr=new Array();
var node = (typeof(id) == 'undefined' ? document.getElementsByTagName('BODY')[0] : document.getElementById(id)).getElementsByTagName('*');
var n=0;
for(var i=0; i<node.length; i++) {
if(node[i].getAttribute('id')) {
if(node[i].getAttribute('id').indexOf(pref)==0){
if(sub) idArr[n] =node[i].getAttribute('id').substr(prefLen,node[i].getAttribute('id').length);
else idArr[n] =node[i].getAttribute('id');
n++;
}
}
}
return idArr;
}
var p = new Object();p.m2=new Object();p.m3b=new Object();p.m3=new Object();p.m4=new Object();p.m4a=new Object();p.m45=new Object();p.m5=new Object();p.m5a=new Object();p.m9=new Object();p.m10=new Object();p.m10a=new Object();p.m11=new Object();p.m11k=new Object();p.m12=new Object();p.m27=new Object();p.m20=new Object();p.m24=new Object();p.m25=new Object();p.m26=new Object();p.m29=new Object();p.m6=new Object();p.m7=new Object();p.m8=new Object();p.m8s=new Object();p.m13=new Object();p.m14=new Object();p.m30=new Object();p.m31=new Object();p.m32=new Object();p.mstella=new Object();p.mvista=new Object();p.mnova=new Object();p.mvitoria=new Object();p.mbravo=new Object();p.mlux=new Object();p.mspring=new Object();p.mcoco=new Object();p.mcocolatex=new Object();p.mnew_house=new Object();p.m2.w0=5850;p.m3b.w0=9850;p.m3.w0=9638;p.m3.s0=25;p.m3.b0=12850;p.m4.w0=12188;p.m4.s0=25;p.m4.b0=16250;p.m4a.w0=9413;p.m4a.s0=25;p.m4a.b0=12550;p.m45.w0=12938;p.m45.s0=25;p.m45.b0=17250;p.m5.w0=13725;p.m5.s0=25;p.m5.b0=18300;p.m5a.w0=9900;p.m5a.s0=25;p.m5a.b0=13200;p.m9.w0=12750;p.m9.s0=25;p.m9.b0=17000;p.m10.w0=12188;p.m10.s0=25;p.m10.b0=16250;p.m10a.w0=12188;p.m10a.s0=25;p.m10a.b0=16250;p.m11.w0=24050;p.m11k.w0=18038;p.m11k.s0=25;p.m11k.b0=24050;p.m12.w0=39000;p.m27.w0=26963;p.m27.s0=25;p.m27.b0=35950;p.m20.w0=17588;p.m20.s0=25;p.m20.b0=23450;p.m24.w0=17325;p.m24.s0=25;p.m24.b0=23100;p.m25.w0=18975;p.m25.s0=25;p.m25.b0=25300;p.m26.w0=14738;p.m26.s0=25;p.m26.b0=19650;p.m29.w0=17213;p.m29.s0=25;p.m29.b0=22950;p.m6.w0=18450;p.m7.w0=19850;p.m8.w0=18950;p.m8s.w0=16650;p.m13.w0=22500;p.m14.w0=24600;p.m30.w0=7200;p.m30.s0=20;p.m30.b0=9000;p.m31.w0=7600;p.m31.s0=20;p.m31.b0=9500;p.m32.w0=7880;p.m32.s0=20;p.m32.b0=9850;p.mstella.w0=6705;p.mstella.s0=10;p.mstella.b0=7450;p.mvista.w0=4545;p.mvista.s0=10;p.mvista.b0=5050;p.mnova.w0=5220;p.mnova.s0=10;p.mnova.b0=5800;p.mvitoria.w0=7245;p.mvitoria.s0=10;p.mvitoria.b0=8050;p.mbravo.w0=10260;p.mbravo.s0=10;p.mbravo.b0=11400;p.mlux.w0=2775;p.mspring.w60x120=3350;p.mcoco.w60x120=2750;p.mcocolatex.w60x120=3560;p.m2.w1=6100;p.m3b.w1=10100;p.m3.w1=9975;p.m3.s1=25;p.m3.b1=13300;p.m4.w1=12713;p.m4.s1=25;p.m4.b1=16950;p.m4a.w1=9788;p.m4a.s1=25;p.m4a.b1=13050;p.m45.w1=13500;p.m45.s1=25;p.m45.b1=18000;p.m5.w1=14288;p.m5.s1=25;p.m5.b1=19050;p.m5a.w1=10200;p.m5a.s1=25;p.m5a.b1=13600;p.m9.w1=13350;p.m9.s1=25;p.m9.b1=17800;p.m10.w1=12713;p.m10.s1=25;p.m10.b1=16950;p.m10a.w1=12713;p.m10a.s1=25;p.m10a.b1=16950;p.m11.w1=25950;p.m11k.w1=19463;p.m11k.s1=25;p.m11k.b1=25950;p.m12.w1=43750;p.m27.w1=29813;p.m27.s1=25;p.m27.b1=39750;p.m20.w1=18113;p.m20.s1=25;p.m20.b1=24150;p.m24.w1=17700;p.m24.s1=25;p.m24.b1=23600;p.m25.w1=19538;p.m25.s1=25;p.m25.b1=26050;p.m26.w1=15075;p.m26.s1=25;p.m26.b1=20100;p.m29.w1=17588;p.m29.s1=25;p.m29.b1=23450;p.m6.w1=20100;p.m7.w1=21550;p.m8.w1=20550;p.m8s.w1=18600;p.m13.w1=24550;p.m14.w1=26950;p.m30.w1=8000;p.m30.s1=20;p.m30.b1=10000;p.m31.w1=8480;p.m31.s1=20;p.m31.b1=10600;p.m32.w1=8760;p.m32.s1=20;p.m32.b1=10950;p.mstella.w1=7200;p.mstella.s1=10;p.mstella.b1=8000;p.mvista.w1=4680;p.mvista.s1=10;p.mvista.b1=5200;p.mnova.w1=5895;p.mnova.s1=10;p.mnova.b1=6550;p.mvitoria.w1=7830;p.mvitoria.s1=10;p.mvitoria.b1=8700;p.mbravo.w1=11430;p.mbravo.s1=10;p.mbravo.b1=12700;p.mlux.w1=2925;p.mspring.w65x125=3750;p.mcoco.w65x125=2800;p.mcocolatex.w65x125=3850;p.mnew_house.w1=8700;p.m2.w2=6350;p.m3b.w2=10250;p.m3.w2=11175;p.m3.s2=25;p.m3.b2=14900;p.m4.w2=14288;p.m4.s2=25;p.m4.b2=19050;p.m4a.w2=11063;p.m4a.s2=25;p.m4a.b2=14750;p.m45.w2=15075;p.m45.s2=25;p.m45.b2=20100;p.m5.w2=15900;p.m5.s2=25;p.m5.b2=21200;p.m5a.w2=11400;p.m5a.s2=25;p.m5a.b2=15200;p.m9.w2=14813;p.m9.s2=25;p.m9.b2=19750;p.m10.w2=13950;p.m10.s2=25;p.m10.b2=18600;p.m10a.w2=14025;p.m10a.s2=25;p.m10a.b2=18700;p.m11.w2=29100;p.m11k.w2=21825;p.m11k.s2=25;p.m11k.b2=29100;p.m12.w2=52800;p.m27.w2=31613;p.m27.s2=25;p.m27.b2=42150;p.m20.w2=20100;p.m20.s2=25;p.m20.b2=26800;p.m24.w2=19650;p.m24.s2=25;p.m24.b2=26200;p.m25.w2=21600;p.m25.s2=25;p.m25.b2=28800;p.m26.w2=16575;p.m26.s2=25;p.m26.b2=22100;p.m29.w2=19200;p.m29.s2=25;p.m29.b2=25600;p.m6.w2=21900;p.m7.w2=23550;p.m8.w2=22300;p.m8s.w2=20700;p.m13.w2=26800;p.m14.w2=29300;p.m30.w2=10680;p.m30.s2=20;p.m30.b2=13350;p.m31.w2=11320;p.m31.s2=20;p.m31.b2=14150;p.m32.w2=11680;p.m32.s2=20;p.m32.b2=14600;p.mstella.w2=7740;p.mstella.s2=10;p.mstella.b2=8600;p.mvista.w2=5355;p.mvista.s2=10;p.mvista.b2=5950;p.mnova.w2=7425;p.mnova.s2=10;p.mnova.b2=8250;p.mvitoria.w2=9495;p.mvitoria.s2=10;p.mvitoria.b2=10550;p.mbravo.w2=12690;p.mbravo.s2=10;p.mbravo.b2=14100;p.mlux.w2=3968;p.mspring.w70x140=3900;p.mcoco.w70x140=3350;p.mcocolatex.w70x140=4600;p.m2.w3=7300;p.m3b.w3=11050;p.m3.w3=11963;p.m3.s3=25;p.m3.b3=15950;p.m4.w3=15075;p.m4.s3=25;p.m4.b3=20100;p.m4a.w3=11213;p.m4a.s3=25;p.m4a.b3=14950;p.m45.w3=16238;p.m45.s3=25;p.m45.b3=21650;p.m5.w3=17363;p.m5.s3=25;p.m5.b3=23150;p.m5a.w3=12188;p.m5a.s3=25;p.m5a.b3=16250;p.m9.w3=15788;p.m9.s3=25;p.m9.b3=21050;p.m10.w3=14813;p.m10.s3=25;p.m10.b3=19750;p.m10a.w3=14813;p.m10a.s3=25;p.m10a.b3=19750;p.m11.w3=31400;p.m11k.w3=23550;p.m11k.s3=25;p.m11k.b3=31400;p.m12.w3=53900;p.m27.w3=38813;p.m27.s3=25;p.m27.b3=51750;p.m20.w3=21300;p.m20.s3=25;p.m20.b3=28400;p.m24.w3=20625;p.m24.s3=25;p.m24.b3=27500;p.m25.w3=23025;p.m25.s3=25;p.m25.b3=30700;p.m26.w3=17850;p.m26.s3=25;p.m26.b3=23800;p.m29.w3=20700;p.m29.s3=25;p.m29.b3=27600;p.m6.w3=23350;p.m7.w3=25050;p.m8.w3=23800;p.m8s.w3=21250;p.m13.w3=28750;p.m14.w3=31600;p.m30.w3=10680;p.m30.s3=20;p.m30.b3=13350;p.m31.w3=11320;p.m31.s3=20;p.m31.b3=14150;p.m32.w3=11680;p.m32.s3=20;p.m32.b3=14600;p.mstella.w3=8370;p.mstella.s3=10;p.mstella.b3=9300;p.mvista.w3=5715;p.mvista.s3=10;p.mvista.b3=6350;p.mnova.w3=7425;p.mnova.s3=10;p.mnova.b3=8250;p.mvitoria.w3=10080;p.mvitoria.s3=10;p.mvitoria.b3=11200;p.mbravo.w3=13950;p.mbravo.s3=10;p.mbravo.b3=15500;p.mlux.w3=3968;p.m2.w4=7600;p.m3b.w4=11400;p.m3.w4=12488;p.m3.s4=25;p.m3.b4=16650;p.m4.w4=16013;p.m4.s4=25;p.m4.b4=21350;p.m4a.w4=11700;p.m4a.s4=25;p.m4a.b4=15600;p.m45.w4=17250;p.m45.s4=25;p.m45.b4=23000;p.m5.w4=18525;p.m5.s4=25;p.m5.b4=24700;p.m5a.w4=12525;p.m5a.s4=25;p.m5a.b4=16700;p.m9.w4=16650;p.m9.s4=25;p.m9.b4=22200;p.m10.w4=15600;p.m10.s4=25;p.m10.b4=20800;p.m10a.w4=15600;p.m10a.s4=25;p.m10a.b4=20800;p.m11.w4=33650;p.m11k.w4=25238;p.m11k.s4=25;p.m11k.b4=33650;p.m12.w4=57500;p.m27.w4=39938;p.m27.s4=25;p.m27.b4=53250;p.m20.w4=22500;p.m20.s4=25;p.m20.b4=30000;p.m24.w4=21825;p.m24.s4=25;p.m24.b4=29100;p.m25.w4=24188;p.m25.s4=25;p.m25.b4=32250;p.m26.w4=19313;p.m26.s4=25;p.m26.b4=25750;p.m29.w4=21525;p.m29.s4=25;p.m29.b4=28700;p.m6.w4=25050;p.m7.w4=27000;p.m8.w4=24900;p.m8s.w4=22200;p.m13.w4=31000;p.m14.w4=33800;p.m30.w4=10680;p.m30.s4=20;p.m30.b4=13350;p.m31.w4=11320;p.m31.s4=20;p.m31.b4=14150;p.m32.w4=11680;p.m32.s4=20;p.m32.b4=14600;p.mstella.w4=9225;p.mstella.s4=10;p.mstella.b4=10250;p.mvista.w4=6030;p.mvista.s4=10;p.mvista.b4=6700;p.mnova.w4=7560;p.mnova.s4=10;p.mnova.b4=8400;p.mvitoria.w4=10260;p.mvitoria.s4=10;p.mvitoria.b4=11400;p.mbravo.w4=15210;p.mbravo.s4=10;p.mbravo.b4=16900;p.mlux.w4=3450;p.m2.w5=8100;p.m3b.w5=11950;p.m3.w5=13388;p.m3.s5=25;p.m3.b5=17850;p.m4.w5=17025;p.m4.s5=25;p.m4.b5=22700;p.m4a.w5=12413;p.m4a.s5=25;p.m4a.b5=16550;p.m45.w5=18450;p.m45.s5=25;p.m45.b5=24600;p.m5.w5=19838;p.m5.s5=25;p.m5.b5=26450;p.m5a.w5=13725;p.m5a.s5=25;p.m5a.b5=18300;p.m9.w5=17850;p.m9.s5=25;p.m9.b5=23800;p.m10.w5=16800;p.m10.s5=25;p.m10.b5=22400;p.m10a.w5=16800;p.m10a.s5=25;p.m10a.b5=22400;p.m11.w5=36000;p.m11k.w5=27000;p.m11k.s5=25;p.m11k.b5=36000;p.m12.w5=64400;p.m27.w5=45450;p.m27.s5=25;p.m27.b5=60600;p.m20.w5=24150;p.m20.s5=25;p.m20.b5=32200;p.m24.w5=23475;p.m24.s5=25;p.m24.b5=31300;p.m25.w5=25913;p.m25.s5=25;p.m25.b5=34550;p.m26.w5=20700;p.m26.s5=25;p.m26.b5=27600;p.m29.w5=23138;p.m29.s5=25;p.m29.b5=30850;p.m6.w5=26400;p.m7.w5=28450;p.m8.w5=26800;p.m8s.w5=26150;p.m13.w5=33150;p.m14.w5=36350;p.m30.w5=12000;p.m30.s5=20;p.m30.b5=15000;p.m31.w5=12640;p.m31.s5=20;p.m31.b5=15800;p.m32.w5=13160;p.m32.s5=20;p.m32.b5=16450;p.mstella.w5=9900;p.mstella.s5=10;p.mstella.b5=11000;p.mvista.w5=6390;p.mvista.s5=10;p.mvista.b5=7100;p.mnova.w5=7560;p.mnova.s5=10;p.mnova.b5=8400;p.mvitoria.w5=11430;p.mvitoria.s5=10;p.mvitoria.b5=12700;p.mbravo.w5=16470;p.mbravo.s5=10;p.mbravo.b5=18300;p.mlux.w5=4140;p.m2.w6=8400;p.m3b.w6=12500;p.m3.w6=14363;p.m3.s6=25;p.m3.b6=19150;p.m4.w6=18225;p.m4.s6=25;p.m4.b6=24300;p.m4a.w6=13275;p.m4a.s6=25;p.m4a.b6=17700;p.m45.w6=19538;p.m45.s6=25;p.m45.b6=26050;p.m5.w6=20888;p.m5.s6=25;p.m5.b6=27850;p.m5a.w6=14288;p.m5a.s6=25;p.m5a.b6=19050;p.m9.w6=18900;p.m9.s6=25;p.m9.b6=25200;p.m10.w6=17850;p.m10.s6=25;p.m10.b6=23800;p.m10a.w6=17850;p.m10a.s6=25;p.m10a.b6=23800;p.m11.w6=39200;p.m11k.w6=29400;p.m11k.s6=25;p.m11k.b6=39200;p.m12.w6=71450;p.m27.w6=46613;p.m27.s6=25;p.m27.b6=62150;p.m20.w6=25800;p.m20.s6=25;p.m20.b6=34400;p.m24.w6=25388;p.m24.s6=25;p.m24.b6=33850;p.m25.w6=26850;p.m25.s6=25;p.m25.b6=35800;p.m26.w6=21938;p.m26.s6=25;p.m26.b6=29250;p.m29.w6=24338;p.m29.s6=25;p.m29.b6=32450;p.m6.w6=28100;p.m7.w6=30450;p.m8.w6=30450;p.m8s.w6=28100;p.m13.w6=35200;p.m14.w6=38550;p.m30.w6=12000;p.m30.s6=20;p.m30.b6=15000;p.m31.w6=12640;p.m31.s6=20;p.m31.b6=15800;p.m32.w6=13160;p.m32.s6=20;p.m32.b6=16450;p.mstella.w6=10575;p.mstella.s6=10;p.mstella.b6=11750;p.mvista.w6=6705;p.mvista.s6=10;p.mvista.b6=7450;p.mnova.w6=8235;p.mnova.s6=10;p.mnova.b6=9150;p.mvitoria.w6=11790;p.mvitoria.s6=10;p.mvitoria.b6=13100;p.mbravo.w6=17820;p.mbravo.s6=10;p.mbravo.b6=19800;p.mlux.w6=3600;p.mnew_house.w6=14000;p.m2.w7=8650;p.m3b.w7=13150;p.m3.w7=15263;p.m3.s7=25;p.m3.b7=20350;p.m4.w7=19538;p.m4.s7=25;p.m4.b7=26050;p.m4a.w7=14400;p.m4a.s7=25;p.m4a.b7=19200;p.m45.w7=21038;p.m45.s7=25;p.m45.b7=28050;p.m5.w7=22500;p.m5.s7=25;p.m5.b7=30000;p.m5a.w7=14925;p.m5a.s7=25;p.m5a.b7=19900;p.m9.w7=20363;p.m9.s7=25;p.m9.b7=27150;p.m10.w7=19200;p.m10.s7=25;p.m10.b7=25600;p.m10a.w7=19200;p.m10a.s7=25;p.m10a.b7=25600;p.m11.w7=41600;p.m11k.w7=31200;p.m11k.s7=25;p.m11k.b7=41600;p.m12.w7=76600;p.m27.w7=52238;p.m27.s7=25;p.m27.b7=69650;p.m20.w7=27750;p.m20.s7=25;p.m20.b7=37000;p.m24.w7=27225;p.m24.s7=25;p.m24.b7=36300;p.m25.w7=29850;p.m25.s7=25;p.m25.b7=39800;p.m26.w7=23138;p.m26.s7=25;p.m26.b7=30850;p.m29.w7=26325;p.m29.s7=25;p.m29.b7=35100;p.m6.w7=29850;p.m7.w7=32150;p.m8.w7=31300;p.m8s.w7=30200;p.m13.w7=37350;p.m14.w7=41050;p.m30.w7=13720;p.m30.s7=20;p.m30.b7=17150;p.m31.w7=14600;p.m31.s7=20;p.m31.b7=18250;p.m32.w7=15280;p.m32.s7=20;p.m32.b7=19100;p.mstella.w7=10755;p.mstella.s7=10;p.mstella.b7=11950;p.mvista.w7=7200;p.mvista.s7=10;p.mvista.b7=8000;p.mnova.w7=8235;p.mnova.s7=10;p.mnova.b7=9150;p.mvitoria.w7=12780;p.mvitoria.s7=10;p.mvitoria.b7=14200;p.mbravo.w7=19305;p.mbravo.s7=10;p.mbravo.b7=21450;p.mlux.w7=4399;p.m2.w8=9200;p.m3b.w8=13600;p.m3.w8=16275;p.m3.s8=25;p.m3.b8=21700;p.m4.w8=20513;p.m4.s8=25;p.m4.b8=27350;p.m4a.w8=14700;p.m4a.s8=25;p.m4a.b8=19600;p.m45.w8=21938;p.m45.s8=25;p.m45.b8=29250;p.m5.w8=23400;p.m5.s8=25;p.m5.b8=31200;p.m5a.w8=15600;p.m5a.s8=25;p.m5a.b8=20800;p.m9.w8=21188;p.m9.s8=25;p.m9.b8=28250;p.m10.w8=19838;p.m10.s8=25;p.m10.b8=26450;p.m10a.w8=19838;p.m10a.s8=25;p.m10a.b8=26450;p.m11.w8=42200;p.m11k.w8=31650;p.m11k.s8=25;p.m11k.b8=42200;p.m12.w8=78750;p.m27.w8=53438;p.m27.s8=25;p.m27.b8=71250;p.m20.w8=28838;p.m20.s8=25;p.m20.b8=38450;p.m24.w8=28538;p.m24.s8=25;p.m24.b8=38050;p.m25.w8=31500;p.m25.s8=25;p.m25.b8=42000;p.m26.w8=24188;p.m26.s8=25;p.m26.b8=32250;p.m29.w8=27975;p.m29.s8=25;p.m29.b8=37300;p.m6.w8=32150;p.m7.w8=34600;p.m8.w8=33500;p.m8s.w8=31550;p.m13.w8=40200;p.m14.w8=44150;p.m30.w8=13720;p.m30.s8=20;p.m30.b8=17150;p.m31.w8=14600;p.m31.s8=20;p.m31.b8=18250;p.m32.w8=15280;p.m32.s8=20;p.m32.b8=19100;p.mstella.w8=11745;p.mstella.s8=10;p.mstella.b8=13050;p.mvista.w8=7560;p.mvista.s8=10;p.mvista.b8=8400;p.mnova.w8=10080;p.mnova.s8=10;p.mnova.b8=11200;p.mvitoria.w8=13185;p.mvitoria.s8=10;p.mvitoria.b8=14650;p.mbravo.w8=20340;p.mbravo.s8=10;p.mbravo.b8=22600;p.mlux.w8=3825;p.mnew_house.w8=15500;p.m2.w9=9550;p.m3b.w9=14500;p.m3.w9=16650;p.m3.s9=25;p.m3.b9=22200;p.m4.w9=21825;p.m4.s9=25;p.m4.b9=29100;p.m4a.w9=15263;p.m4a.s9=25;p.m4a.b9=20350;p.m45.w9=22838;p.m45.s9=25;p.m45.b9=30450;p.m5.w9=23925;p.m5.s9=25;p.m5.b9=31900;p.m5a.w9=16388;p.m5a.s9=25;p.m5a.b9=21850;p.m9.w9=23025;p.m9.s9=25;p.m9.b9=30700;p.m10.w9=20850;p.m10.s9=25;p.m10.b9=27800;p.m10a.w9=20888;p.m10a.s9=25;p.m10a.b9=27850;p.m11.w9=46650;p.m11k.w9=34988;p.m11k.s9=25;p.m11k.b9=46650;p.m12.w9=79950;p.m27.w9=58688;p.m27.s9=25;p.m27.b9=78250;p.m20.w9=30863;p.m20.s9=25;p.m20.b9=41150;p.m24.w9=30263;p.m24.s9=25;p.m24.b9=40350;p.m25.w9=33338;p.m25.s9=25;p.m25.b9=44450;p.m26.w9=25688;p.m26.s9=25;p.m26.b9=34250;p.m29.w9=29625;p.m29.s9=25;p.m29.b9=39500;p.m6.w9=33550;p.m7.w9=36050;p.m8.w9=34750;p.m8s.w9=34200;p.m13.w9=42400;p.m14.w9=46600;p.m30.w9=15440;p.m30.s9=20;p.m30.b9=19300;p.m31.w9=16480;p.m31.s9=20;p.m31.b9=20600;p.m32.w9=17040;p.m32.s9=20;p.m32.b9=21300;p.mstella.w9=12060;p.mstella.s9=10;p.mstella.b9=13400;p.mvista.w9=7875;p.mvista.s9=10;p.mvista.b9=8750;p.mnova.w9=10080;p.mnova.s9=10;p.mnova.b9=11200;p.mvitoria.w9=14445;p.mvitoria.s9=10;p.mvitoria.b9=16050;p.mbravo.w9=21690;p.mbravo.s9=10;p.mbravo.b9=24100;p.mlux.w9=4658;p.m2.w10=9850;p.m3b.w10=14900;p.m3.w10=17663;p.m3.s10=25;p.m3.b10=23550;p.m4.w10=22838;p.m4.s10=25;p.m4.b10=30450;p.m4a.w10=15938;p.m4a.s10=25;p.m4a.b10=21250;p.m45.w10=23475;p.m45.s10=25;p.m45.b10=31300;p.m5.w10=24038;p.m5.s10=25;p.m5.b10=32050;p.m5a.w10=17588;p.m5a.s10=25;p.m5a.b10=23450;p.m9.w10=23588;p.m9.s10=25;p.m9.b10=31450;p.m10.w10=22088;p.m10.s10=25;p.m10.b10=29450;p.m10a.w10=22088;p.m10a.s10=25;p.m10a.b10=29450;p.m11.w10=48900;p.m11k.w10=36675;p.m11k.s10=25;p.m11k.b10=48900;p.m12.w10=86700;p.m27.w10=59888;p.m27.s10=25;p.m27.b10=79850;p.m20.w10=31838;p.m20.s10=25;p.m20.b10=42450;p.m24.w10=31463;p.m24.s10=25;p.m24.b10=41950;p.m25.w10=34463;p.m25.s10=25;p.m25.b10=45950;p.m26.w10=26963;p.m26.s10=25;p.m26.b10=35950;p.m29.w10=30525;p.m29.s10=25;p.m29.b10=40700;p.m6.w10=36500;p.m7.w10=39250;p.m8.w10=36850;p.m8s.w10=35250;p.m13.w10=45100;p.m14.w10=49450;p.m30.w10=15520;p.m30.s10=20;p.m30.b10=19400;p.m31.w10=16480;p.m31.s10=20;p.m31.b10=20600;p.m32.w10=17040;p.m32.s10=20;p.m32.b10=21300;p.mstella.w10=12600;p.mstella.s10=10;p.mstella.b10=14000;p.mvista.w10=8370;p.mvista.s10=10;p.mvista.b10=9300;p.mnova.w10=10935;p.mnova.s10=10;p.mnova.b10=12150;p.mvitoria.w10=14805;p.mvitoria.s10=10;p.mvitoria.b10=16450;p.mbravo.w10=22950;p.mbravo.s10=10;p.mbravo.b10=25500;p.mlux.w10=4050;p.m2.w11=10500;p.m3b.w11=16000;p.m3.w11=17925;p.m3.s11=25;p.m3.b11=23900;p.m4.w11=23663;p.m4.s11=25;p.m4.b11=31550;p.m4a.w11=16350;p.m4a.s11=25;p.m4a.b11=21800;p.m45.w11=24713;p.m45.s11=25;p.m45.b11=32950;p.m5.w11=25800;p.m5.s11=25;p.m5.b11=34400;p.m5a.w11=17850;p.m5a.s11=25;p.m5a.b11=23800;p.m9.w11=25013;p.m9.s11=25;p.m9.b11=33350;p.m10.w11=22688;p.m10.s11=25;p.m10.b11=30250;p.m10a.w11=22725;p.m10a.s11=25;p.m10a.b11=30300;p.m11.w11=49600;p.m11k.w11=37200;p.m11k.s11=25;p.m11k.b11=49600;p.m12.w11=92850;p.m27.w11=61575;p.m27.s11=25;p.m27.b11=82100;p.m20.w11=33450;p.m20.s11=25;p.m20.b11=44600;p.m24.w11=32925;p.m24.s11=25;p.m24.b11=43900;p.m25.w11=36225;p.m25.s11=25;p.m25.b11=48300;p.m26.w11=28538;p.m26.s11=25;p.m26.b11=38050;p.m29.w11=31725;p.m29.s11=25;p.m29.b11=42300;p.m6.w11=38000;p.m7.w11=40900;p.m8.w11=39000;p.m8s.w11=37850;p.m13.w11=47450;p.m14.w11=52000;p.mlux.w11=5348;p.m2.w12=10600;p.m3b.w12=16650;p.m3.w12=18450;p.m3.s12=25;p.m3.b12=24600;p.m4.w12=24600;p.m4.s12=25;p.m4.b12=32800;p.m4a.w12=17138;p.m4a.s12=25;p.m4a.b12=22850;p.m45.w12=25650;p.m45.s12=25;p.m45.b12=34200;p.m5.w12=26700;p.m5.s12=25;p.m5.b12=35600;p.m5a.w12=18225;p.m5a.s12=25;p.m5a.b12=24300;p.m9.w12=25913;p.m9.s12=25;p.m9.b12=34550;p.m10.w12=23850;p.m10.s12=25;p.m10.b12=31800;p.m10a.w12=23925;p.m10a.s12=25;p.m10a.b12=31900;p.m11.w12=51150;p.m11k.w12=38363;p.m11k.s12=25;p.m11k.b12=51150;p.m12.w12=94600;p.m27.w12=63113;p.m27.s12=25;p.m27.b12=84150;p.m20.w12=34500;p.m20.s12=25;p.m20.b12=46000;p.m24.w12=33825;p.m24.s12=25;p.m24.b12=45100;p.m25.w12=37088;p.m25.s12=25;p.m25.b12=49450;p.m26.w12=29625;p.m26.s12=25;p.m26.b12=39500;p.m29.w12=32475;p.m29.s12=25;p.m29.b12=43300;p.m6.w12=38700;p.m7.w12=41750;p.m8.w12=40750;p.m8s.w12=39200;p.m13.w12=49050;p.m14.w12=53800;p.mlux.w12=4650;var opttypeObj=new Object(); opttypeObj.width=new Object(); opttypeObj.lenght=new Object();
function opttypeSave(opttype,width,lenght){
if(width!='undefined' && width!='') opttypeObj.width[opttype]=width;
if(lenght!='undefined' && lenght!='') opttypeObj.lenght[opttype]=lenght;
var opttype_value='';
for (var key_w in opttypeObj.width){
if(opttypeObj.width[key_w]!=''){
opttype_value=opttype_value+'width_'+key_w+'-'+opttypeObj.width[key_w]+'|';
}
}
for (var key_l in opttypeObj.lenght){
if(opttypeObj.lenght[key_l]!=''){
opttype_value=opttype_value+'lenght_'+key_l+'-'+opttypeObj.lenght[key_l]+'|';
}
}
opttype_value=opttype_value.substr(0,opttype_value.length-1);
setCookie ('opttype', opttype_value, '', '/');
}
function $$(m,w,wt){
var price=eval('p.m'+m+'[\'w'+w+'\']');
if(typeof(price)=="undefined"){wt.form_mcat_price.style.width='120px'; wt.form_mcat_price_sale.style.width='0px'; wt.form_mcat_price_base.style.width='0px'; price = 'не выпускается';}
else { price=price+'р.'; wt.form_mcat_price.style.width='52px'; wt.form_mcat_price_sale.style.width='35px'; wt.form_mcat_price_base.style.width='52px';}
wt.form_mcat_price.value=price;
var j, c;
for (j=0, c=40; j<8; j++, c+=40){
setTimeout(function(){wt.form_mcat_price.style.color="RED";}, c);
setTimeout(function(){wt.form_mcat_price.style.color='';}, c+=90);
}
if(typeof(eval('p.m'+m+'[\'s'+w+'\']'))!="undefined"){
wt.form_mcat_price_sale.value='-'+eval('p.m'+m+'[\'s'+w+'\']')+'%'; wt.form_mcat_price_base.value=eval('p.m'+m+'[\'b'+w+'\']')+'р.';
}
}
function $$$(w,opttype){
opttypeSave(opttype,w,'');
arrID=findId('cnt','form_mcat_m_',1);
var c = {80:0,90:1,100:2,110:3,120:4,130:5,140:6,150:7,160:8,170:9,180:10,190:11,200:12};	for(var i=0; i<arrID.length; i++) {
model=arrID[i];
eval("var wt=gebid('form_mcat_m_"+model+"')");
var v;
for (var ii=0; ii < wt.form_mcat_width.options.length; ii++){
if (wt.form_mcat_width.options[ii].value==w){
(model=='spring' || model=='coco' || model=='cocolatex')?v=w:v=c[w];
eval("$$('"+model+"',v,wt);");
wt.form_mcat_width.options[ii].selected=true;
break;
}
}
}
if(document.location.href.lastIndexOf("#")<document.location.href.lastIndexOf("podbor_matrasa.html")) {$pr(); $pr(1)};
}
function $$$$(l,opttype){
opttypeSave(opttype,'',l);
arrID=findId('cnt','form_mcat_m_',0);
for(var i=0; i<arrID.length; i++) {
var wt=gebid(arrID[i]);
if(typeof(wt.form_mcat_length)!="undefined"){
for (var ii=0; ii < wt.form_mcat_length.options.length; ii++){
if (wt.form_mcat_length.options[ii].value==l){
wt.form_mcat_length.options[ii].selected=true;
break;
}
}
}
}
}
