var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); fix_e=function(e){if(!e&&window.event){e=window.event;e.preventDefault=fix_e_preventDefault;e.stopPropagation=fix_e_stopPropagation;} if(!e.target)e.target=e.srcElement;if(typeof(e.pageX)=="undefined")e.pageX=e.clientX+document.documentElement.scrollLeft+document.body.scrollLeft;if(typeof(e.pageY)=="undefined")e.pageY=e.clientY+document.documentElement.scrollTop+document.body.scrollTop;return e;} fix_e_preventDefault=function(){this.returnValue=false;};fix_e_stopPropagation=function(){this.cancelBubble=true;};delayed_events_onload=[];addEventOnLoad=function(e,t,h){delayed_events_onload[delayed_events_onload.length]=[e,t,h];} triggerAddEventsOnLoad=function(){for(var i=0;i=0){dc.splice(i,1);} bc.className=dc.join(" ");} hide=function(ec){ec.style.display='none';} show=function(fc){fc.style.display='';} function toggleDisplay(gc){if(gc.style.display=='none'){show(gc);}else{hide(gc);}} setOffsetLeft=function(hc,ic){hc.style.left=ic+'px';} setOffsetTop=function(jc,kc){jc.style.top=kc+'px';} setOffset=function(lc,x,y){lc.style.left=x+'px';lc.style.top=y+'px';} setSize=function(mc,h,w){mc.style.height=h+'px';mc.style.width=w+'px';} DOM={ce:function(nc,oc,pc,qc){var n=document.createElement(nc);if(isDefined(oc)){for(var k in oc){n[k]=oc[k];}} if(isDefined(pc)){for(var i=0;i=0&&this[i]!=wc){i--;} return i;} if(isUndefined(Array.prototype.contains))Array.prototype.contains=function(xc){return(this.indexOf(xc)>=0);} if(isUndefined(Array.prototype.each))Array.prototype.each=function(yc){var zc=[];for(var i=0;i=0){var Ac=this.splice(i,1);return Ac[0];}}} if(typeof Array.prototype.push=="undefined"){Array.prototype.push=function(el){this[this.length]=el;return this.length;}} if(typeof Array.prototype.pop=="undefined"){Array.prototype.pop=function(el){var Bc=this[this.length-1];this.length--;return Bc;}} if(typeof Array.prototype.splice=="undefined"){Array.prototype.splice=function(Cc,Dc){var Ec=(arguments.length-2);var Fc=[];var ci=Cc;var c=0;while(c0){ci=this.length;while(ci>Cc+Dc){this[ci]=this[ci-Gc];ci--;}}else{c=(this.length-(Cc+Dc));ci=Cc+Ec;while(c>0){this[ci]=this[ci-Gc];ci++;c--;} this.length+=Gc;} for(c=0;c=0;i--){Ic.removeChild(Jc[i]);}}} deleteNode=function(Kc){if(Kc.parentNode)Kc.parentNode.removeChild(Kc);return Kc;} findFirstElement=function(Lc){while(Lc&&Lc.nodeType!=1){Lc=Lc.nextSibling;} if(!isDefined(Lc))return null;return Lc;} DomIterator=function(Mc){this._ca=Mc;this._da=findFirstElement(Mc.firstChild);this._ea=null;} DomIterator.prototype={hasNext:function(){return this._da!=null;},skipChildren:function(){this._da=null;if(this._ea.nextSibling){this._da=findFirstElement(this._ea.nextSibling);} var Nc=this._ea;while(this._da==null&&Nc.parentNode!=null&&Nc.parentNode!=this._ca){Nc=Nc.parentNode;this._da=findFirstElement(Nc.nextSibling);}},next:function(){this._ea=this._da;this._da=findFirstElement(this._ea.firstChild);if(this._da==null&&this._ea.nextSibling){this._da=findFirstElement(this._ea.nextSibling);} var Oc=this._ea;while(this._da==null&&Oc.parentNode!=null&&Oc.parentNode!=this._ca){Oc=Oc.parentNode;this._da=findFirstElement(Oc.nextSibling);} return this._ea;}} selectElementsByAttribute=function(Pc,Qc,Rc,Sc){var Tc=Pc.getElementsByTagName(Qc);var Uc=[];for(var i=0;i0)?bd[0]:null;} selectAttributes=function(cd,dd){var ed=[];if(cd!=null){for(var i=0;i-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1;Sarissa._pa=navigator.userAgent.toLowerCase().indexOf("opera")!=-1;if(!window.Node||!Node.ELEMENT_NODE){Node={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};} if(Sarissa._na){HTMLHtmlElement=document.createElement("html").constructor;Node=HTMLElement={};HTMLElement.prototype=HTMLHtmlElement._qa._qa;HTMLDocument=Document=document.constructor;var x=new DOMParser();XMLDocument=x.constructor;Element=x.parseFromString("","text/xml").documentElement.constructor;x=null;} if(typeof XMLDocument=="undefined"&&typeof Document!="undefined"){XMLDocument=Document;} if(Sarissa._oa){Sarissa._ha="xsl:";var _ra="";var _sa="";var _ta="";Sarissa.pickRecentProgID=function(Ad){var Bd=false,e;var Cd;for(var i=0;i1){Hd=Fd.substring(0,Fd.indexOf(":"));Fd=Fd.substring(Fd.indexOf(":")+1);}else{Hd="a"+Sarissa._ga();}} if(Ed){Gd.loadXML('<'+Hd+':'+Fd+" xmlns:"+Hd+"=\""+Ed+"\""+" />");} else{Gd.loadXML('<'+Fd+" />");}} return Gd;};Sarissa.getParseErrorText=function(Id){var Jd=Sarissa.PARSED_OK;if(Id&&Id.parseError&&Id.parseError.errorCode&&Id.parseError.errorCode!=0){Jd="XML Parsing Error: "+Id.parseError.reason+"\nLocation: "+Id.parseError.url+"\nLine Number "+Id.parseError.line+", Column "+Id.parseError.linepos+":\n"+Id.parseError.srcText+"\n";for(var i=0;i')+2);} var Wd=''.concat('',s,'');Vd.loadXML(Wd);Ud=Vd.documentElement;while(Ud.hasChildNodes()){f.appendChild(Ud.firstChild);}} return f;};XSLTProcessor.prototype.setParameter=function(Xd,Yd,Zd){Zd=Zd?Zd:"";if(Xd){this.processor.addParameter(Yd,Zd,Xd);}else{this.processor.addParameter(Yd,Zd);} Xd=""+(Xd||"");if(!this.paramsSet[Xd]){this.paramsSet[Xd]=[];} this.paramsSet[Xd][Yd]=Zd;};XSLTProcessor.prototype.getParameter=function($d,ae){$d=""+($d||"");if(this.paramsSet[$d]&&this.paramsSet[$d][ae]){return this.paramsSet[$d][ae];}else{return null;}};XSLTProcessor.prototype.clearParameters=function(){for(var be in this.paramsSet){for(var de in this.paramsSet[be]){if(be!=""){this.processor.addParameter(de,"",be);}else{this.processor.addParameter(de,"");}}} this.paramsSet=[];};}else{if(Sarissa._ja){Sarissa._wa=function(ee){Sarissa._xa(ee,4);};_ya=function(){Sarissa._wa(this);};Sarissa._xa=function(fe,ge){fe.readyState=ge;fe.readystate=ge;if(fe.onreadystatechange!=null&&typeof fe.onreadystatechange=="function"){fe.onreadystatechange();}};Sarissa.getDomDocument=function(he,ie){var je=document.implementation.createDocument(he?he:null,ie?ie:null,null);if(!je.onreadystatechange){je.onreadystatechange=null;} if(!je.readyState){je.readyState=0;} je.addEventListener("load",_ya,false);return je;};if(window.XMLDocument){} else if(Sarissa._ka&&window.Document&&!Document.prototype.load&&document.implementation.hasFeature('LS','3.0')){Sarissa.getDomDocument=function(ke,le){var me=document.implementation.createDocument(ke?ke:null,le?le:null,null);return me;};} else{Sarissa.getDomDocument=function(ne,oe){var pe=document.implementation.createDocument(ne?ne:null,oe?oe:null,null);if(pe&&(ne||oe)&&!pe.documentElement){pe.appendChild(pe.createElementNS(ne,oe));} return pe;};}}} if(!window.DOMParser){if(Sarissa._ma){DOMParser=function(){};DOMParser.prototype.parseFromString=function(qe,re){var se=new XMLHttpRequest();se.open("GET","data:text/xml;charset=utf-8,"+encodeURIComponent(qe),false);se.send(null);return se.responseXML;};}else if(Sarissa.getDomDocument&&Sarissa.getDomDocument()&&Sarissa.getDomDocument(null,"bar").xml){DOMParser=function(){};DOMParser.prototype.parseFromString=function(te,ue){var ve=Sarissa.getDomDocument();ve.loadXML(te);return ve;};}} if((typeof(document.importNode)=="undefined")&&Sarissa._oa){try{document.importNode=function(we,xe){var ye;if(we.nodeName=='#text'){return document.createTextNode(we.data);} else{if(we.nodeName=="tbody"||we.nodeName=="tr"){ye=document.createElement("table");} else if(we.nodeName=="td"){ye=document.createElement("tr");} else if(we.nodeName=="option"){ye=document.createElement("select");} else{ye=document.createElement("div");} if(xe){ye.innerHTML=we.xml?we.xml:we.outerHTML;}else{ye.innerHTML=we.xml?we.cloneNode(false).xml:we.cloneNode(false).outerHTML;} return ye.getElementsByTagName("*")[0];}};}catch(e){}} if(!Sarissa.getParseErrorText){Sarissa.getParseErrorText=function(ze){var Ae=Sarissa.PARSED_OK;if((!ze)||(!ze.documentElement)){Ae=Sarissa.PARSED_EMPTY;} else if(ze.documentElement.tagName=="parsererror"){Ae=ze.documentElement.firstChild.data;Ae+="\n"+ze.documentElement.firstChild.nextSibling.firstChild.data;} else if(ze.getElementsByTagName("parsererror").length>0){var Be=ze.getElementsByTagName("parsererror")[0];Ae=Sarissa.getText(Be,true)+"\n";} else if(ze.parseError&&ze.parseError.errorCode!=0){Ae=Sarissa.PARSED_UNKNOWN_ERROR;} return Ae;};} Sarissa.getText=function(Ce,De){var s="";var Ee=Ce.childNodes;for(var i=0;i]+>/g,""):s;};Sarissa.clearChildNodes=function(Ie){while(Ie.firstChild){Ie.removeChild(Ie.firstChild);}};Sarissa.copyChildNodes=function(Je,Ke,Le){if(Sarissa._ma&&Ke.nodeType==Node.DOCUMENT_NODE){Ke=Ke.documentElement;} if((!Je)||(!Ke)){throw "Both source and destination nodes must be provided";} if(!Le){Sarissa.clearChildNodes(Ke);} var Me=Ke.nodeType==Node.DOCUMENT_NODE?Ke:Ke.ownerDocument;var Ne=Je.childNodes;var i;if(typeof(Me.importNode)!="undefined"){for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'");};Sarissa.unescape=function(Ve){return Ve.replace(/'/g,"'").replace(/"/g,"\"").replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&");};Sarissa.updateCursor=function(We,Xe){if(We&&We.style&&We.style.cursor!=undefined){We.style.cursor=Xe;}};XML={getText:function(n){return Sarissa.getText(n);}};NAMESPACE_PREFIX="e";NAMESPACE_URI="://www.2vi.nl/e";eAttr=function(Ye,Ze){var pf=NAMESPACE_PREFIX+':'+Ze;var $e=Ye[NAMESPACE_PREFIX+'_'+Ze];if(typeof $e!="undefined"){return $e;}else{$e=null;var a=null;try{a=Ye.getAttributeNode(pf);}catch(e){};try{if(a){$e=a.value;}else if(Ye.getAttributeNS){$e=Ye.getAttributeNS(NAMESPACE_URI,Ze);}else if(Ye.getAttribute){$e=Ye.getAttribute(pf);}}catch(e){};return $e?$e:null;}} getEAttribute=eAttr;getAttribute=eAttr;setEAttribute=function(af,bf,cf){af[NAMESPACE_PREFIX+'_'+bf]=cf;af.setAttribute(NAMESPACE_PREFIX+':'+bf,cf);} setAttribute=setEAttribute;removeAttribute=function(df,ef){setAttribute(df,ef,null);} getFirstEAttributeParent=function(ff,gf,hf){return getFirstParent(ff,function(el){var jf=eAttr(el,gf);return(jf&&jf==hf);});} Consyn={_za:".",_Aa:"en",_Ba:["en"],_Ca:[],_Da:{},_Ea:false,includeLoadAllowed:true,getScriptPath:function(){return this._za;},getStylePath:function(kf){return this._za+'/index.html'+this._Da.stylePath+'/index.html'+kf},getImagePath:function(lf){return this._za+'/index.html'+this._Da.imgPath+'/index.html'+lf},getHtmlPath:function(mf){return this._za+'/index.html'+this._Da.htmlPath+'/index.html'+mf},start:function(nf,of,qf){DomLoaded.load(function(){Consyn.init(nf,of,qf);});},stop:function(){clearInterval(this._Fa);},init:function(rf,sf,tf){if(this._Ea){return;} this._Ea=true;try{this.includeLoadAllowed=false;Log.debug("Initialize framework");this._za=rf;this._Ba=sf;if(isUndefined(tf)){var tf=this.loadConfigFile("/consyn/config.js");}else if(tf['usedefault']){tf={modules:{formEditor:{transforms:["formeditor"],behaviors:[]},forms:{transforms:["autocomplete","datetimepicker","validated","dynform"],behaviors:[]},rtf:{transforms:["rtf","FCKeditor"],behaviors:[]}},debug:true,imgPath:"img",stylePath:"style",htmlPath:"html",stylePrefix:"consyn_",consyn:"2Vi product"};} this.loadConfig(tf);this.loadStylesheet("/consyn/base.css");this.loadAllLocale("locale");this.recoverState();this.processPage();this._Ga();triggerAddEventsOnLoad();Log.debug("Consyn Framework initialized");}catch(e){Log.error("Error initializing: "+e);}},require:function(){for(var i=0;i");}else{this._Ha(wf);} this._Ca[vf]=true;}},_Ha:function(xf){try{var yf=this.getFileContent(xf);return eval(yf);}catch(e){Log.error("Error in "+xf+": \n"+e);return null;}},loadConfigFile:function(zf){return this._Ha(this._za+"/index.html"+zf);},loadStylesheet:function(Af){var Bf=selectSingleElementByTagName(document,"head");var Cf=this.getStylePath(Af);var Df=document.createElement("link");Df.setAttribute("rel","stylesheet");Df.setAttribute("type","text/css");if(Af!=null&&Af.length>0){Df.setAttribute("href",Cf);} Bf.appendChild(Df);Df.disabled=false;return Df;},_Ia:"",_Fa:null,_Ja:[],_Ka:function(){var u=document.location.href;var j=u.indexOf('#');if(j>=0){var Ef=u.substring(j+1);if(!Consyn._La(Ef)){Consyn.recoverState(true);}}},_Ga:function(){if(this._Fa==null){this._Fa=setInterval(this._Ka,100);}},_La:function(Ff){var Gf=this._Ma(Ff);for(var Hf in Gf){if(this._Ja[Hf]!=Gf[Hf])return false;} return true;},_Ma:function(If){var Jf={};var Kf=If.split(';;');for(var i=0;i0){var Lf=Kf[i].split('::');Jf[Lf[0]]=Lf[1];}} return Jf;},recoverState:function(Mf){var Nf=[];var u=document.location.href;var j=u.indexOf('#');if(j>=0){var Of=u.substring(j+1);this._Ja=this._Ma(Of);if(Mf){for(var Pf in this._Ja){var Qf=this._Ja[Pf];var Rf=elem(Pf);Nf.push({obj:Rf,src:Qf,applied:0});}}} var i=0;var Sf=Nf.length;var Tf=false;while(Nf.length>0&&Sf>0){if(i==Nf.length){if(Tf=false){Sf=0;} else{i=0;Sf--;Tf=false;}} var o=Nf[i].obj;var s=Nf[i].src;if(o&&o.setEsrc){o.setEsrc(s);Nf.splice(i,1);Tf=true;}else{i++;}}},storeState:function(Uf,Vf){var Wf=eAttr(Uf,"storestate");if(Uf.id&&Wf&&Wf.indexOf("anchor")>=0){var Xf=this.getStateString(Uf.id,Vf);this._Ja[Uf.id]=Vf;if(this._Ia!=Xf){document.location="#"+Xf;this._Ia=Xf;}} activateLinks(Uf,Vf);},getStateString:function(Yf,Zf){var $f="";var ag=false;var bg=this._Ja;for(var cg in bg){if(typeof bg[cg]!="function"&&elem(cg)&&cg!=Yf&&elem(cg).defaultState!=bg[cg]){if(ag)$f+=";;";ag=true;$f+=cg+"::"+bg[cg];}} if(Yf&&(!elem(Yf)||elem(Yf).defaultState!=Zf)){if(ag)$f+=";;";$f+=Yf+"::"+Zf;} return $f;},getState:function(dg){if(this._Ja[dg.id]){return this._Ja[dg.id];} return null;},_Na:[],loadAllLocale:function(eg){for(var i=0;i=0){var og=mg.substring(0,i);this.require(og);} return false;},tryLoadBehavior:function(pg){var qg=null;for(var rg in this._Da.modules){qg=this._Da.modules[rg];for(var i=0;i=0){var rg=pg.substring(0,i);this.require(rg);} return false;},addPrefixedClassFront:function(sg,tg){sg.className=this.getPrefixedClassName(tg)+" "+sg.className;},removePrefixedClass:function(ug,vg){removeClass(ug,this.getPrefixedClassName(vg));},getPrefixedClassName:function(wg){return this._Da.stylePrefix+wg;},getFileContent:function(xg){return this.doRequest({uri:xg,method:"GET",sync:true,type:"text"});},getFileContentAsync:function(yg,zg){return this.doRequest({uri:yg,method:"GET",callback:zg,type:"text"});},postRequest:function(Ag,Bg){return this.doRequest({uri:Ag,method:"POST",data:Bg,sync:true,type:"text"});},postRequestAsync:function(Cg,Dg,Eg){return this.doRequest({uri:Cg,method:"POST",data:Dg,callback:Eg,type:"text"});},urlencodeData:function(Fg){return this._Oa(Fg);},_Oa:function(Gg){var Hg=[];var Ig=true;var Jg=(Gg.length)?true:false;if(Jg){for(var i=0;i0){if(!Qg){Ng.push("&");} Ng.push(Og);Ng.push("=");Ng.push(encodeURIComponent(Pg));} return Ng;},getDomDocumentAsync:function(Rg,Sg){return this.doRequest({uri:Rg,method:"GET",callback:Sg,type:"XML"});},getDomDocument:function(Tg){if(isUndefined(Tg)){return Sarissa.getDomDocument();} return this.doRequest({uri:Tg,method:"GET",sync:true,type:"XML"});},doRequest:function(Ug){var Vg=this.getRequest();if(Ug.data&&Ug.method=="GET"){var Wg=this._Oa(Ug.data);if(Ug.uri.indexOf('?')>=0){Ug.uri+='&'+Wg;}else{Ug.uri+='?'+Wg;}} Vg.open(Ug.method,Ug.uri,!Ug.sync);try{if(!Ug.sync){Vg.onreadystatechange=function(){if(Vg.readyState==4){if(Vg.status==200){Ug.callback(Ug.type=="text"?Vg.responseText:Vg.responseXML);}else{Ug.callback(null);Log.error("Error retrieving content from: "+sUri);}}}} if(Ug.method=="POST"){var Wg=this._Oa(Ug.data);Vg.setRequestHeader("Content-type","application/x-www-form-urlencoded");Vg.setRequestHeader("Content-length",Wg.length);Vg.setRequestHeader("Connection","close");Vg.send(Wg);}else{Vg.send(null);} if(Ug.sync){return Ug.type=="text"?Vg.responseText:Vg.responseXML;}}catch(e){Log.error("doRequest: Error retrieving content from: "+Ug.uri);}},getRequest:function(){return new XMLHttpRequest();},setLoading:function(Xg){if(isUndefined(Xg.eLoadingIndicator)||Xg.eLoadingIndicator==null){var x=getRealOffsetLeft(Xg)+5+"px";var y=getRealOffsetTop(Xg)+5+"px";Xg.eLoadingIndicator=DOM.ce("div",{},[DOM.text("Loading...")]);this.addPrefixedClassFront(Xg.eLoadingIndicator,"loading_indicator");Xg.eLoadingIndicator.style.position="absolute";Xg.eLoadingIndicator.style.left=x;Xg.eLoadingIndicator.style.top=y;Xg.eLoadingIndicator.style.zIndex=99;this.addPrefixedClassFront(Xg,"loading");document.body.appendChild(Xg.eLoadingIndicator);}},removeLoading:function(Yg){if(isDefined(Yg.eLoadingIndicator)&&Yg.eLoadingIndicator){document.body.removeChild(Yg.eLoadingIndicator);this.removePrefixedClass(Yg,"loading");Yg.eLoadingIndicator=null;}},processPage:function(){this.processNodes(document.documentElement);},processNodes:function(Zg,$g){var ah=new DomIterator(Zg);var bh=true;while(ah.hasNext()){var el=ah.next();bh=this.processNode(el,$g);if(bh==false){ah.skipChildren();}}},processNode:function(el,dh){var eh=isUndefined(dh);if(el.nodeName.toLowerCase()=='applet')return false;if(eh&&(el.nodeName.toLowerCase()==NAMESPACE_PREFIX+":action"||el.nodeName.toLowerCase()=="action"&&el.scopeName==NAMESPACE_PREFIX)){this.action(el);} var fh=eAttr(el,"iterate");if((eh||dh['iterate'])&&fh&&fh!=""&&!el.iterateInstance){return false;} var gh=eAttr(el,"template");if((eh||dh['template'])&&gh&&gh!=""&&!el.iterateInstance){return false;} if(eh||dh['transform']){var hh=eAttr(el,"transform");if(hh){this.transform(hh.split(" "),el);}} if(eh||dh['behave']){var ih=eAttr(el,"behave");if(ih){this.behave(ih.split(" "),el);}}},registerTransform:function(jh,kh){if(typeof kh=="function"){kh=Transform.extend({apply:kh});} Transforms[jh]=kh;},transform:function(lh,mh){for(var i=0;i1){var Dh=findContext(Ch[0],Bh);if(isUndefined(Dh.context)||Dh.context==null){Dh.context={};} Bh._Qa=Dh;Dh.context[Ch[1]]=Bh;}else{}},elem:function(Eh,Fh){var Gh=Fh.charAt(0);if(Gh=='#'){return elem(Fh.substring(1));}else if(Gh=='.'){var Hh=" "+Fh.substring(1)+" ";return getFirstParent(Eh,function(el){return(" "+el.className+" ").indexOf(Hh)>=0;});}else if(Fh.indexOf('.')>0){var Ih=Fh.split('.');return this.getFromContext(Eh,Ih[0],Ih[1]);}else if(Fh=="this"){return Eh;}else{var e=getFirstEAttributeParent(Eh,"tag",Fh);if(e)return e;else return elem(Fh);}},getFromContext:function(Jh,Kh,Lh){var c=findContext(Kh,Jh);if(c&&c.context){return c.context[Lh];}else{return null;}},setInContext:function(Mh,Nh,Oh,Ph){var c=findContext(Nh,Mh);if(c){if(isUndefined(c.context))c.context=[];c.context[Oh]=Ph;}else{Log.error("Invalid context: "+Nh);}},action:function(Qh){var Rh="";var Sh="";var Th=eAttr(Qh,"go");var Uh=eAttr(Qh,"refresh");if(Th){Rh="go";Sh=Th;}else if(Uh){Rh="refresh";Sh=Uh;}else{Rh=eAttr(Qh,"name");Sh=eAttr(Qh,"params");Sh=Sh?Sh:"";} Actions.exec(Rh,Sh.split(" "));},handleKey:function(e){var ch=String.fromCharCode(e.keyCode).toLowerCase();if(ch=='d'&&e.altKey&&e.ctrlKey){this.toggleDebugWindow();}},toggleDebugWindow:function(){var Vh=elem("consyn_debug_console");if(Vh){deleteNode(Vh);this.removePrefixedClass(document.body,"debug_body");}else{this.addPrefixedClassFront(document.body,"debug_body");var Wh=DOM.ce("textarea",{id:"debugBox"});Vh=DOM.ce("div",{id:"consyn_debug_console"},[DOM.ce("h1",{},[DOM.text("Debug console:")]),Wh]);document.body.appendChild(Vh);Wh.value=Log.getFullLog();}}};addEventOnLoad(document,'keydown',function(e){Consyn.handleKey(e);});addEventOnLoad(window,'pageshow',function(e){Consyn.recoverState();});Framework=Consyn;DomLoaded={onload:[],loaded:function(){if(arguments.callee.done)return;arguments.callee.done=true;for(i=0;i<\/scr"+"ipt>"); var script = document.getElementById("__ie_onload"); script.onreadystatechange = function() { if (this.readyState == "complete") { DomLoaded.loaded(); } }; /*@end @*/window.onload=DomLoaded.loaded;}};registerAction=function(Zh,$h){alert("Deprecated method: registerAction, please replease");actions[Zh].push($h);} findContext=function(ai,bi){while(bi!=null&&bi!=document.documentElement){var di=eAttr(bi,'context');var ei=eAttr(bi,'tag');if(di==ai||ei==ai)return bi;bi=bi.parentNode;} return null;} findTarget=function(fi,gi){if(isDefined(fi)&&fi){return Consyn.elem(gi,fi);}else{return getFirstSupportingParent(gi,["setTextData","setEsrc"]);}} DROP_ON_TARGET=1;DROP_ON_POSITION=2;DragService=function(){this.type=DROP_ON_POSITION;this.startDrag=null;this.reset=null;this.doStep=null;this.dropOnTarget=null;this.dropOnPosition=null;this.key=null;} DROP_MARGIN=5;Drag={x:0,y:0,busy:false,startData:{},endData:{},possible:false,smoother:null,interval:null,services:[],targets:[],current:null,register:function(hi){Drag.services[hi.key]=hi;},addTarget:function(ii){Drag.targets.push(ii);},getData:function(e){e=fix_e(e);Drag.x=e.pageX;Drag.y=e.pageY;},start:function(e,ji,ki){if(!Drag.busy){Drag.getData(e);Drag.current=Drag.services[ji];Drag.startData=ki;Drag.possible=true;if(Drag.current.type==DROP_ON_POSITION){} Drag.current.startDrag(Drag);} e.cancelBubble=true;if(isDefined(e.preventDefault))e.preventDefault();return false;},drag:function(e){if(Drag.possible){Drag.busy=true;Drag.getData(e);Drag.doStep();} if(isDefined(e.preventDefault))e.preventDefault();return false;},dragInFrame:function(e,li){Drag.x=e.pageX+getRealOffsetLeft(li);Drag.y=e.pageY+getRealOffsetTop(li);return false;},doStep:function(){if(Drag.busy&&Drag.current!=null){Drag.current.doStep(Drag);}},dropOnTarget:function(e,mi,ni,oi){if(Drag.busy&&Drag.current!=null&&mi==Drag.current.key){Drag.getData(e);Drag.endData=ni;Drag.current.dropOnTarget(Drag,e.target);} Drag.reset();},dropOnPosition:function(e){if(Drag.busy&&Drag.current!=null){Drag.getData(e);if(Drag.current.type==DROP_ON_POSITION){Drag.current.dropOnPosition(Drag);}else{for(var i=0;i=y-DROP_MARGIN&&Drag.y<=y+pi.offsetHeight+DROP_MARGIN&&Drag.x>=x-DROP_MARGIN&&Drag.x<=x+pi.offsetWidth+DROP_MARGIN){Drag.current.dropOnTarget(Drag,pi);}}}} Drag.reset();},reset:function(){Drag.interval=null;Drag.busy=false;Drag.possible=false;if(Drag.smoother!=null){Drag.smoother.style.display="none";} if(Drag.current!=null){Drag.current.reset();} Drag.current=null;}} addEventOnLoad(document,'mousemove',Drag.drag);addEventOnLoad(document,'mouseup',Drag.dropOnPosition);addEventOnLoad(document,'selectstart',function(e){debug("selectStart");e.cancelBubble=Drag.busy;return!Drag.busy;});Drag.register({type:DROP_ON_POSITION,key:"ConsynBase_ElementDrag",dragable:null,bounded:true,realOffsetTop:0,realOffsetLeft:0,startDragX:0,startDragY:0,elLeft:0,elTop:0,startDrag:function(d){this.dragable=d.startData.element;this.startDragX=d.x;this.startDragY=d.y;this.bounded=isDefined(d.startData.bounded)?d.startData.bounded:true;this.elLeft=this.dragable.offsetLeft;this.elTop=this.dragable.offsetTop;},doStep:function(d){var qi=d.x-this.startDragX;var ri=d.y-this.startDragY;var si=this.elLeft+qi;var ti=this.elTop+ri;if(si<0&&this.bounded)si=0;if(ti<0&&this.bounded)ti=0;var oP=this.dragable.offsetParent;var ui=oP.offsetWidth-this.dragable.offsetWidth;if(si>ui&&this.bounded)si=ui;var vi=oP.offsetHeight-this.dragable.offsetHeight;if(ti>vi&&this.bounded)ti=vi;this.dragable.style.left=si+"px";this.dragable.style.top=ti+"px";},dropOnPosition:function(d){},reset:function(){}});Drag.register({type:DROP_ON_TARGET,key:"ConsynBase_StructureDrag",dragable:null,startElem:null,dragOffsetTop:0,dragOffsetLeft:0,dragStartX:0,dragStartY:0,startDrag:function(d){this.startElem=d.startData.element;if(this.dragable==null){this.dragable=DOM.ce("div");Consyn.addPrefixedClassFront(this.dragable,"dragableOnCursor");document.body.appendChild(this.dragable);this.dragable.style.display='none';for(var i=0;i<4;i++){var t=DOM.ce("div",{className:"outline"});this.dragable.appendChild(t);}} var w=this.startElem.offsetWidth;var h=this.startElem.offsetHeight;var wi=this.dragable.getElementsByTagName("div");wi[0].style.width=w+"px";wi[0].style.height="2px";wi[1].style.width=w+"px";wi[1].style.height="2px";wi[1].style.top=h+"px";wi[2].style.width="2px";wi[2].style.height=h+"px";wi[3].style.width="2px";wi[3].style.height=h+"px";wi[3].style.left=w+"px";this.dragOffsetLeft=getRealOffsetLeft(this.startElem)-d.x-1;this.dragOffsetTop=getRealOffsetTop(this.startElem)-d.y-1;this.dragStartX=d.x;this.dragStartY=d.y;},doStep:function(d){if(Math.abs(d.x-this.dragStartX)>2||Math.abs(d.y-this.dragStartY)>2){this.dragable.style.display='block';} this.dragable.style.left=(d.x+this.dragOffsetLeft)+"px";this.dragable.style.top=(d.y+this.dragOffsetTop)+"px";},dropOnTarget:function(d,xi){var yi=xi;var zi=eAttr(this.startElem,"dragtype");var Ai=eAttr(yi,"dragtype");if(Ai){var Bi=Ai.split(' ');debug("rec type: "+Ai);if(!Bi.contains(zi)){return;}} var Ci=yi.childNodes;var Di=null;var Ei=d.x;var Fi=d.y;for(var i=0;i=y&&Fi<=y+Di.offsetHeight&&Ei>=x&&Ei<=x+Di.offsetWidth){var Gi=null;if(d.y=-22){x-=ox+2*14;} if(oj>=-22){y-=oy+2*4;} setOffset(this.$tooltip,x+this.$tooltipOffsetLeft,y+this.$tooltipOffsetTop);}},mouseout:function(e){if(this.$tooltip){hide(this.$tooltip);this.$tooltip=null;}}}));_Va=new Array();expandMenu=function(pj,qj){collapseCurrentMenu();_Va=new Array();pj=getFirstTagParent(pj,"li");while(pj&&pj!=qj){if(pj.nodeName=="li"||pj.nodeName=="LI"){_Va.push(pj);pj.className="active";} pj=pj.parentNode;}} collapseMenu=function(rj){rj.className="";} collapseCurrentMenu=function(){for(var i=0;i<_Va.length;i++){collapseMenu(_Va[i]);} _Va=new Array();} Behaviors.add("dropdown",new Behavior({click:function(e){if(this.open){collapseCurrentMenu();this.open=false;}else{expandMenu(e.target,this);e.cancelBubble=true;this.open=true;return false;}},mouseover:function(e){if(_Va.length>0){expandMenu(e.target,this);}}},"dropdown"));addEventOnLoad(document,'click',collapseCurrentMenu);Behaviors.add("rollover",new Behavior({mouseover:function(e){var sj=eAttr(this,"overclass");if(sj==null){sj="over";} addClassFront(this,sj);},mouseout:function(e){var tj=eAttr(this,"overclass");if(tj==null){tj="over";} removeClass(this,tj);}}));Behaviors.add("togglePane",new Behavior({click:function(e){var uj=eAttr(this,"toggle_target");var vj=Consyn.elem(this,uj);toggleDisplay(vj);}}));Behaviors.add("applyTransform",new Behavior({click:function(e){var wj=eAttr(this,"apply_transform");var xj=eAttr(this,"apply_target");var yj=Consyn.elem(this,xj);Consyn.transform(transform.split(' '),xj);}}));Behaviors.add("do",new Behavior({click:function(e){var zj=eAttr(this,"action");var Aj=eAttr("params");Consyn.transform(zj,Aj.split(' '));}}));$$GUID=0;DataCollection=(new Base()).extend({getKey:function(){return -1;},hasNext:function(){return false;},next:function(){},get:function(Bj){return null;},registerObserverCallback:function(Cj,Dj){this._Wa.push({observer:Cj,method:Dj});},notify:function(){for(var i=0;i",i+7);var j=(i>=0)?pk.indexOf("",i):-1;while(i>=0&&j>i){var qk=pk.substring(i+1,j);pk=pk.substring(j+9);i=pk.indexOf("",i+7);j=pk.indexOf("",i);eval(qk);}},setTextData:function(rk,sk){if(isDefined(sk)&&sk!=null){this._$a(rk);if(sk=="after"){var n=DOM.appendNew("div",this);n.innerHTML=rk;}else if(sk=="before"){var n=DOM.insertNewBefore("div",this.firstChild);n.innerHTML=rk;}}else{removeChildNodes(this);this._$a(rk);this.innerHTML=rk;} Consyn.processNodes(this);Consyn.removeLoading(this);},setEsrc:function(tk,uk){this.e_src=tk;setEAttribute(this,"src",tk);if(tk!=null){Consyn.storeState(this,tk);Consyn.setLoading(this);var vk=this;Consyn.getFileContentAsync(tk,function(wk){if(wk!=null){vk.setTextData(wk,uk);}else{vk.setTextData('could not load page. retry',uk);}});}},show:function(){show(this);},hide:function(){hide(this);},init:function(){var xk=eAttr(this,"src");var yk=eAttr(this,"loaded");this.defaultState=xk;var zk=Consyn.getState(this);if(zk){xk=zk;yk=false;} if(!yk)this.setEsrc(xk);else{this.e_src=xk;setEAttribute(this,"src",xk);Consyn.storeState(this,xk)} var s=eAttr(this,"state");if(s&&s.indexOf("hide")>=0){hide(this);}}});findIterate=function(Ak,Bk){if(isUndefined(Bk)){Bk=eAttr(Ak,'as');} var Ck=new DomIterator(Ak);while(Ck.hasNext()){var el=Ck.next();var Dk=eAttr(el,"template");if(Dk==Bk){return el;} Dk=eAttr(el,"iterate");if(Dk==Bk){return el;}} return null;} getDataByVarName=function(Ek,Fk,Gk,el){var Hk=Ek.split('.');if(Hk.length>1){if(Hk[Hk.length-2]==Gk){Ek=Hk[Hk.length-1];}else if(isDefined(el)){var n=getFirstEAttributeParent(el,'as',Hk[0]);if(n){Fk=n.getEdata();Ek=Hk[1];}else return null;}else return null;} return isDefined(Fk)?Fk.get(Ek):null;} _ab=["href","src","label","key","var","tipdata","tiptext"];_bb=["href","src","id","name","value"];applyTemplateToElement=function(Ik,Jk,el){for(var i=0;i<_bb.length;i++){var Kk=_bb[i];var Lk=el.getAttribute('consynov'+Kk);if(Lk==null){Lk=el.getAttribute(Kk);el.setAttribute('consynov'+Kk,Lk);} if(Lk!=null&&typeof Lk=="string"){if(Kk=="href"&&Lk.substring(0,11)=="about:blank"){Lk=Lk.substring(11);} Lk=processAttributeValue(Lk,Ik,Jk);el.setAttribute(Kk,Lk);}} for(var i=0;i<_ab.length;i++){var Kk=_ab[i];var Lk=eAttr(el,'consynov'+Kk);if(Lk==null){Lk=eAttr(el,Kk);setEAttribute(el,'consynov'+Kk,Lk);} if(Lk!=null&&typeof Lk=="string"){Lk=processAttributeValue(Lk,Ik,Jk);setEAttribute(el,Kk,Lk);}} var Mk=getAttribute(el,"var");if(Mk){var Nk=Mk.split('.');var d=getDataByVarName(Mk,Ik,Jk,el);if(d!=null){removeChildNodes(el);el.appendChild(DOM.text(d));}} var Ok=eAttr(el,"template");if(isUndefined(Ok)||Ok==null){Ok=eAttr(el,"iterate");} if(Ok&&Ok!=""){var Nk=Ok.split('.');if(Nk.length>1){if(Nk[0]==Jk){Ik=Ik.get(Nk[1]);if(Ik){dataToTemplate(Ik,el);}}}}} processAttributeValue=function(Pk,Qk,Rk){var Sk=Pk.indexOf('${');while(Sk>=0){j=Pk.indexOf('}',Sk);var Tk=Pk.substring(Sk+2,j);var d=getDataByVarName(Tk,Qk,Rk);if(d!=null){Pk=Pk.replace('${'+Tk+'}',d);Sk=j+1+d.length;}else{Sk=j+1;} Sk=Pk.indexOf('${',Sk);} return Pk;} fillTemplate=function(Uk,Vk,Wk){if(isUndefined(Wk)||Wk==null){Wk=eAttr(Vk,'template');} if(isUndefined(Wk)||Wk==null){Wk=eAttr(Vk,'iterate');} var Xk=new DomIterator(Vk);var Yk=false;while(Xk.hasNext()){var el=Xk.next();applyTemplateToElement(Uk,Wk,el);if(el==Vk)Yk=true;} if(!Yk)applyTemplateToElement(Uk,Wk,Vk);Consyn.processNodes(Vk);Consyn.processNode(Vk);return Vk;} initDataTableIterator=function(Zk,$k){if(!isDefined(Zk.items)||Zk.items.length==0){Zk.iterate=findIterate(Zk,$k);Zk.iterate.style.display="none";Zk.items=[];}} dataToTemplate=function(al,bl){bl.style.display="none";var cl=[];while(al.hasNext()){al.next();var c=bl.cloneNode(true);bl.parentNode.insertBefore(c,bl);c.iterateInstance=true;c=fillTemplate(al,c);setAttribute(c,"template","");setAttribute(c,"iterate","");c.eItemKey=al.getKey();c.getEItemKey=function(){return this.eItemKey;} c.style.display="";cl[cl.length]=c;} return cl;} Transforms.datatable=Component.extend({setEsrc:function(dl,fl){setAttribute(this,'src',dl);Consyn.storeState(this,dl);var gl=this;if(fl){var hl=Consyn.getDomDocument(dl);var il=new XmlDataCollection(hl.documentElement);this.setEdata(il);}else{Consyn.getDomDocumentAsync(dl,function(hl){var il=new XmlDataCollection(hl.documentElement);gl.setEdata(il);});}},setEdata:function(jl){initDataTableIterator(this);for(var i=0;i=0;i--){var tl=nav_links_for[rl.id][i];activateLink(tl,rl,sl);}}} activateLink=function(ul,vl,wl){var xl=eAttr(ul,"highlight");if(xl&&xl.toLowerCase()=="true"){var h=eAttr(ul,"href");removeClass(ul,"active");if(wl==h){addClassBack(ul,"active");}}} Transforms.tooltip=Transform.extend({apply:function(yl){Consyn.addPrefixedClassFront(yl,"tooltip");hide(yl);}});Transforms.editable=Component.extend({init:function(){addEvent(this,'click',function(){this.makeEditable();});},makeEditable:function(){if(this.$editMode){return;} this.$editMode=true;var zl=XML.getText(this);removeChildNodes(this);var Al=DOM.ce('input',{type:'text',value:zl,$controller:this},[],{keyup:function(e){if(e.keyCode==13){var Bl=this.value;var Cl=this.$controller;var Dl=eAttr(Cl,"action");var El=eval("x="+eAttr(Cl,"requestvars"));El[eAttr(Cl,"var")]=Bl;Consyn.postRequestAsync(Dl,El,function(Fl){if(Fl!=null){removeChildNodes(Cl);Cl.innerHTML=Fl;}else{alert("Could not save data!");} Cl.$editMode=false;});}}});this.appendChild(Al);Al.focus();}});Transforms.pane=Transforms.content.extend({});Pane=(new Base()).extend({show:function(){this.active=true;this.div.style.display="block";if(this.labelNode){addClassBack(this.labelNode,"active");}},hide:function(){this.active=false;this.div.style.display="none";if(this.labelNode){removeClass(this.labelNode,"active");}}},function(Gl,Hl){this.name=Gl;this.div=Hl;this.active=false;this.labelNode=null;});Transforms.tabbed=Component.extend({init:function(){debug("Deprecated transform: 'tabbed'");var Il=new Array();var Jl=new DomIterator(this);while(Jl.hasNext()){var el=Jl.next();var Kl=getAttribute(el,"tab");if(Kl){var t=new Pane(Kl,el);t.hide();Il.push(t);}} this.tabs=Il;setEAttribute(this,"as","tabs");this.setTabNamesData=Transforms.datatable.setEdata;this._Ua=function(Ll,Ml){if(this._cb){this._cb.hide();} for(var i=0;i0;}},function(hm,im,jm,km){this.obj=hm;this.fromX=hm.offsetLeft;this.fromY=hm.offsetTop;this.deltaX=im-this.fromX;this.deltaY=jm-this.fromY;this.toX=im;this.toY=jm;this.time=km;this.totalTime=km;}),resize:(new Animation()).extend({step:function(dt){}})},_db:null,_eb:[],_fb:0,start:function(lm){this._eb.push(lm);if(this._db==null){this._fb=(new Date()).getTime();this._db=setInterval(this._gb,40);}},_hb:function(){var t=(new Date()).getTime();var dt=t-this._fb;this._fb=t;for(var i=this._eb.length-1;i>=0;i--){var mm=this._eb[i].step(dt);if(mm==false){this._eb.splice(i,1);}}},_gb:function(){Animations._hb();}};Push={request:null,lastLength:0,newContent:"",_ib:"",_jb:false,_kb:null,restart:function(){this.reset();if(!this._jb){this.open(this._ib,this._lb,this._mb);this._jb=false;}},reset:function(){this.check();clearInterval(this._kb);this.request=null;this.lastLength=0;this.newContent="";},stop:function(){if(this.request){this.request.abort();this.request=null;} this.reset();this._jb=true;},open:function(nm,om,pm){if(this.request!=null)this.stop();this._ib=nm;this._lb=om;this._mb=pm;this._jb=false;if(_oa){var qm=document.createElement("iframe");qm.style.display="none";qm.setAttribute("src",nm);document.body.appendChild(qm);}else{Push.request=Consyn.getRequest();Push.request.open("GET",nm+"?channel="+om+"&startFrom="+pm,true);Push.request.onreadystatechange=function(){if(Push.request.readyState==4){Push.restart();}};Push.request.send(null);Push._kb=setInterval(Push.check,100);}},check:function(){if(Push.request!=null){var rm=Push.request.responseText.length;if(rm>Push.lastLength){Push.newContent+=Push.request.responseText.substring(Push.lastLength,rm);var sm="";var i=Push.newContent.indexOf("",i):-1;while(i>=0&&j>i){var sm=Push.newContent.substring(i+8,j);Push.newContent=Push.newContent.substring(j+9);i=Push.newContent.indexOf("",i);eval(sm);} Push.lastLength=rm;}}},receive:function(tm,um,vm){var wm=document.createElement("div");wm.appendChild(document.createTextNode(vm));var xm=elem('pushReceiver');xm.appendChild(wm);xm.scrollTop=wm.offsetTop;if(um>this._mb)this._mb=um;},send:function(ym){}};P_receive=function(c,s,m){Push.receive(c,s,m);}; } /*