/* Netjay Lib, copyright Netjay GmbH & Co KG, All rights reserved
   Usage without permission prohibited
 */

function Action(){}
Action.inputData=new Array();Action.dataBuffer=new Array();Action.errBuffer="";Action.result=null;Action.errMsg=new Array();Action.errMsg[0]="ok";Action.errMsg[1]="no module scope found";Action.errMsg[2]="no valid status";Action.errMsg[3]="could not select element";Action.errMsg[4]="could not set status";Action.errMsg[5]="could not scroll layer to position";Action.errMsg[6]="could not switch to next layer";Action.errMsg[7]="could not switch to previous layer";Action.errMsg[8]="no element with that name found";Action.errMsg[9]="could not find layer";Action.errMsg[10]="resize failed";Action.errMsg[11]="clean of input data failed";Action.errMsg[12]="set of input data failed";Action.errMsg[13]="could not create a new module";Action.errMsg[14]="invalid service id";Action.errMsg[15]="jaypad already in use";Action.errMsg[16]="no parent column found";Action.clickHistory=new Array();Action.history=false;Action.scopeModule=function(aa){var ba=mods[aa];if(ba==null){log.error("could not find a module with id "+aa);return false;}
currentModule=ba;return true;}
Action.findModule=function(ca){var da=currentModule;if(ca!=""&&ca!=undefined){da=mods[ca];}
if(da!=null){}
return da;}
Action.findStatus=function(ea,fa){var ga=fa;if(ga==null){ga=ea.getStatus();}
else{if(!Module.isValidModuleStatus(ga)){ga=null;}}
return ga;}
Action.select=function(ha,ia,ja){Action.errBuffer=Action.errMsg[0];var ka=Action.findModule(ia);if(ka==null){Action.errBuffer=Action.errMsg[1];return false;}
var la=Action.findStatus(ka,ja);if(la==null){Action.errBuffer=Action.errMsg[2];return false;}
var ma=ka.getCurrentLayer(la);ma.getSelector().setSelectableNodes();var na=ma.getSelector().selectObj(ha);if(na==false){Action.errBuffer=Action.errMsg[3];}
return na;}
Action.deselect=function(oa,pa){Action.errBuffer=Action.errMsg[0];var qa=Action.findModule(oa);if(qa==null){Action.errBuffer=Action.errMsg[1];return false;}
var ra=Action.findStatus(qa,pa);if(ra==null){Action.errBuffer=Action.errMsg[2];return false;}
var sa=qa.getCurrentLayer(ra).getSelector().deselectObj();if(webPad!=null){webPad.checkControl(['MID']);}
if(sa==false){Action.errBuffer=Action.errMsg[3];}
return sa;}
Action.gotoLayer=function(ta,ua,va,wa,xa,ya){ua=Action.checkValue(ua,va);ta=Action.checkValue(ta,va);if(typeof ta=="string"){ta=0;}
Action.errBuffer=Action.errMsg[0];var za=Action.findModule(va);if(za==null){Action.errBuffer=Action.errMsg[1];return false;}
if(ua==null){ua=za.getStatus();}
var r=za.switchLayerToFront(ua,ta,wa,xa,null,null,ya);return r;}
Action.gotoStatus=function(Aa,Ba,Ca,Da){Aa=Action.checkValue(Aa,Ca);Ba=Action.checkValue(Ba,Ca);Action.errBuffer=Action.errMsg[0];var Ea=Action.findModule(Ca);if(Ea==null){Action.errBuffer=Action.errMsg[1];return false;}
if(!Module.isValidModuleStatus(Aa)){Action.errBuffer=Action.errMsg[2];return false;}
if(Ba==null){Ba=Ea.getCurrentLayerIndex(Aa);if(Ba==-1){if(Aa==Module.M_SELECT){Ba=1;}
else{Ba=0;}}}
if(Da==null){Da=false;}
var Fa=Ea.setStatus(Aa,Ba,Da);if(Fa==false){Action.errBuffer=Action.errMsg[4];}
return Fa;}
Action.hookWebPad=function(Ga){if(webPad!=null){var Ha=Action.findModule(Ga);if(Ha!=null){webPad.hookModule(Ha);return true;}
else{Action.errBuffer=Action.errMsg[2];return false;}}
return true;}
Action.unhookWebPad=function(){if(webPad!=null){webPad.releaseModule();}}
Action.releaseWebPad=function(){Action.unhookWebPad();}
Action.getInput=function(Ia,Ja,Ka){var La=Action.findModule(Ka);if(La==null){Action.errBuffer=Action.errMsg[2];return false;}
if(Ia==null){Ia=La.getStatus();}
if(Ja==null){Ja=La.getCurrentLayerIndex(Ia);}
var r=La.getInputData(Ia,Ja);return r;}
Action.checkInput=function(Ma,Na,Oa){var Pa=Action.findModule(Oa);if(Pa==null){Action.errBuffer=Action.errMsg[2];return false;}
var Qa=true;if(Ma==null){Ma=Pa.getStatus();}
if(Na==null){Na=Pa.getCurrentLayerIndex(Ma);}
Qa=Pa.checkInputData(Ma,Na);return Qa;}
Action.checkResponseErrors=function(Ra,Sa,Ta){var Ua=Action.findModule(Ta);if(Ua==null){Action.errBuffer=Action.errMsg[2];return false;}
var Va=true;if(Ra==null){Ra=Ua.getStatus();}
if(Sa==null){Sa=Ua.getCurrentLayerIndex(Ra);}
Va=Ua.checkResponseErrors(Ra,Sa);return Va;}
Action.showErrors=function(Wa,Xa,Ya){var Za=Action.findModule(Ya);if(Za==null){Action.errBuffer=Action.errMsg[2];return false;}
var $a=true;if(Wa==null){Wa=Za.getStatus();}
if(Xa==null){Xa=Za.getCurrentLayerIndex(Wa);}
Action.hideErrors(Wa,Xa,Za.getId());Za.getLayerByIndex(Wa,Xa).checkResponseErrors();var ab=Za.getLayerByIndex(Wa,Xa).getErrorActions();var i;for(i=0;i<ab.length;i++){Action.handleActions(ab[i]);}
Za.getLayerByIndex(Wa,Xa).showErrors();return $a;}
Action.hideErrors=function(bb,cb,db){var eb=Action.findModule(db);if(eb==null){Action.errBuffer=Action.errMsg[2];return false;}
var fb=true;if(bb==null){bb=eb.getStatus();}
if(cb==null){cb=eb.getCurrentLayerIndex(bb);}
eb.getLayerByIndex(bb,cb).hideErrors();return fb;}
Action.sendData=Action.saveData=function(gb,hb,ib){var jb=Action.findModule(ib);if(jb==null){Action.errBuffer=Action.errMsg[2];return false;}
if(gb==null){gb=jb.getStatus();}
if(hb==null){hb=jb.getCurrentLayerIndex(gb);if(hb==null){Action.errBuffer=Action.errMsg[9];}}
return jb.requestSetData(gb,hb);return true;}
Action.getData=function(kb,lb,mb,nb,ob,pb){var qb=Action.findModule(pb);if(qb==null){Action.errBuffer=Action.errMsg[2];return false;}
if(kb==null){kb=qb.getStatus();}
if(lb==null){lb=qb.getCurrentLayerIndex(kb);if(lb==null){Action.errBuffer=Action.errMsg[9];}}
var rb=ob;if(mb!=null&&nb!=null){var sb=qb.getLayerByIndex(mb,nb);if(sb==null){log.error("layer not found");return false;}
rb=sb.getInputDataMap();var i;for(i in rb){}}
return qb.requestGetData(kb,lb,rb,false);}
Action.getTemplate=function(tb,ub,vb,wb,xb,yb){var zb=Action.findModule(yb);if(zb==null){Action.errBuffer=Action.errMsg[2];return false;}
if(tb==null){tb=zb.getStatus();}
if(ub==null){ub=zb.getCurrentLayerIndex(tb);if(ub==null){Action.errBuffer=Action.errMsg[9];}}
var Ab=xb;if(vb!=null&&wb!=null){var Bb=zb.getLayerByIndex(vb,wb);if(Bb==null){log.error("layer not found");return false;}
Ab=Bb.getInputDataMap();var i;for(i in Ab){if(typeof Ab[i]=="function"){continue;}}}
return zb.requestGetTemplate(tb,ub,Ab,false);}
Action.getAll=function(Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb){var Kb=Action.findModule(Hb);if(Kb==null){Action.errBuffer=Action.errMsg[2];log.error("given Module "+Hb+" not found");return false;}
if(Cb==null){Cb=Kb.getStatus();}
if(Db==null){Db=Kb.getCurrentLayerIndex(Cb);if(Db==null){Action.errBuffer=Action.errMsg[9];}}
var Lb=Gb;if(Eb!=null&&Fb!=null){var Mb=Kb.getLayerByIndex(Eb,Fb);if(Mb==null){log.error("layer not found");return false;}
Lb=Mb.getInputDataMap();var i;for(i in Lb){}}
var r=Kb.requestGetAll(Cb,Db,Lb,false,Ib,Jb);return r;}
Action.getAllAndGoto=function(Nb,Ob,Pb,Qb,Rb,Sb){var Tb="gotoStatus("+Nb+","+Ob+");";var r=Action.getAll(Nb,Ob,Pb,Qb,Rb,Sb,Tb,null);return r;}
Action.cleanInput=function(Ub){Action.errBuffer=Action.errMsg[0];var Vb=document.getElementById(Ub);if(Vb!=null){Vb.value="";return true;}
Action.errBuffer=Action.errMsg[5];return false;}
Action.setInput=function(Wb,Xb){Action.errBuffer=Action.errMsg[0];var Yb=document.getElementById(Wb);if(Yb!=null){Yb.value=Xb;return true;}
Action.errBuffer=Action.errMsg[11];return false;}
Action.scrollTo=function(Zb,$b,bc,cc,dc){Action.errBuffer=Action.errMsg[0];var ec=Action.findModule(cc);if(ec==null){Action.errBuffer=Action.errMsg[1];return false;}
var fc=ec.scrollLayerTo(Zb,$b,bc,dc);if(fc==false){Action.errBuffer=Action.errMsg[5];return false;}
if(webPad!=null){webPad.checkControl(["LEFT","RIGHT","MID"]);}
var gc=ec.getBreadCrumb();if(gc){var hc=ec.getCurrentLayer();if(hc!=null){var ic=hc.getMaxPages();var jc=hc.getScrollLayer().getCurrentPage();var kc=0;if(ec.getId()=="m_idAdder"&&hc.getId()=="m_idAdder_bdy_ss_l0"){kc=searchPad.getResultOffset();var lc=searchPad.getResultCount();gc.setExtraCrumb((jc+1+kc)+" von "+lc);}
else{gc.setExtraCrumb((jc+1)+" von "+ic);}}}
return fc;}
Action.nextLayer=function(mc,nc,oc){Action.errBuffer=Action.errMsg[0];var pc=Action.findModule(nc);if(pc==null){Action.errBuffer=Action.errMsg[1];return false;}
var qc=pc.nextLayer(mc,false);if(qc==false){Action.errBuffer=Action.errMsg[6];}
return qc;}
Action.prevLayer=function(){Action.errBuffer=Action.errMsg[0];var rc=Action.findModule(moduleId);if(rc==null){Action.errBuffer=Action.errMsg[1];return false;}
var sc=rc.prevLayer(status,false);if(sc==false){Action.errBuffer=Action.errMsg[7];}
return sc;}
Action.callFunction=function(tc){if(tc){if(typeof tc=="function"){eval("var result = "+tc);if(result){return true;}
else{return false;}}
else{Action.errBuffer=Action.errMsg[13];return false;}}
return false;}
Action.alertMsg=function(uc){}
Action.setDataDirty=function(vc,wc,xc){Action.errBuffer=Action.errMsg[0];var yc=Action.findModule(xc);if(yc==null){Action.errBuffer=Action.errMsg[1];return false;}
if(vc==null){vc=yc.getStatus();}
if(wc==null){wc=yc.getCurrentLayerIndex(vc);}
var zc=yc.getLayerByIndex(vc,wc);if(zc==null){Action.errBuffer=Action.errMsg[9];return false;}
zc.setDataDirty();if(webPad){webPad.checkControl(["MID","DOWN"]);}
return true;}
Action.setHeight=function(Ac){Action.errBuffer=Action.errMsg[0];var Bc=Action.findModule(moduleId);if(Bc==null){Action.errBuffer=Action.errMsg[1];return false;}
if(!Bc.setHeight(Ac)){Action.errBuffer=Action.errMsg[10];return false;}
return true;}
Action.hideConfigButton=function(){}
Action.showConfigButton=function(){}
Action.hideDeleteButton=function(){}
Action.showDeleteButton=function(){}
Action.hideResizeButton=function(){}
Action.showResizeButton=function(){}
Action.addModule=function(Cc){var Dc=new Array("m_idSearch","m_idComm","m_idCont");var i;for(i=0;i<Dc.length;i++){if(mods[Dc[i]]!=null){var Ec=mods[Dc[i]].getServiceName();if(Ec!="NullServiceEntity"){continue;}
Action.submit(null,null,mods[Dc[i]].getId());if(webPad){webPad.hideControl("MORE");}
return true;}}
if(currentPage!=null){currentPage.addNewModule();if(webPad){webPad.hideControl("MORE");}}
else{log.error("no add module is possible");return false;}
return true;}
Action.addNewModule=function(Fc,Gc,Hc,Ic,Jc){if(currentPage!=null){currentPage.addNewModule(null,Fc,Gc);}
else{log.error("no add module is possible");return false;}
return true;}
Action.selectService=function(Kc,Lc,Mc,Nc){Action.errBuffer=Action.errMsg[0];var Oc=Action.findModule(Nc);if(Oc==null){Action.errBuffer=Action.errMsg[1];return false;}
if(Mc==-1||Mc==0||Mc==null){Mc=99;}
var Pc=Oc.getOrder()-1;if(Pc<0){Pc=0;}
if(!Oc.requestSelectService(Kc,Lc,Pc)){Action.errBuffer=Action.errMsg[14];return false;}
return true;}
Action.selectNode=function(Qc,Rc,Sc){Action.errBuffer=Action.errMsg[0];var Tc=Action.findModule(Rc);if(Tc==null){Action.errBuffer=Action.errMsg[1];return false;}
if(Sc==null){Sc=Tc.getSelectBase();}
var Uc=Tc.getStatus();if(Uc!=Module.M_SELECT){var Vc=Qc.split("/");var Wc=Vc.length;var Xc="gotoStatus(Module.M_SELECT,"+(Wc)+",'"+Tc.getId()+"');";if(webPad&&webPad.isHooked()){var Yc=webPad.releaseModule();Yc.setStatus(Yc.getOldStatus());}
Tc.setSelectBase(Sc,true);mods["m_idAdder"].setSelectPath(Qc,Sc,true,Xc);return true;}
var Zc=Tc.getCurrentLayerIndex(status);if(Tc.isValidLayer(Uc,Number(Zc)+1)==false){log.error("invalid layer for next select "+(Number(Zc)+1));return false;}
if(Qc==null||Qc==undefined){Qc="/";}
var $c={"path":Qc,"selectbase":Sc};Tc.setSelectPath(Qc,Sc);var Xc="gotoStatus(Module.M_SELECT,"+(Number(Zc)+1)+",'"+Tc.getId()+"');";Tc.requestGetAll(Uc,Number(Zc)+1,$c,false,Xc);var ad=Tc.getBreadCrumb();if(ad!=null){ad.setCrumbByPath(Qc,0,Zc);}
return true;}
Action.registerUser=function(bd,cd,dd,ed,fd,gd,hd){Action.errBuffer=Action.errMsg[0];var jd=Action.findModule(hd);if(jd==null){Action.errBuffer=Action.errMsg[1];return false;}
jd.getInputData();var kd=jd.getInputDataMap();if(bd==null||bd==""){bd=kd["login"];}
if(cd==null||cd==""){cd=kd["password1"];}
if(dd==null||dd==""){dd=kd["password2"];}
if(cd!=dd){log.error("both pws dont fit together");var ld=jd.getCurrentLayer().getErrorControl();if(ld){ld.setErrorFlag("wrong_pw");}
return false;}
if(ed==null||ed==""){ed=kd["email"];}
if(fd==null||fd==""){fd=kd["sec_quest"];}
if(gd==null||gd==""){gd=kd["sec_ans"];}
jd.requestRegisterUser(bd,cd,ed,fd,gd);return true;}
Action.login=function(md,pw,nd){Action.errBuffer=Action.errMsg[0];var od=Action.findModule(nd);if(od==null){Action.errBuffer=Action.errMsg[1];return false;}
od.getInputData();var pd=od.getInputDataMap();var i;for(i in pd){if(typeof pd[i]=="function"){continue;}}
if(md==null||md==""||md=="undefined"){md=pd["login"];}
if(pw==null||pw==""||md=="undefined"){pw=pd["pw"];}
od.requestLogin(md,pw);return true;}
Action.logout=function(qd,rd){Action.errBuffer=Action.errMsg[0];var sd=Action.findModule(rd);if(sd==null){Action.errBuffer=Action.errMsg[1];return false;}
sd.requestLogout(qd);return true;}
Action.forgotLogin=function(td,ud){Action.errBuffer=Action.errMsg[0];var vd=Action.findModule(ud);if(vd==null){Action.errBuffer=Action.errMsg[1];return false;}
vd.getInputData();var wd=vd.getInputDataMap();if(td==null||td==""){td=wd["email"];}
vd.requestForgotLogin(td);return true;}
Action.forgotPw=function(xd,yd,zd,Ad){Action.errBuffer=Action.errMsg[0];var Bd=Action.findModule(Ad);if(Bd==null){Action.errBuffer=Action.errMsg[1];return false;}
Bd.getInputData();var Cd=Bd.getInputDataMap();if(xd==null||xd==""){xd=Cd["login"];}
if(yd==null||yd==""){yd=Cd["sec_quest"];}
if(zd==null||zd==""){zd=Cd["sec_ans"];}
Bd.requestForgotPw(xd,yd,zd);return true;}
Action.changeUserData=function(Dd,Ed,Fd,Gd,Hd,Id,Jd){if(userLoggedIn==false){return false;}
Action.errBuffer=Action.errMsg[0];var Kd=Action.findModule(Jd);if(Kd==null){Action.errBuffer=Action.errMsg[1];return false;}
Kd.getInputData();var Ld=Kd.getInputDataMap();if(Dd==null||Dd==""){Dd=Ld["oldpw"];}
if(Ed==null||Ed==""){Ed=Ld["newpw1"];}
if(Fd==null||Fd==""){Fd=Ld["newpw2"];}
if(Gd==null||Gd==""){Gd=Ld["email"];}
if(Hd==null||Hd==""){Hd=Ld["sec_quest"];}
if(Id==null||Id==""){Id=Ld["sec_ans"];}
if(Fd!=Ed){log.error("passwords dont fit together");var Md=Kd.getCurrentLayer().getErrorControl();if(Md){Md.setErrorFlag("wrong_new_pw");}
return false;}
Kd.requestChangeUserData(Dd,Ed,Gd,Hd,Id);return true;}
Action.submit=function(Nd,Od,Pd){Action.errBuffer=Action.errMsg[0];var Qd=Action.findModule(Pd);if(Qd==null){Action.errBuffer=Action.errMsg[1];return false;}
if(Nd==null){Nd=Qd.getStatus();}
if(Od==null){Od=Qd.getCurrentLayerIndex(Nd);}
return Qd.doAction(Nd,Od);}
Action.setSelectBase=function(Rd,Sd){Action.errBuffer=Action.errMsg[0];var Td=Action.findModule(Sd);if(Td==null){Action.errBuffer=Action.errMsg[1];return false;}
if(Rd==null){Rd=1;}
Td.setSelectBase(Rd);return Td.doAction(status,layerIdx);}
Action.switchWebPad=function(){if(webPad!=null){var Ud=null;if(userLoggedIn==true){Ud=document.getElementById("wp_log");}
else{Ud=document.getElementById("wp_anon");}
if(Ud==null){log.error("could not switch webpad");return false;}
webPad.setParentNode(Ud);webPad.moveToInit();webPad.checkControl();return true;}}
Action.historyOn=function(){Action.history=true;}
Action.historyOff=function(){Action.history=false;}
Action.handleActions=function(Vd){if(Vd==null||Vd==""||Vd==undefined){return true;}
if(Vd.indexOf("http")>-1){var Wd=document.URL;var Xd=Wd.split("/");Xd=Xd.slice(0,3);Vd=Vd.replace(Wd+"/","");}
Vd=maskCharacterInQuotes(Vd," ",'"|\'');Vd=Vd.replace(/\s/g,"");Vd=unmaskCharacterInQuotes(Vd," ");var Yd=Vd.split(";");var i;var Zd=false;var $d=new Array();var ae=[];var be="Action.result = (";for(i=0;i<Yd.length;i++){if(Yd[i]==""){continue;}
if(Action.history==true){$d.push(Yd[i]);}
else{if($d.length>0){Action.addHistory($d.join(";"));$d=new Array();}}
ae.push("(r = Action."+Yd[i]+")");}
be+=ae.join("&&")+")";eval(be);if(Action.result==false){var ce=Action.findModule();if(ce!=null){var de=ce.getStatus();var fe=ce.getCurrentLayer(de);var ge=fe.getErrorControl();ge.addErrorMessage(Action.errBuffer);}
return false;}
return true;}
Action.checkValue=function(he,ie){if(typeof he!="string"||he.indexOf("_v_")==-1){return he;}
var je=Action.findModule(ie);if(je==null){Action.errBuffer=Action.errMsg[1];return he;}
var ke=je.getStatus();var le=je.getCurrentLayer(ke);if(le==null){return he;}
var ne=he.replace("_v_","");var oe=le.getInputDataElement(ne);if(oe==null){return he;}
return oe["value"];}
Action.dl=function(pe,re,se){var te=Action.findModule(pe);if(te==null){Action.errBuffer=Action.errMsg[1];return false;}
var ue="getPrivData('"+te.getId()+"',"+re+","+se+")";var ve=te.switchLayerToFront(te.getDlStatus(),te.getDlLayer(),false,null,ue,null);}
Action.getPrivData=function(we,xe,ye){var ze=Action.findModule(we);if(ze==null){Action.errBuffer=Action.errMsg[1];return false;}
var we=ze.getId();var Ae="gotoStatus("+xe+","+ye+",'"+we+"');";ze.requestGetPrivData(Ae);}
Action.cleanRequests=function(Be,Ce,De){var Ee=Action.findModule(De);if(Ee==null){Action.errBuffer=Action.errMsg[1];return false;}
return Ee.cleanRequests(Be,Ce);}
Action.linkExternal=function(Fe,Ge){var He=window.open(Fe);He.focus();var Ie="gotoStatus("+status+","+layer+");";tmpMod.requestGetPrivData(Ie);}
Action.clickHotSpot=function(Je){var Ke=Action.findModule(Je);if(Ke==null){Action.errBuffer=Action.errMsg[1];return false;}
return Ke.clickHotSpot();}
Action.clickDelButton=function(Le){var Me=Action.findModule(Le);if(Me==null){Action.errBuffer=Action.errMsg[1];return false;}
return Me.clickDelButton();}
Action.jpClickUp=function(){webPad.clickUp();}
Action.jpClickDown=function(){webPad.clickDown();}
Action.jpClickLeft=function(){webPad.clickLeft();}
Action.jpClickRight=function(){webPad.clickRight();}
Action.jpClickMid=function(){webPad.clickMid();}
Action.jpClickMore=function(){webPad.clickMore();}
Action.jpActivate=function(){webPad.activate();}
Action.jpDeactivate=function(){webPad.deactivate();}
Action.spActivate=function(){webPad.activateSearchPad();}
Action.spDeactivate=function(){webPad.deactivateSearchPad();}
Action.spMarkListEntry=function(Ne){searchPad.markListEntry(Ne);}
Action.search=function(){searchPad.search();}
Action.toggleHeight=function(Oe){var Pe=Action.findModule(Oe);if(Pe==null){Action.errBuffer=Action.errMsg[1];return false;}
return Pe.toggleHeight();}
Action.reload=function(){var Qe="";if(globalInstance!=""){}
document.location=Qe;}
Action.clearErrors=function(Re){var Se=Action.findModule(Re);if(Se==null){Action.errBuffer=Action.errMsg[1];return false;}
var Te=Se.getStatus();var Ue=Se.getCurrentLayer(Te);if(Ue==null){return false;}
var Ve=Ue.getErrorControl();if(Ve==null){return true;}
Ve.clearErrorFlags();return true;}
Action.checkKeys=function(We,Xe,Ye,Ze){var e=(We)?We:((event)?event:null);var $e=0;var af=Xe.split(",");if(e){if(e.charCode){$e=e.charCode;}
else{$e=e.keyCode;}
var i;var bf=false;for(i=0;i<af.length;i++){if(af[i]==$e){bf=true;break;}}
if(bf==true){var cf=Action.findModule("");if(cf==null){Action.errBuffer=Action.errMsg[1];return false;}
Action.track(Tracker.LEVEL_ALL,cf.getId(),Ze,'050','');if(Ye!=null&&Ye!=""){Action.handleActions(Ye);}
if($e==13){We.cancelBubble=true;return false;}}}
return true;}
Action.setSelect=function(df,ef){var ff;if(typeof df=="object"){ff=df;}
else{ff=document.getElementById(objid);}
if(ff){var gf=ff.options.length;if(ef!=-1){if(gf<ef){ef=gf-1;}
ff.options[ef].selected=true;}
else{var i;for(i=0;i<gf;i++){ff.options[i].selected=false;}}}}
Action.spIncOffset=function(hf){return searchPad.incOffset(hf);}
Action.spDecOffset=function(jf){return searchPad.decOffset(jf);}
Action.spSetOffset=function(kf){return searchPad.setResultOffset(kf);}
Action.spDown=function(){if(searchPad==null){return false;}
var lf=searchPad.getModuleContext();if(lf==null){return false;}
var mf=searchPad.getOffset();var nf=searchPad.getMarkedListEntry();if((nf+1)>=mf){if(Action.spIncOffset(true)==true){searchPad.setMarkedListEntry(0);}}
else{lf.scrollLayer(1);var of=lf.getBreadCrumb();if(of){var pf=lf.getCurrentLayer();var qf=searchPad.getResultCount();var mf=searchPad.getResultOffset();var rf=pf.getScrollLayer().getCurrentPage();of.setExtraCrumb((rf+mf+1)+" von "+qf);}
if(searchPad.isActive()){var pf=lf.getCurrentLayer();if(pf){var sf=pf.getScrollLayer().getCurrentStep();searchPad.markListEntry(sf);}}}}
Action.spUp=function(){if(searchPad==null){return false;}
var tf=searchPad.getModuleContext();if(tf==null){return false;}
var uf=searchPad.getOffset();var vf=searchPad.getMarkedListEntry();if(vf<=0){if(Action.spDecOffset(true)){searchPad.setMarkedListEntry(uf-1);}}
else{tf.scrollLayer(-1);var wf=tf.getBreadCrumb();if(wf){var xf=tf.getCurrentLayer();var yf=searchPad.getResultCount();var uf=searchPad.getResultOffset();var zf=xf.getScrollLayer().getCurrentPage();wf.setExtraCrumb((zf+uf+1)+" von "+yf);}
if(searchPad.isActive()){var xf=tf.getCurrentLayer();if(xf){var Af=xf.getScrollLayer().getCurrentStep();searchPad.markListEntry(Af);}}}}
Action.track=function(Bf,Cf,Df,Ef,Ff){var Gf=Action.findModule(Cf);var Hf="";var If="";var Jf="";var Kf="";if(Gf){Hf=Gf.getServiceId();If=Gf.getServiceName();Jf=Gf.getStatus();Kf=Gf.getCurrentLayerIndex();}
if(track!=null){track.log(Bf,[Cf,Hf,If,Jf,Kf,Df,Ef,Ff]);}
return true;}
Action.tag=function(Lf){tagTrack.log(null,[Lf]);}
Action.sendFF=function(Mf,Nf,Of,Pf,Qf){var Rf=[];Action.errBuffer=Action.errMsg[0];var Sf=Action.findModule(Qf);if(Sf==null){Action.errBuffer=Action.errMsg[1];return false;}
Sf.getInputData();var Tf=Sf.getInputDataMap();if(Mf==null||Mf==""){if(Tf["email1"]!=""){Rf.push(Tf["email1"]);}}
if(Nf==null||Nf==""){if(Tf["email2"]!=""){Rf.push(Tf["email2"]);}}
if(Of==null||Of==""){if(Tf["email3"]!=""){Rf.push(Tf["email3"]);}}
if(Pf==null||Pf==""){if(Tf["withProfile"]!=""){Pf=Tf["withProfile"];}}
var Uf=Rf.join(",");if(Uf==""){Action.errBuffer="no email addresses given";return false;}
Sf.requestSendFF(Rf.join(","),Pf);return true;}
Action.stopWinMedia=function(Vf,Wf){Action.errBuffer=Action.errMsg[0];var Xf=Action.findModule(Wf);if(Xf==null){Action.errBuffer=Action.errMsg[1];return false;}
if(Vf==""){Vf="ap";}
var Yf=Xf.getId()+"_s"+Xf.getStatus()+"_l"+Xf.getCurrentLayerIndex()+"_"+Vf;var Zf=document.getElementById(Yf);if(Zf.controls!=null){Zf.controls.stop();}
else{}}
Action.startWinMedia=function($f,ag){Action.errBuffer=Action.errMsg[0];var bg=Action.findModule(ag);if(bg==null){Action.errBuffer=Action.errMsg[1];return false;}
if($f==""){$f="ap";}
var cg=bg.getId()+"_s"+bg.getStatus()+"_l"+bg.getCurrentLayerIndex()+"_"+$f;if(document.getElementById(cg)){document.getElementById(cg).controls.start();}
else{}}
Action.showProgressBar=function(dg,eg,fg){var gg=Action.findModule(fg);if(gg==null){Action.errBuffer=Action.errMsg[1];return false;}
if(!Module.isValidModuleStatus(dg)){Action.errBuffer=Action.errMsg[2];return false;}
if(eg==null){eg=gg.getCurrentLayerIndex();}
var hg=gg.getLayerByIndex(dg,eg);if(hg){hg.showProgressBar();}}
Action.hideProgressBar=function(ig,jg,kg){var lg=Action.findModule(kg);if(lg==null){Action.errBuffer=Action.errMsg[1];return false;}
if(!Module.isValidModuleStatus(ig)){Action.errBuffer=Action.errMsg[2];return false;}
if(jg==null){jg=lg.getCurrentLayerIndex();}
var mg=lg.getLayerByIndex(ig,jg);if(mg){mg.hideProgressBar();}}
Action.showColumns=function(ng,og,pg,qg,rg){var sg=ng.split(",");if(!sg){sg=new Array();sg.push(ng);}
var tg="";if(qg!=null){tg=qg;}
if(og==""||og=="{effect}"){og="none";}
if(rg==true){var ug="showColumns('"+ng+"','"+og+"',"+pg+",'"+tg+"');";Action.addHistory(ug);}
var i;for(i=0;i<sg.length;i++){cols[sg[i]].show(og,null,pg,qg);}
return true;}
Action.hideColumns=function(vg,wg,xg){var yg=vg.split(",");if(!yg){yg=new Array();yg.push(vg);}
var i;for(i=0;i<yg.length;i++){cols[yg[i]].hide(wg,null,xg);}}
Action.toggleColumn=function(zg,Ag,Bg){if(cols[zg]!=null){if(cols[zg].isHidden()){Action.showColumns(zg,Ag,Bg);}
else{Action.hideColumns(zg,Ag,Bg);}}
return true;}
Action.showModule=function(Cg,Dg,Eg,Fg,Gg,Hg,Ig,Jg,Kg){if(!Dg){Dg=new Array();}
if(!Kg){Kg=true;}
var Lg=Action.findModule(Cg);if(Lg!=null){if(!Gg||Gg==""){Gg=Lg.getParentName();}
if(Gg==""){Action.errBuffer=Action.errMsg[16];return false;}}
else{if(!Gg||Gg==""){Action.errBuffer=Action.errMsg[16];return false;}}
var Mg=simpleMap2String(Dg);if(Jg==true){var Ng="showModule('"+Cg+"',"+Mg+","+Eg+","+Fg+",'"+Gg+"','"+Hg+"',"+Ig+",false,"+Kg+");";Action.addHistory(Ng);}
var Og="gotoLayer("+Fg+","+Eg+",'"+Cg+"',true,false,"+Kg+");";if(Lg!=null){var Pg="showColumns('"+Gg+"','"+Hg+"',"+Ig+",'');";var Qg=Og+Pg;Action.getAll(Eg,Fg,null,null,Dg,Cg,Qg);return true;}
else{var Rg="getAll("+Eg+","+Fg+", null, null,"+Mg+",'"+Cg+"'); gotoLayer("+Fg+","+Eg+",'"+Cg+"',true,false,"+Kg+");";var Pg="showColumns('"+Gg+"','"+Hg+"',"+Ig+",'');";var Sg=Rg+Pg;Action.renderContainers(Gg,Sg,null);return true;}
return true;}
Action.renderContainers=function(Tg,Ug,Vg){var Wg=Tg.split(",");if(!Wg){Wg=new Array();Wg.push(Tg);}
var i;for(i=0;i<Wg.length;i++){cols[Wg[i]].requestRenderContainer(Ug,Vg);}
return false;}
Action.setTemplateDirty=function(Xg,Yg,Zg){var $g=Action.findModule(Zg);if($g==null){Action.errBuffer=Action.errMsg[1];return false;}
if(!Module.isValidModuleStatus(Xg)){Action.errBuffer=Action.errMsg[2];return false;}
if(Yg==null){Yg=$g.getCurrentLayerIndex();}
else{if(Yg=="all"){var ah=$g.getAllLayersForStatus(Xg);if(ah){var i;for(i in ah){if(typeof ah[i]=="function"){continue;}
ah[i].setTemplateDirty();}}}
else{var bh=$g.getLayerByIndex(Xg,Yg);if(bh){bh.setTemplateDirty();}}}
return true;}
Action.setDataDirty=function(ch,dh,eh){var fh=Action.findModule(eh);if(fh==null){Action.errBuffer=Action.errMsg[1];return false;}
if(!Module.isValidModuleStatus(ch)){Action.errBuffer=Action.errMsg[2];return false;}
if(dh==null){dh=fh.getCurrentLayerIndex();}
else{if(dh=="all"){var gh=fh.getAllLayersForStatus(ch);var i;for(i=0;i<gh.length;i++){gh[i].setDataDirty();}}
else{var hh=fh.getLayerByIndex(ch,dh);if(hh){hh.setDataDirty();}}}
return true;}
Action.showSpecial=function(ih,jh){var kh=Action.findModule(jh);if(kh==null){Action.errBuffer=Action.errMsg[1];return false;}
var r=kh.showSpecial(ih);return r;}
Action.hideSpecial=function(lh,mh){var nh=Action.findModule(mh);if(nh==null){Action.errBuffer=Action.errMsg[1];return false;}
var r=nh.hideSpecial(lh);return r;}
Action.showLayer=function(oh,ph,qh,rh,sh){var th=Action.findModule(sh);if(th==null){Action.errBuffer=Action.errMsg[16];return false;}
var uh="gotoLayer("+qh+","+ph+",'"+th.getId()+"',true);";th.requestGetAll(ph,qh,oh,false,uh);}
Action.getFormValue=function(vh,wh,xh){var yh=$(vh);var zh="";if(yh){zh=yh.getProperty("value");}
if(wh){zh=wh.replace(/\{1\}/g,zh);}
Action.inputData[xh]=zh;}
Action.getFormValues=function(Ah){var i;for(i=0;i<Ah.length;i++){Action.getFormValue(Ah[i]["name"],Ah[i]["pattern"],Ah[i]["field"]);}
return true;}
Action.addHistory=function(Bh){Action.clickHistory.push(Bh);}
Action.purgeHistory=function(){Action.clickHistory=new Array();}
Action.getHistory=function(Ch){if(Ch!=null){var Dh=Action.clickHistory.length;if(Dh<Ch||Ch<0){return "";}
var Eh=Action.clickHistory[Ch];Action.clickHistory.splice(Ch+1,Dh-Ch-1);return Eh;}
else{return Action.clickHistory.pop();}}
Action.backLink=function(){var Fh=Action.clickHistory.length;var Gh="";var i;for(i=0;i<Fh;i++){}
if((Fh-2)<0){Gh=Action.getHistory(0);}
else{Gh=Action.getHistory(Fh-2);}
Action.handleActions(Gh);}
Action.gotoContent=function(id,Hh,Ih){var Jh=Action.findModule(Ih);if(Jh==null){Action.errBuffer=Action.errMsg[16];return false;}
var Kh;Kh={'detailKey':id};var Lh=Jh.getStatus();var Mh=Jh.getCurrentLayerIndex(Lh);var Nh=simpleMap2String(Kh);if(Hh==null){Hh=false;}
if(Hh==true){var Oh="showModule('"+Jh.getId()+"',"+Nh+","+Lh+","+Mh+",'"+Jh.getParentName()+"','fade',false,false,false);";Action.addHistory(Oh);}
Action.showLayer(Kh,Lh,Mh,'fade',Jh.getId());}
Action.netjayURL="http://www.netjay.de/action?";Action.prevPage=function(Ph,Qh,Rh){var Sh=Action.findModule(Rh);if(Sh==null){Action.errBuffer=Action.errMsg[16];return false;}
if((Ph-Qh)<0){return false;}
var Th={'pgOffset':(Ph-Qh)};var Uh=Sh.getStatus();var Vh=Sh.getCurrentLayerIndex(Uh);Sh.requestGetAll(Uh,Vh,Th,false,null,null);return true;}
Action.nextPage=function(Wh,Xh,Yh,Zh){var $h=Action.findModule(Zh);if($h==null){Action.errBuffer=Action.errMsg[16];return false;}
if((Wh+Xh)>Yh){return false;}
var ai={'pgOffset':(Wh+Xh)};var bi=$h.getStatus();var ci=$h.getCurrentLayerIndex(bi);$h.requestGetAll(bi,ci,ai,false,null,null);return true;}
function BreadCrumb(id,di,ei){var fi="anonymous";var gi=new Array();var hi="";var ii=(di!=null)?di:":";var ji=null;var ki="";var li=false;var mi=(ei!=null)?ei:true;var ni=99;var oi=0;this.init=function(){if(id!=null){fi=id;}
this.setNode();this.render();}
this.setNode=function(pi){if(pi){ji=pi;}
else{var qi=document.getElementById(fi);if(qi){ji=qi;}
else{ji=null;log.warn("DOMNode for module "+fi+" could not be found");}}
return true;}
this.getNode=function(){return ji;}
this.getId=function(){return fi;}
this.setId=function(ri){if(ri!=null){fi=ri;}
else{ri=fi;}
this.setNode();}
this.setStart=function(si){oi=si;}
this.getStart=function(){return oi;}
this.setLen=function(ti){ni=ti;}
this.getLen=function(){return ni;}
this.show=function(){mi=true;if(ji){setElementStyle(ji,"visibility","visible");}}
this.hide=function(){mi=false;if(ji){setElementStyle(ji,"visibility","hidden");}}
this.isVisible=function(){return mi;}
this.add=function(ui,vi,wi,xi,yi){var zi=new Array();if(ui!=""){zi["name"]=ui;}
if(vi!=""){zi["action"]=vi;}
if(wi!=null){if(wi==Module.M_SELECT||wi==Module.M_CONFIG){zi["mode"]=wi;}
else{log.error("invalid breadcrumb mode "+wi);return false;}}
else{zi["mode"]=Module.M_SELECT;}
if(xi==null||xi>gi.length){gi.push(zi);}
else{if(xi==0){gi.unshift(zi);}
else{var Ai=gi.slice(0,xi);var Bi=gi.slice(xi);var Ci=new Array(zi);gi=Ai.concat(Ci,Bi);}}
li=true;if(yi!=true){this.render();}}
this.addBulk=function(Di,Ei){var i;for(i=0;i<Di.length;i++){this.add(Di[i]["name"],Di[i]["action"],Di[i]["mode"],99,true);}
if(Ei!=true){this.render();}}
this.setCrumbByPath=function(Fi,Gi,Hi,Ii){this.purge();if(Fi!=null){var Ji=Fi.split("/");}
else{var Ji=new Array();}
if(!Gi||Gi<1){Gi=1;}
if(Gi>Ji.length){Gi=Ji.length;}
var i;var Ki=null;for(i=Gi;i<Ji.length;i++){if(Ii!=true){Ki="gotoLayer("+i+",Module.M_SELECT,null,false);";}
if(Ji[i]!=""){this.add(Ji[i],Ki,Module.M_SELECT,99,true);}}
li=true;if(Hi!=null){this.setLen(Hi);}
this.render();}
this.setExtraCrumb=function(Li){hi=Li;li=true;this.render();}
this.getExtraCrumb=function(){return hi;}
this.purge=function(){gi=new Array();}
this.removeCrumb=function(Mi){var i;for(i=0;i<gi.length;i++){if(Mi==gi[i]["name"]){gi.splice(i,1);break;}}
this.render();}
this.remove=function(Ni,Oi,Pi){if(Pi==null){Pi=99;}
if(Oi==null){Oi=0;}
var i;var Qi=0;if(Ni!=null){for(i=0;i<gi.length;i++){if(gi[i]["mode"]!=Ni){continue;}
else{if(Qi<Oi){Qi++;continue;}
Qi++;Pi--;if(Pi==0){break;}}
gi.splice(i,1);}}
else{gi.splice(Oi,Pi);}
this.render();}
this.prepare=function(Ri,Si,Ti,Ui){if(Ti==null){Ti=oi;}
if(Ui==null){Ui=ni;}
if(Ui>gi.length){Ui=gi.length;}
var i;var Vi=0;var Wi=false;ki="";for(i=0;i<gi.length;i++){if(Ri!=null){if(gi[i]["mode"]!=Ri){continue;}}
if(Vi<Ti){Vi++;continue;}
if(Vi>=Ui){break;}
Vi++;if(Si==true||gi[i]["action"]==null||gi[i]["action"]==""){ki+=gi[i]["name"];}
else{if(gi[i]["action"].indexOf("Action.")==-1){gi[i]["action"]="Action."+gi[i]["action"];}
ki+="<a href=\"#\" onmouseover=\"this.T_WIDTH=80; this.T_OPACITY=80; this.T_BGCOLOR='#ffffff'; return tt_setTip('Wählen Sie hier die Auswahlebene "+gi[i]["name"]+"','04"+Vi+"',this,event,true);\" onClick=\""+gi[i]["action"]+";\">"+gi[i]["name"]+"</a>";}
if(Vi<=(Ui-1)){ki+=di;}}
if(hi!=""){if(ki!=""){ki+=di+hi;}
else{ki+=hi;}}}
this.render=function(Xi,Yi,Zi,$i){if(li==true){this.prepare(Xi,Yi,Zi,$i);}
if(ji){ji.innerHTML=ki;}}
this.getCrumbString=function(){return ki;}
this.init();}
function Column(id,aj,bj,cj,dj,ej,fj,gj,hj,ij,jj,kj,lj,mj,nj,oj,pj,qj,rj,sj,tj,uj){var vj="noname";var wj="column";var xj=-1;var yj=-1;var zj=-1;var Aj=-1;var Bj=-1;var Cj=-1;var Dj=-1;var Ej=-1;var Fj=Column.C_INVISIBLE;var Gj=true;var Hj=new Array();var Ij=new Array();var Jj=new Array();var Kj=0;var Lj=null;var Mj=null;var Nj=null;var Oj=false;var Pj=false;var Qj=false;var Rj=-1;var Sj=false;var Tj=false;var Uj=true;var Vj=true;var Wj="";var Xj=new Array();var Yj="";var Zj="";var $j="";var ak=false;var bk=-1;var ck=false;var dk=false;var ek=false;var fk=false;this.initParas=function(){if(id!=null){vj=id;}
var gk;if(ij!=null){gk=splitValue(ij,"px");xj=(gk[1]=="%")?gk[0]:-1;yj=(gk[1]=="px")?gk[0]:-1;}
if(jj!=null){gk=splitValue(jj,"px");zj=(gk[1]=="%")?gk[0]:-1;Aj=(gk[1]=="px")?gk[0]:-1;}
if(kj!=null){gk=splitValue(kj,"px");Bj=(gk[1]=="%")?gk[0]:-1;Cj=(gk[1]=="px")?gk[0]:-1;bk=kj;}
if(lj!=null){gk=splitValue(lj,"px");Dj=(gk[1]=="%")?gk[0]:-1;Ej=(gk[1]=="px")?gk[0]:-1;}
if(dj!=null){if(dj==Column.C_VISIBLE||dj==Column.C_INVISIBLE){Fj=dj;}
else{if(dj==true){Fj=Column.C_VISIBLE;}
else{Fj=Column.C_INVISIBLE;}}}
if(aj!=null&&typeof aj=="object"&&(aj.getType()=="column"||aj.getType()=="page")){Mj=aj;}
if(bj!=null&&typeof bj=="boolean"){Oj=bj;}
if(cj!=null&&typeof cj=="boolean"){Pj=cj;}
if(ej!=null&&typeof ej=="boolean"){Qj=ej;}
if(hj!=null&&typeof hj=="number"){Rj=hj;}
if(fj!=null&&typeof fj=="boolean"){Sj=fj;}
if(gj!=null&&typeof gj=="boolean"){Tj=gj;}
if(mj!=null&&typeof mj=="boolean"){Uj=mj;}
if(nj!=null&&typeof nj=="boolean"){Vj=nj;}
if(oj!=null&&typeof oj=="string"){Xj=oj.split(",");}
if(pj!=null&&typeof pj=="string"){Yj=pj;}
if(qj!=null&&typeof qj=="string"){Zj=qj;}
if(rj!=null&&typeof rj=="boolean"){ak=rj;}
if(sj!=null&&typeof sj=="boolean"){dk=sj;}
if(tj!=null&&typeof tj=="boolean"){ek=tj;}
if(uj!=null&&typeof uj=="boolean"){fk=uj;}}
this.init=function(){this.initParas();if(!this.setNode()){log.error("ERROR: SetNode() failed for "+vj);return false;}
if(!this.renderPos()){log.error("Could not render positioning of column "+vj);return false;}
if(!this.renderSize()){log.error("Could not render size of column "+vj);return false;}
this.calcPosX();this.calcPosY();this.calcWidth();this.calcHeight();if(Fj==Column.C_VISIBLE&&ak==true){var hk="showColumns('"+vj+"','"+defaultEffect+"',false,null,null);";Action.addHistory(hk);}
return true;}
this.setPos=function(ij,jj){var ik=splitValue(ij,"px");if(ik[1]=="%"){xj=ik[0];}
else{yj=ik[0];}
ik=splitValue(jj,"px");if(ik[1]=="%"){zj=ik[0];}
else{Aj=ik[0];}
this.renderPos();}
this.renderPos=function(){var jk=true;if(Lj.style){if(xj!=-1){if(!globalSetStyle(Lj,"left",xj+"%")){log.error("could not set style for _relPosX");jk=false;}}
else if(yj!=-1){if(!globalSetStyle(Lj,"left",yj+"px")){log.error("could not set style for _absPosX");jk=false;}}
if(zj!=-1){if(!globalSetStyle(Lj,"top",zj+"%")){log.error("could not set style for _relPosY");jk=false;}}
else if(Aj!=-1){if(!globalSetStyle(Lj,"top",Aj+"px")){log.error("could not set style for _absPosY");jk=false;}}}
return jk;}
this.getRelPosX=function(){return xj;}
this.getRelPosY=function(){return zj;}
this.getAbsPosX=function(){return yj;}
this.getAbsPosY=function(){return Aj;}
this.setSize=function(kj,lj){if(kj){var kk=splitValue(kj,"px");if(kk[1]=="%"){Bj=kk[0];}
else{Cj=kk[0];}}
if(lj){var kk=splitValue(lj,"px");if(kk[1]=="%"){Dj=kk[0];}
else{Ej=kk[0];}}
this.renderSize();Mj.recalcPageHeight(false);}
this.setRelWidth=function(lk){if(lk){Bj=lk;Cj=-1;}
if(Gj==true){globalSetStyle(Lj,"width",Bj+"%");}}
this.getRelWidth=function(){return Bj;}
this.setAbsWidth=function(mk){if(mk){Cj=mk;Bj=-1;}
if(Gj==true){globalSetStyle(Lj,"width",Cj+"px");}}
this.getAbsWidth=function(){return Cj;}
this.setRelHeight=function(nk){if(nk){Dj=nk;Ej=-1;}
if(Gj==true){globalSetStyle(Lj,"height",Dj+"%");}}
this.getRelHeight=function(){return Dj;}
this.setAbsHeight=function(ok){if(ok){Ej=ok;Dj=-1;}
if(Gj==true){globalSetStyle(Lj,"height",Ej+"px");}}
this.getAbsHeight=function(){if(this.isDroppable()){return Ej-100;}
return Ej;}
this.renderSize=function(){var pk=true;if(Lj.style){if(Bj!=-1){if(!globalSetStyle(Lj,"width",Bj+"%")){log.error("could not set style for _relWidth");pk=false;}}
else if(Cj!=-1){if(!globalSetStyle(Lj,"width",Cj+"px")){log.error("could not set style for _absWidth");pk=false;}}
if(Dj!=-1){if(!globalSetStyle(Lj,"height",Dj+"%")){log.error("could not set style for _relHeight");pk=false;}}
else if(Ej!=-1){if(!globalSetStyle(Lj,"height",Ej+"px")){log.error("could not set style for _absHeight");pk=false;}}
pk=true;}
return pk;}
this.render=function(){this.renderSize();this.renderPos();this.setVisibility();}
this.calcPosX=function(){var qk=$(vj).getStyle("left");if(qk){if(qk.search(/px/)!=-1){yj=Math.floor(Number(qk.replace(/px/,"")));}
else{var rk=this.getParentAbsWidth();var sk=qk.replace(/%/,"");xj=sk;yj=Math.floor(rk*(Number(qk.replace(/%/,""))/100));}}}
this.calcPosY=function(){var tk=$(vj).getStyle("top");if(tk.search(/px/)!=-1){Aj=Math.floor(Number(tk.replace(/px/,"")));}
else{var uk=this.getParentAbsHeight();var vk=tk.replace(/%/,"");zj=Number(vk);Aj=Math.floor(uk*(Number(tk.replace(/%/,""))/100));}}
this.recalcWidth=function(){if(this.hasModules()==true){var i;var wk=0;for(i=0;i<Hj.length;i++){Hj[i].calcWidth();Hj[i].renderSize();wk=Hj[i].getAbsWidth();}}
else{var i;for(i=0;i<Ij.length;i++){Ij[i].recalcWidth();Ij[i].renderSize();}}
this.calcWidth();this.renderSize();}
this.calcWidth=function(){var xk=$(vj).getStyle("width");if(xk.search(/px/)!=-1){Cj=Math.floor(Number(xk.replace(/px/,"")));}
else{var yk=this.getParentAbsWidth();var zk=xk.replace(/%/,"");Bj=zk;Cj=Math.floor(yk*(Number(zk)/100));}}
this.countVisibleColumns=function(){var i;var Ak=0;for(i=0;i<Ij.length;i++){if(Ij[i].isVisible()){Ak++;}}
return Ak;}
this.countActiveColumns=function(){var i;var Bk=0;for(i=0;i<Ij.length;i++){if(Ij[i].isActive()){Bk++;}}
return Bk;}
this.countRelevantColumns=function(){var i;var Ck=0;for(i=0;i<Ij.length;i++){if(Ij[i].isVisible()&&Ij[i].isActive()&&Ij[i].isHiddenOnEmpty()==false){Ck++;}}
return Ck;}
this.setColPos=function(){if(!Sj){return;}
var Dk=this.countRelevantColumns();if(Dk==0){return;}
var Ek=currentPage.getMinWidthPerResolution();var Fk=currentPage.getMaxWidthPerResolution();var Gk=currentPage.getWidthPerResolution();var Hk=100/Dk;var Ik=0;var i;for(i=0;i<Ij.length;i++){if(Ij[i].isActive()&&!Ij[i].hidesOnEmpty()){Ij[i].setRelWidth(Hk);Ij[i].calcWidth();Ij[i].setPos((Ik)+"%",null);Ij[i].calcPosX();Ij[i].calcThreshX();Ik+=Hk;}
else{Ij[i].setPos((Ik)+"%",null);Ij[i].calcPosX();Ij[i].calcThreshX();}}}
this.calcHeight=function(){var Jk=$(vj).getStyle("height");if(Jk.search(/px/)!=-1){Ej=Math.floor(Number(Jk.replace(/px/,"")));}
else{var Kk=this.getParentAbsHeight();var Lk=Jk.replace(/%/,"");Dj=Lk;Ej=Math.floor(Kk*(Number(Lk)/100));}}
this.setParent=function(aj){if(aj){Mj=aj;return true;}
return false;}
this.isRemovable=function(){return Pj;}
this.isDroppable=function(){return Oj;}
this.isVisible=function(){if(Fj==Column.C_VISIBLE){return true;}
return false;}
this.isInvisible=function(){if(Fj==Column.C_INVISIBLE){return true;}
return false;}
this.isHidden=function(){return this.isInvisible();}
this.isRecursive=function(){return dk;}
this.isBound=function(){return ek;}
this.isStickyZ=function(){return fk;}
this.hidesOnEmpty=function(){return Qj;}
this.hasColumns=function(){if(Ij.length>0){return true;}
return false;}
this.getNumberOfColumns=function(){return Ij.length;}
this.hasModules=function(){if(Hj.length>0){return true;}
return false;}
this.getNumberOfModules=function(){return Hj.length;}
this.getMaxNumber=function(){return Rj;}
this.getMaxHeight=function(){var Mk=0;if(Ij.length>-1){var i;for(i=0;i<Ij.length;i++){var Nk=Ij[i].getAbsPosY();var Ok=Ij[i].getAbsHeight();if(Nk>Mk){Mk=Nk+Ok;}}}
else{var i;for(i=0;i<Hj.length;i++){var Pk=Hj[i].getAbsHeight();Mk+=Pk;}
Mk+=50;}
return Mk;}
this.adaptHeightToColumns=function(Qk,sj){var i;var Rk=0;for(i=0;i<Ij.length;i++){if(Ij[i].isVisible()==false){continue;}
if(sj==null||sj==true){Ij[i].adaptHeight(Qk);}
var Sk=Ij[i].getAbsHeight();var Tk=Ij[i].getAbsPosY();var Uk=Tk+Sk;if(Rk<Uk){Rk=Uk;}}
if(sj==true&&Mj){Mj.adaptHeight(Qk,false);}
if(Ej==Rk){return true;}
Ej=Rk;if(Qk==true){if(!globalSetStyle(Lj,"height",Ej+"px")){log.error("could not set height of column "+vj);return false;}}
else{new Effect.Size(Lj,null,Ej,200,10);}
return true;}
this.adaptHeightToModules=function(Vk){var i;var Wk=0;for(i=0;i<Hj.length;i++){if(Hj[i].isVisible()==false){continue;}
var Xk=Hj[i].getAbsHeight();Wk+=Xk;}
if(this.isDroppable()&&this.isVisible()){Wk+=100;}
if(Ej==Wk){return true;}
Ej=Wk;if(Ej>=0){if(!setElementStyle(Lj,"height",Ej+"px")){log.error("could not set height of column "+vj);return false;}}
return true;}
this.adaptHeight=function(Yk,sj){var r;if(Tj==true){if(this.hasColumns()){r=this.adaptHeightToColumns(Yk,sj);}
if(this.hasModules()){r=this.adaptHeightToModules(Yk);}}
else{r=true;}
return r;}
this.getThreshX=function(){return Kj;}
this.calcThreshX=function(){if(Cj==0){Kj=yj+50;}
else{Kj=Math.floor(yj+(Cj*(1-Column.C_COL_THRESHOLD)));}}
this.getParentAbsWidth=function(){return Mj.getAbsWidth();}
this.getParentAbsHeight=function(){return Mj.getAbsHeight();}
this.calcModuleThreshY=function(){this.calcPosY();var Zk=cols["pg1_ctop"].getAbsHeight();var $k=Number(Aj)+Zk+50;var i;var bl=this.getNumberOfModules();for(i=0;i<bl;i++){var cl=Number($k)+Math.floor(Hj[i].getAbsHeight()*(1-Column.C_ROW_THRESHOLD));Jj[i]=cl;$k+=Hj[i].getAbsHeight();}}
this.getModulesThreshY=function(){return Jj;}
this.calcAll=function(){this.calcPosX();this.calcPosY();this.calcWidth();this.calcModuleThreshY();}
this.getNode=function(){return Lj;}
this.setNode=function(fl){var gl=false;if(fl){Lj=fl;gl=true;}
else{var hl=document.getElementById(vj);if(hl){Lj=hl;gl=true;}
else{Lj=null;}}
if(Lj&&Oj){this.addDropEvents();}
return gl;}
this.addDropEvents=function(){$(vj).addEvents({'over':function(el,jl){draggedModuleId=el.getAttribute("id");mods[draggedModuleId].setDraggedCol(cols[vj]);},'leave':function(el,kl){if(draggedModuleId!=""){mods[draggedModuleId].setDraggedCol(null);}},'drop':function(el,ll){if(draggedModuleId!=""){mods[draggedModuleId].requestMoveModule();mods[draggedModuleId].setDraggedCol(null);draggedModuleId="";}
el.removeEvents();el.remove();}});if(browser.indexOf("Firefox")!=-1){var f=function(el,ml){if(draggedModuleId!=""){var nl=mods[draggedModuleId].getDraggedCol();if(nl==null){return;}
var ol=mods[draggedModuleId].getParentObj();var pl=nl.getModulesThreshY();var ql=false;var j;if(nl.getNumberOfModules()==0){j=0;}
else{for(j=0;j<pl.length;j++){if(el.clientY<=pl[j]){ql=true;break;}}}
var rl=j;if(rl>=nl.getNumberOfModules()&&rl>0){rl=nl.getNumberOfModules()-1;}
if(ol.getId()==nl.getId()){nl.shiftModule(draggedModuleId,rl);}
else{var tl=ol.findModuleIndex(draggedModuleId);var ul=ol.removeModuleIndex(tl);nl.addModule(ul,rl);}};};$(vj).addEvent('mousemove',f);}}
this.getName=function(){return vj;}
this.getId=function(){return vj;}
this.getType=function(){return wj;}
this.setName=function(vl){var wl=false;if(vj!=vl){vj=vl;if(this.setNode()){wl=true;}}
return wl;}
this.setVisible=function(){return this.setVisibility(Column.C_VISIBLE);}
this.setInvisible=function(){return this.setVisibility(Column.C_INVISIBLE);}
this.setVisibility=function(dj,xl,yl){var zl=false;var Al=function(){$(vj).setStyle("opacity",1);if(Nj!=null){Nj.setColPos();}}
var Bl=function(){$(vj).setStyle("opacity",0);$(vj).setStyle("display","none");if(Nj!=null){Nj.setColPos();}}
if(dj){switch(dj){case Column.C_INVISIBLE:if(Fj==Column.C_INVISIBLE){Bl();return true;}
Fj=Column.C_INVISIBLE;zl=true;break;case Column.C_VISIBLE:if(Fj==Column.C_VISIBLE){Al();return true;}
Fj=Column.C_VISIBLE;zl=true;break;default:break;}}
if(Gj==true){if(!yl){yl=1000;}
if(browser=="MSIE6"||browser=="MSIE7"){xl="none";}
if(Fj==Column.C_VISIBLE){$(vj).setStyle("display","block");$(vj).setStyle("visibility","visible");if(xl!="none"){var Cl=$(vj).effects({duration:yl,transition:Fx.Transitions.Quart.easeOut});}
switch(xl){case "fade":Cl.start({'opacity':1.0}).chain(Al);break;case "sizex":Cl.start({'width':Cj}).chain(Al);break;case "sizey":Cl.start({'height':Ej}).chain(Al);break;case "sizexy":Cl.start({'height':Ej,'width':Cj}).chain(Al);break;default:$(vj).setStyle("opacity",1);Al();}}
else{var Dl=function(){$(vj).setStyle("display","none");$(vj).setStyle("visibility","hidden");if(Nj!=null){Nj.setColPos();}};if(xl!="none"){var Cl=$(vj).effects({duration:yl,transition:Fx.Transitions.Quart.easeOut});}
switch(xl){case "fade":Cl.start({'opacity':[1.0,0.0]}).chain(Dl);break;case "sizex":Cl.start({'width':0}).chain(Dl);break;case "sizey":Cl.start({'height':0}).chain(Dl);break;case "sizexy":Cl.start({'height':0,'width':0}).chain(Dl);break;default:$(vj).setStyle("opacity",0);Dl();}}}
else{}
return zl;}
this.getVisibility=function(){return Fj;}
this.findModuleIndex=function(El){var i;var Fl=false;for(i=0;i<Hj.length;i++){if(Hj[i].getId()==El){Fl=true;break;}}
if(Fl==false){i=-1;}
return i;}
this.findModule=function(Gl){var Hl=null;var i=this.findModuleIndex(Gl);if(i>-1){return Hj[i];}
for(i=0;i<Ij.length;i++){var Il=Ij[i].findModule(Gl);if(Il){return Il;}}
return Hl;}
this.getModuleByIndex=function(Jl){return Hj[Jl];}
this.addModule=function(Kl,Ll,Ml){var Nl=0;if(Hj.length>0){}
if(Hj.length==Rj){log.error("no more modules allowed in this column");return false;}
if(Kl.getType()!="module"){log.error("no module obj given. Leaving function");return false;}
if(!Ml||Ml==false){if(this.findModuleIndex(Kl.getId())!=-1){if(Kl.getId()=="m_idAdder"){log.warn("Adder Module already exists in this column. Ignoring add.");return true;}
log.error("ERROR: module "+Kl.getId()+" already exists. Leaving function");return false;}}
if(Ll){if(typeof(Ll)=="string"){switch(Ll){case "TOP":Nl=0;break;case "BOTTOM":Nl=-1;break;case "END":Nl=-1;break;default:log.error("position string "+Ll+" is no valid string. Leaving function");return false;}}
else{Nl=Ll;}}
var Ol=Hj.length;var Pl=Ol;Kl.setParent(this);switch(Nl){case 0:var Ql=Hj.splice(0,Ol,Kl);var Rl=Hj.concat(Ql);Hj=Rl;Pl=Hj.length;break;case -1:Pl=Hj.push(Kl);Nl=Hj.length-1;break;default:var Ql=Hj.splice(Nl,(Ol-Nl+1),Kl);var Rl=Hj.concat(Ql);Hj=Rl;Pl=Hj.length;break;}
if(Pl!=(Ol+1)){log.error("insert of module has failed. Leaving function");return false;}
Kl.setOrder(Nl);if(Qj==true&&Hj.length>0){this.showOnEmpty();}
if(Ol<(Nl+1)){Lj.appendChild(Kl.getNode());}
else{var Sl=Hj[Nl+1].getNode();if(Sl==null){log.error("beforeNode not found!!");}
var Tl=Kl.getNode();Lj.insertBefore(Kl.getNode(),Sl);}
this.calcModuleThreshY();if(Mj){Mj.adaptHeight(true);}
this.adaptHeight(true);return true;}
this.shiftModule=function(Ul,Vl){var i;var Wl=Hj.length;i=this.findModuleIndex(Ul);if(i==-1){log.error("given module name "+Ul+" cannot be found in column "+vj+". Leaving function");return false;}
if(i==Vl){return true;}
if(typeof(Vl)=="string"){switch(Vl){case "TOP":Vl=0;break;case "END":Vl=Wl;break;case "BOTTOM":Vl=Wl;break;default:log.error("position string "+Vl+" is an invalid string. Leaving function");return false;}}
if(i==Vl){return true;}
var Xl=Hj.splice(i,1)[0];Xl.setOrder(Vl);var Yl=Hj.splice(Vl,(Wl-Vl-1));var Zl=Hj.concat(Xl,Yl);Hj=Zl;if(Hj.length<(Vl +2)){Lj.appendChild(Xl.getNode());}
else{var $l=Hj[Vl+1].getNode();var am=Lj.insertBefore(Xl.getNode(),$l);}
this.calcModuleThreshY();this.adaptHeight(true);return true;}
this.removeModule=function(bm){var cm=this.findModule(bm);if(cm==null){log.error("given module with name "+bm+" cannot be found in this column. Leaving function");return null;}
if(cm.isDeleteable()==false&&bm!="m_idAdder"){log.error("module is not deletable. so no delete!");return null;}
var dm=false;var em=null;try{em=Lj.removeChild(cm.getNode());}
catch(e){log.warn("no child to remove for "+bm);dm=true;}
var i=this.findModuleIndex(bm);var t=Hj.splice(i,1)[0];if(Qj==true&&Hj.length==0){this.hideOnEmpty();}
this.calcModuleThreshY();this.adaptHeight(true);if(bm=="m_idAdder"){if(em!=null){var fm=document.getElementById("tmp");fm.insertBefore(em,null);cm.setNode(em);}
cm.switchLayerToFront(Module.M_SELECT,1);cm.scrollLayerTo(0);var gm=cm.getCurrentLayer();gm.getSelector().deselect();cm.setStatus(Module.M_INACTIVE);}
else{delete mods[bm];}
return cm;}
this.removeAllModules=function(){var i;for(i=0;i<Hj.lenght;i++){var hm=Hj[i].getId();delete mods[hm];}
Hj=new Array();}
this.hideOnEmpty=function(){if(Bj!=-1){bk=Bj+"%";}
else{bk=Cj+"px";}$(vj).setStyle('width','50px');ck=true;if(Mj.getDynamicPageWidth()){Mj.recalcPageWidth();}}
this.showOnEmpty=function(){$(vj).setStyle('width',bk);ck=false;if(Mj.getDynamicPageWidth()){Mj.recalcPageWidth();}}
this.removeModuleIndex=function(im){if(im>Hj.length){log.error("given index is greater than the max. index of the column. Leaving function");return null;}
var jm=Hj.splice(im,1)[0];jm.setParent(null);Lj.removeChild(jm.getNode());if(Qj==true&&Hj.length==0){this.hideOnEmpty();}
this.calcModuleThreshY();this.adaptHeight(true);return jm;}
this.deleteModule=function(km,lm){var mm=this.removeModule(km);if(mm!=null){mm.del(lm);}}
this.getAllModuleNames=function(){var i;var nm=new Array();for(i=0;i<Hj.length;i++){nm.push(Hj[i].getId());}
return nm;}
this.setColDaddy=function(om){Nj=om;}
this.getColDaddy=function(){return Nj;}
this.addColumn=function(pm){if(!pm){log.error("must give a column as parameter");return false;}
if(pm.getType()!="column"){log.error("given object is no column");return false;}
pm.setColDaddy(this);Ij.push(pm);this.adaptHeight(true);}
this.findColumnByName=function(qm){var i;for(i=0;i<Ij.length;i++){if(Ij[i].getId()==qm){return Ij[i];}}
var rm=null;for(i=0;i<Ij.length;i++){rm=Ij[i].findColumnByName(qm);if(rm!=null){return rm;}}
return null;}
this.findColumnByIndex=function(sm){if(sm<Ij.length){return Ij[sm];}}
this.getAllColumns=function(){return Ij;}
this.findDroppableColumns=function(){var i;var tm=new Array();for(i=0;i<Ij.length;i++){if(Ij[i].isDroppable()&&Ij[i].isVisible()){tm.push(Ij[i]);}
var um=Ij[i].findDroppableColumns();if(um){tm=tm.concat(um);}}
if(tm.length>0){return tm;}
else{return null;}}
this.toString=function(vm){var wm="<br>";var xm="<pre>";var ym="</pre>";if(vm=="TEXT"){wm="\n";xm="\n";ym="\n";}
var zm="";zm+=xm;zm+="ID		: "+vj+wm;zm+="RELPOS XY: "+xj+","+zj+wm;zm+="ABSPOS XY: "+yj+","+Aj+wm;zm+="RELHEIGHT: "+Dj+wm;zm+="ABSHEIGHT: "+Ej+wm;zm+="RELWIDTH: "+Bj+wm;zm+="ABSWIDTH: "+Cj+wm;zm+=ym;return zm;}
this.show=function(Am,Bm,Cm,Dm,Em,Fm,Gm){var i;var Hm={};for(i=0;i<Xj.length;i++){if(Xj[i]==vj){continue;}
if(cols[Xj[i]]){cols[Xj[i]].hide(Am,null,Cm);}}
if(Cm){this.requestSetData();}
if(Uj==true){if(Dm==undefined){Dm="";}
Uj=false;this.requestRenderContainer(Dm+"showColumns('"+vj+"','"+Am+"',"+Cm+",null);");return true;}
else{if(Dm!=""){Action.handleActions(Dm);}}
if(Yj!=""){Action.handleActions(Yj);}
if(Em==null||Em==true){if(this.hasColumns()){var i;for(i in Ij){if(typeof Ij[i]=="function"){continue;}
if(Gm==true||Ij[i].isBound()){Ij[i].show(null,null,null,null,Em,true,Gm);}
else{if(Ij[i].isVisible()){Ij[i].show(null,null,null,null,Em,true,Gm);}}}}}
if((Fm==null||Fm==false)&&Nj){if(Nj.isVisible()==false){Nj.show(Am,Bm,null,null,false);}}
if(true||this.isInvisible()){this.setVisibility(Column.C_VISIBLE,Am,Bm);if(Cm==true){this.requestSetData("visibility","true");}}
if(this.hasModules()){var i;for(i=0;i<Hj.length;i++){Hj[i].startAutoUpdate();}}
if(Mj){Mj.adaptHeight(true,false);}}
this.hide=function(Im,Jm,Km,Lm){Action.handleActions(Zj);if(this.hasModules()){this.stopAutoUpdate();}
if(this.hasColumns()){var i;for(i=0;i<Ij.length;i++){if(Lm==true||Lm==null){Ij[i].hide(Im,Jm);}
else{Ij[i].stopAutoUpdate();}}}
this.setVisibility(Column.C_INVISIBLE,Im,Jm);if(Km==true){this.requestSetData("visibility","false");}}
this.startAutoUpdate=function(){var i;for(i=0;i<Hj.length;i++){Hj[i].startAutoUpdate();}}
this.stopAutoUpdate=function(){var i;for(i=0;i<Hj.length;i++){Hj[i].stopAutoUpdate();}}
this.requestRenderContainer=function(Mm,Nm){Wj=Mm;if(this.hasColumns()){var i;this.setClean();Action.handleActions(Mm);}
else{this.hide("fade");try{dwr.engine._execute('dwr','user','renderContainer',vj,Mm,Nm,false,Column.handleRenderContainer);}
catch(e){log.error("there was an error in calling DWR"+e.toString());}}}
this.handleRenderContainer=function(Om){this.removeAllModules();if(Om['template']){this.setTemplate(Om['template']);}
if(Om['script']){this.setScript(Om['script']);}
this.setClean();Action.handleActions(Om["rsuccess"]+Yj);if(Mj){Mj.adaptHeight(true,false);}}
this.setTemplate=function(Pm){if(Lj){Lj.innerHTML=Pm;}}
this.setScript=function(Qm){var Rm=navigator.userAgent;if(Rm.indexOf("Safari")!=-1){var Sm=eval(Qm);}
else{var Tm=vj+"_scr";var Um=document.getElementById(Tm);if(Um!=null){document.getElementsByTagName("head")[0].removeChild(Um);}
var e=document.createElement("script");e.setAttribute("id",Tm);e.text=Qm;e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);}}
this.setDirty=function(){Uj=true;}
this.setClean=function(){Uj=false;}
this.isActive=function(){return Vj;}
this.setActive=function(Vm){Vj=true;if(Vm){this.requestSetData("active","true");}}
this.setInactive=function(Wm){Vj=false;if(Wm){this.requestSetData("active","false");}}
this.requestSetData=function(Xm,Ym){if(Xm){this.setData(Xm,Ym);}
if(userProps=={}){return;}
for(var i in userProps){}
try{var Zm="/dwr";if(globalInstance!=""){Zm="/"+globalInstance+"/dwr";}
dwr.engine._execute('dwr','user','setProps',userProps,Column.handleSetData);}
catch(e){log.error("there was an error in calling DWR"+e.toString());}
userProps={};}
this.setData=function($m,an){if($m){var bn=vj+"."+$m;userProps[bn]=an;}}
this.isBaseCol=function(){return ak;}
this.setBaseCol=function(cn){ak=cn;}
this.startBulk=function(){dwr.engine.beginBatch();}
this.endBulk=function(){dwr.engine.endBatch();}
this.isHiddenOnEmpty=function(){return ck;}
this.init();}
Column.handleSetData=function(dn){}
Column.handleRenderContainer=function(en){if(en['template']==null||en['script']==null){log.error("error returning the container content. Rollback.");return;}
var fn=cols[en['containerName']];if(fn){fn.handleRenderContainer(en);}}
Column.C_COL_THRESHOLD=0.2;Column.C_ROW_THRESHOLD=0.5;Column.C_INVISIBLE="none";Column.C_VISIBLE="block";Column.C_HEIGHTOFFSET=10;function ConfigControl(id,gn,hn,jn,kn,ln){var mn={"UP":1,"DOWN":2,"LEFT":3,"RIGHT":4,"MID":5,"MORE":6};var nn={"UP":"u","DOWN":"d","LEFT":"l","RIGHT":"r","MID":"m","MORE":"mr"};var on=id||"anonymous";var pn=null;var qn=new Array();var rn=new Array();var sn="";var tn="";var un="";var vn=gn||"";var wn=hn||"";var xn=gn||"";var yn=hn||"";var zn=null;var An=(jn==true)?true:false;var Bn=null;var Cn=(kn!=null)?kn:null;var Dn=(ln!=null)?ln:false;this.init=function(){this.setNode();this.setParentNode();this.setPos();}
this.setNode=function(En){if(En){zn=En;}
else{var Fn=document.getElementById(on);if(Fn==null){log.error("could not find the DOM with id "+on);return false;}
zn=Fn;}
return true;}
this.setParentNode=function(Gn){if(Gn!=null){}
if(Gn){Bn=Gn;}
else{var Hn=zn.parentNode;if(Hn==null){log.error("could not find the Parent DOM of id "+on);return false;}
Bn=Hn;}
return true;}
this.moveToInit=function(){if(Bn!=null){if(Bn.hasChildNodes()==true){var In=Bn.firstChild;Bn.replaceChild(zn,In);}
else{Bn.appendChild(zn);}}}
this.setPos=function(gn,hn){if(gn){vn=gn;}
if(hn){wn=hn;}
var Jn=(vn=="")?"":vn+"px";var Kn=(wn=="")?"":wn+"px";if(!globalSetStyle(zn,"left",Jn)){return false;}
if(!globalSetStyle(zn,"top",Kn)){return false;}
return true;}
this.resetPos=function(){return this.setPos(xn,yn);}
this.setVisibility=function(Ln){var Mn="";switch(Ln){case true:Mn="visible";break;case false:Mn="hidden";break;default:log.error("invalid visiblity value "+Ln);return false;}
if(!globalSetStyle(zn,"visibility",Mn)){log.error("style setting for visiblity failed for configControl "+on);return false;}
return true;}
this.setVisible=function(){return this.setVisibility(configControl.C_VISIBLE);}
this.setInvisible=function(){return this.setVisibility(configControl.C_INVISIBLE);}
this.addControlLayer=function(Nn,On,Pn){if(Nn==""){log.error("invalid layer name");return false;}
var Qn=document.getElementById(Nn);if(!Qn){log.error("config layer with id "+Nn+" not found. Cannot add");return false;}
rn[Nn]=Qn;if(On==true){tn=Nn;}
if(Pn==true){un=Nn;}
if(sn!=Nn){if(pn==null){this.switchControlLayerTo(un);}
else{this.switchControlLayerTo(tn);}}
return true;}
this.switchControlLayerTo=function(Rn){if(Rn==""){return false;}
if(Rn==sn){return true;}
var Sn=rn[sn];var Tn=rn[Rn];if(!Tn){log.error("control layer "+Rn+" was not found. Cannot switch");return false;}
if(Sn){globalSetStyle(Sn,"display","none");}
sn=Rn;if(Tn){globalSetStyle(Tn,"display","block");}
this.checkControl();return true;}
this.clickControlByName=function(Un){var Vn=false;if(pn==null){Vn=this.clickControlByNameGlobally(Un);}
else{Vn=this.clickControlByNameHooked(Un);}
return Vn;}
this.clickControlByNameGlobally=function(Wn){switch(Wn){case "UP":break;case "DOWN":break;case "LEFT":break;case "RIGHT":break;case "MID":if(currentPage!=null){currentPage.addNewModule();}
break;case "MORE":break;default:log.error("invalid control name "+Wn);return false;}
return true;}
this.clickControlByNameHooked=function(Xn){switch(Xn){case "UP":var Yn=pn.getStatus();var Zn=pn.prevLayer(Yn);var $n=pn.getId();if(Zn==-1){if(Yn==Module.M_CONFIG){var ao=pn.getSelectPath();var bo=null;if(ao!=""){var co=ao.split("/");bo=co.length;}
var eo="gotoStatus(Module.M_SELECT,"+(bo)+",'"+pn.getId()+"');";mods["m_idAdder"].setSelectPath(ao,true,true,eo);}}
else{var fo=pn.getCurrentLayer();var go=fo.getSelector();var ho=go.getPos();var io=pn.getBreadCrumb();if(io!=null){io.setLen(Zn-1);var fo=pn.getLayerByIndex(Yn,Zn);var jo=fo.getMaxPages();var ko=fo.getScrollLayer().getCurrentPage()+1;var lo=ko+" von "+jo;io.setExtraCrumb(lo);pn.renderCrumb();}}
break;case "DOWN":var Yn=pn.getStatus();var mo=pn.nextLayer(Yn);if(Yn==Module.M_SELECT&&mo==-1){pn.setStatusToConfig();}
var io=pn.getBreadCrumb();if(io!=null){io.setLen(mo-1);var fo=pn.getLayerByIndex(Yn,mo);var jo=fo.getMaxPages();var ko=fo.getScrollLayer().getCurrentPage()+1;var lo=ko+" von "+jo;io.setExtraCrumb(lo);pn.renderCrumb();}
break;case "LEFT":pn.scrollLayer(-1,null,null,1);var io=pn.getBreadCrumb();if(io){var fo=pn.getCurrentLayer();var jo=fo.getMaxPages();var no=fo.getScrollLayer().getCurrentPage();io.setExtraCrumb((no+1)+" von "+jo);}
if(kn!=null){if(kn.isActive()){var fo=pn.getCurrentLayer();if(fo){var oo=fo.getScrollLayer().getCurrentStep();kn.markListEntry(oo);}}}
this.checkControl(new Array(Xn,"RIGHT","MID"));break;case "RIGHT":pn.scrollLayer(1,null,null,1);var io=pn.getBreadCrumb();if(io){var fo=pn.getCurrentLayer();var jo=fo.getMaxPages();var no=fo.getScrollLayer().getCurrentPage();io.setExtraCrumb((no+1)+" von "+jo);}
if(kn!=null){if(kn.isActive()){var fo=pn.getCurrentLayer();if(fo){var oo=fo.getScrollLayer().getCurrentStep();kn.markListEntry(oo);}}}
this.checkControl(new Array(Xn,"LEFT","MID"));break;case "MID":var Yn=pn.getStatus();var po=pn.getCurrentLayerIndex(Yn);var fo=pn.getLayerByIndex(Yn,po);var mo=fo.getSuccessor();if(mo){var qo=pn.getLayerByIndex(Yn,mo);if(qo){var ro=qo.getSuccessor();if(ro){var so=pn.getLayerByIndex(Yn,ro);if(so){so.setTemplateDirty();}}}}
if(tmpMod.doAction()==true){}
break;case "MORE":if(Cn!=null){Cn.activate();}
this.deactivateControl("MORE");break;default:log.error("invalid control name "+Xn);return false;}
return true;}
this.clickUp=function(){return this.clickControlByName("UP");}
this.clickDown=function(){return this.clickControlByName("DOWN");}
this.clickLeft=function(){return this.clickControlByName("LEFT");}
this.clickRight=function(){return this.clickControlByName("RIGHT");}
this.clickMid=function(){return this.clickControlByName("MID");}
this.clickMore=function(){return this.clickControlByName("MORE");}
this.hide=function(){setElementStyle(zn,"display","none");_visibility=false;}
this.show=function(){setElementStyle(zn,"display","block");_visibility=true;}
this.activate=function(){if(pn!=null){pn.showWebPad();}}
this.deactivate=function(){if(pn!=null){pn.hideWebPad();}}
this.hideControl=function(uo){var vo=this.getDOMControlName(uo);var wo=document.getElementById(vo);if(wo){setElementStyle(wo,"visibility","hidden");}}
this.showControl=function(xo){var yo=this.getDOMControlName(xo);var zo=document.getElementById(yo);if(zo){globalSetStyle(zo,"visibility","visible");}}
this.activateControl=function(Ao){var Bo=this.getDOMControlName(Ao);var Co=this.getActiveLayerNode();if(Ao=="MID"){}
var Do=getLikeElements(Co,"div","id",Bo+"_a");var Eo=getLikeElements(Co,"div","id",Bo+"_i");if(Do[0]&&Eo[0]){setElementStyle(Do[0],"display","block");setElementStyle(Eo[0],"display","none");}}
this.deactivateControl=function(Fo){var Go=this.getDOMControlName(Fo);var Ho=this.getActiveLayerNode();var Io=getLikeElements(Ho,"div","id",Go+"_a");var Jo=getLikeElements(Ho,"div","id",Go+"_i");if(Io[0]&&Jo[0]){setElementStyle(Io[0],"display","none");setElementStyle(Jo[0],"display","block");}}
this.getDOMControlName=function(Ko){return sn+"_"+nn[Ko];}
this.getActiveLayerNode=function(){var Lo=document.getElementById(sn);if(!Lo){log.error("Could not find the node for the active layer "+sn);return null;}
return Lo;}
this.hookModule=function(Mo,No){if(pn!=null){if(pn.getId()==Mo.getId()){return true;}
this.releaseModule();}
if(Mo.getType()!="module"){log.error("obj "+Mo+" is not of type module");return false;}
pn=Mo;currentModule=Mo;if(mods["m_idLogin"]){mods["m_idLogin"].hideSpecial("addModule");}
var Oo=Mo.getWebPadNodeFrame();var Po=Mo.getWebPadNode();setZIndex(Po,100);setZIndex(Oo,100);setZIndex(zn,100);if(Oo!=null){if(Oo.hasChildNodes()==true){var Qo=Oo.firstChild;Oo.replaceChild(zn,Qo);}
else{Oo.appendChild(zn);}}
this.configure();var Ro=No;if(No!=null){Ro=No;}
else{Ro=tn;}
this.switchControlLayerTo(Ro);Mo.showWebPad();return true;}
this.releaseModule=function(So){var To=pn;pn=null;if(To!=null){To.hideWebPad();}
if(mods["m_idLogin"]){mods["m_idLogin"].showSpecial("addModule");}
if(Bn!=null){Bn.appendChild(zn);}
else{log.error("no parent node to add the webpad to");}
var Uo=So;if(So!=null){Uo=So;}
else{Uo=un;}
this.switchControlLayerTo(Uo);this.checkControl();return To;}
this.checkControl=function(Vo){var Wo=pn;var Xo=null;var Yo=null;var Zo=null;var $o=null;var ap=1;if(Wo!=null){Xo=Wo.getStatus();Yo=Wo.getCurrentLayerIndex(Xo);Zo=Wo.getNumberOfLayers(Xo);$o=Wo.getLayerByIndex(Xo,Yo);ap=Wo.getSelectBase();}
if($o==null){}
else{}
var i;var bp=Vo;if(bp==null){bp=["UP","DOWN","LEFT","RIGHT","MID","MORE"];}
for(i=0;i<bp.length;i++){switch(bp[i]){case "UP":var cp=true;if(Wo==null){cp=false;}
else if(typeof Yo=="undefined"){cp=false;}
else if(Yo==null){cp=false;}
else{switch(Xo){case Module.M_ACTIVE:case Module.M_INACTIVE:cp=false;break;case Module.M_CONFIG:cp=true;break;case Module.M_SELECT:if(Yo<=ap){cp=false;break;}
if(Yo<=1){cp=false;}
break;default:cp=false;break;}}
if(cp==false){this.deactivateControl("UP");}
else{this.activateControl("UP");}
break;case "DOWN":var cp=true;if(Wo==null){cp=false;}
else if(typeof Yo=="undefined"){cp=false;}
else if(Yo==null){cp=false;}
else{switch(Xo){case Module.M_ACTIVE:case Module.M_INACTIVE:cp=false;break;case Module.M_CONFIG:if(Yo==(Zo-1)){cp=false;}
break;case Module.M_SELECT:if(Yo==(Zo-1)){cp=false;break;}
var $o=Wo.getLayerByIndex(Xo,Yo);var dp=$o.getSuccessor();if(dp==null){cp=false;break;}
var ep=Wo.getLayerByIndex(Xo,dp);if(!ep||ep.getTemplateDirty()==true){cp=false;break;}
if(ep==null){ep=Wo.getLayerByIndex(Module.M_CONFIG,0);if(ep==null){cp=false;break;}}
break;default:cp=false;break;}}
if(cp==false){this.deactivateControl("DOWN");}
else{this.activateControl("DOWN");}
break;case "LEFT":var cp=true;if(Wo==null){cp=false;}
else if($o==null){cp=false;}
else{switch(Xo){case Module.M_INACTIVE:case Module.M_ACTIVE:cp=false;break;case Module.M_SELECT:case Module.M_CONFIG:var fp=$o.getSelector();var gp=fp.getSelectableNodes();if($o.getSelector().getSelectableNodes().length==0){cp=false;break;}
if($o.getSelectorPos()==0&&Dn==false){cp=false;break;}
else{if($o.isScrollLayer()==false){cp=false;break;}}
break;default:cp=false;break;}}
if(cp==false){this.deactivateControl("LEFT");}
else{this.activateControl("LEFT");}
break;case "RIGHT":var cp=true;if(Wo==null){cp=false;}
else if($o==null){cp=false;}
else{switch(Xo){case Module.M_INACTIVE:case Module.M_ACTIVE:cp=false;break;case Module.M_SELECT:case Module.M_CONFIG:var hp=$o.getSelectorPos();var ip=$o.getSelector().getSelectableNodes().length;if(ip==0){cp=false;break;}
if((ip-1)<=hp&&Dn==false){cp=false;break;}
else{if($o.isScrollLayer()==false){cp=false;break;}}
break;default:cp=false;break;}}
if(cp==false){this.deactivateControl("RIGHT");}
else{this.activateControl("RIGHT");}
break;case "MID":var cp=true;if(Wo!=null){switch(Xo){case Module.M_INACTIVE:case Module.M_ACTIVE:cp=false;break;case Module.M_SELECT:case Module.M_CONFIG:cp=true;break;default:cp=true;break;}}
if(cp==false){this.deactivateControl("MID");}
else{this.activateControl("MID");}
break;case "MORE":if(pn==null||Xo!=Module.M_SELECT){this.hideControl("MORE");break;}
if(Cn!=null){if(Cn.isActive()==true){this.deactivateControl("MORE");}
else{this.activateControl("MORE");}}
else{this.deactivateControl("MORE");}
break;default:log.error("invalid control name "+bp[i]);return false;}}
return true;}
this.configure=function(){tmpMod=pn;if(!tmpMod){log.error("control has no module context");return false;}
this.checkControl(["UP","DOWN","LEFT","RIGHT","MID"]);}
this.isHooked=function(){if(pn!=null){return true;}
return false;}
this.getHookedModuleId=function(){if(this.isHooked()==true){return pn.getId();}
return "";}
this.getHookedModule=function(){if(this.isHooked()==true){return pn;}
return null;}
this.activateSearchPad=function(){if(pn!=null){Cn.search();Cn.show();pn.showSearchPad();Cn.activate();this.checkControl(["MORE"]);}}
this.deactivateSearchPad=function(){if(pn!=null){pn.hideSearchPad();this.checkControl(["MORE"]);}}
this.setLoop=function(ln){if(ln!=null){Dn=ln;}}
this.getLoop=function(){return Dn;}
this.init();}
function ConfigSelector(id,jp,kp,lp,mp,np,op){var pp=id||"noname";var qp=kp||"";var rp=jp||null;var sp=null;var tp=(lp!=null)?lp:false;var up=new Array();var vp=-1;var wp=null;var xp=-1;var yp=null;var zp=true;var Ap=(np!=null)?np:false;var Bp=(op!=null)?op:false;this.init=function(){if(!this.setParentNode()){log.error("Could not set parent node for selector "+pp);return false;}
if(!this.setSelectableNodes()){log.error("Could not set selectable nodes for selector "+pp);return false;}}
this.render=function(){if(_DOMNode){if(_width>-1){_DOMNode.style.width=_width+"px";}
if(_height>-1){_DOMNode.style.height=_height+"px";}
this.setVisibility();}}
this.setNode=function(Cp){if(!Cp){var Dp=document.getElementById(pp);if(!Dp){log.error("Could not find a DOM node for "+pp);return false;}
_DOMNode=Dp;}
else{_DOMNode=Cp;}
return true;}
this.getNode=function(){return _DOMNode;}
this.setParent=function(Ep){var Fp=Ep;if(Ep){rp=Ep;}
return true;}
this.getParent=function(Gp){return rp;}
this.setParentNode=function(Hp){var Ip=Hp;if(!Ip){Ip=rp.getNode();if(!Ip){log.error("could not find DOM node for parent for "+pp);return false;}
sp=Ip;}
return true;}
this.getParentNode=function(){return sp;}
this.setSelectableNodes=function(){if(!sp){log.error("could not find a corresponding DOM Node for element search");return false;}
up=getLikeElements(sp,"div","class","selectable",1);var i;if(!up){return false;}
return true;}
this.getSelectableNodes=function(){return up;}
this.setPos=function(Jp){if(Jp>=up.length||Jp<0){return false;}
var Kp=up[Jp];if(wp!=null){this.setDepreselectStyle();}
vp=Jp;wp=Kp;this.setPreselectStyle();return true;}
this.nextPos=function(){if((vp+1)>=up.length){return this.firstPos();}
return this.setPos(vp+1);}
this.prevPos=function(){if((vp-1)<0){return this.lastPos();}
return this.setPos(vp-1);}
this.firstPos=function(){return this.setPos(0);}
this.lastPos=function(){return this.setPos(up.length-1);}
this.selectObj=function(Lp){if(Lp!=null){if(vp!=Lp){if(this.setPos(Lp)==false){return false;}}}
if(vp!=null){}
if(wp!=null){}
if(yp!=null){this.setDeselectStyle();}
xp=vp;yp=wp;zp=true;if(yp!=null){this.setSelectStyle();}
return true;}
this.deselectObj=function(){if(yp!=null){this.setDeselectStyle();xp=-1;yp=null;return true;}
return true;}
this.deselect=function(){this.deselectObj();}
this.setPosToObjId=function(Mp){}
this.setSelectStyle=function(){}
this.setDeselectStyle=function(){if(wp==yp){this.setPreselectStyle();}
else{}}
this.setPreselectStyle=function(){}
this.setDepreselectStyle=function(){if(wp==yp){this.setSelectStyle();}
else{}}
this.getPos=function(){return vp;}
this.getPreSelectedObj=function(){return wp;}
this.getSelectedObj=function(){return yp;}
this.isSelectionDirty=function(){return zp;}
this.cleanDirtySelection=function(){zp=false;return true;}
this.isSelected=function(){if(yp!=null){return true;}
return false;}
this.isNewlyPreSelected=function(){if(yp==null){return true;}
if(vp!=xp){return true;}
return false;}
this.getSelectedValue=function(){if(!yp){return null;}
var Np=yp.getAttribute("name");var Op=yp.getAttribute("val");var Pp=yp.getAttribute("inputtype");var Qp=yp.getAttribute("pattern");if(!Np){return null;}
if(!Op){Op="";}
var Rp=new Array();Rp["name"]=Np;Rp["value"]=Op;Rp["type"]=Pp;Rp["pattern"]=Qp;return Rp;}
this.getSelectedKey=function(){}
this.getActionValues=function(){var Sp=new Array();if(!yp){return null;}
Sp=getActionAttributes(yp);return Sp;}
this.getPreSelectedValue=function(){if(!wp){return null;}
var Tp=wp.getAttribute("name");var Up=wp.getAttribute("val");var Vp=wp.getAttribute("inputtype");var Wp=wp.getAttribute("pattern");if(!Tp){return null;}
if(!Up){Up="";}
var Xp=new Array();Xp["name"]=Tp;Xp["value"]=Up;Xp["type"]=Vp;Xp["pattern"]=Wp;return Xp;}
this.setVisibility=function(Yp){var Zp=Yp;if(!Zp){Zp=tp;}
if(Zp!="visible"&&Zp!="hidden"){Zp="hidden";}
return true;}
this.setInvisible=function(){return this.setVisibility(false);}
this.setVisible=function(){this.setVisibility(true);}
this.reset=function(){this.deselectObj();vp=-1;wp=null;zp=true;this.setParentNode();this.setSelectableNodes();}
this.getId=function(){return pp;}
this.toString=function($p){var aq="<br>";var bq="<pre>";var cq="</pre>";if($p=="TEXT"){aq="\n";bq="\n";cq="\n";}
var dq="";var i;dq+=bq;dq+="ID       : "+pp+aq;dq+="PARENT   : "+this.getParent().getId()+aq;dq+="DOMPARENT: "+this.getParent().getNode().getAttribute("id")+aq;dq+="POS      : "+vp+aq;dq+=cq;return dq;}
this.init();}
function ErrorControl(id,eq){var fq;var gq="errorcontrol";var hq=new Array();var iq=new Array();var jq=null;var kq=new Array();var lq=new Array();var mq=null;this.setParent=function(nq){if(nq!=null){mq=nq;}}
this.getParent=function(){return mq;}
this.setId=function(id){if(id!=null){fq=id;}
else{if(mq!=null){fq=mq.getId()+"_err";}}}
this.getId=function(){return fq;}
this.findErrorBoxes=function(oq){if(oq==null){log.error("no layer node given for findErrorBoxes");return false;}
this.purgeErrorData();var pq=getLikeElements(oq,"div","id","_err_");var i;for(i=0;i<pq.length;i++){var qq=pq[i].getAttribute("regexp");var rq=pq[i].getAttribute("fields");var sq=pq[i].getAttribute("showaction");var tq=pq[i].getAttribute("hideaction");var uq=pq[i].getAttribute("label");var vq=pq[i].getAttribute("id");this.addErrorEntry(vq,qq,uq,rq,sq,tq);}}
this.addErrorEntry=function(id,wq,xq,yq,zq,Aq,Bq){var Cq={"id":id,"regexp":wq,"label":xq,"fields":yq,"showaction":zq,"hideaction":Aq,"error":Bq};hq[xq]=Cq;iq.push(id);}
this.findErrorEntry=function(Dq){var i;for(i in hq){if(typeof hq[i]=="function"){continue;}
if(hq[i]["label"]==Dq){return hq[i];}}
return null;}
this.addErrorMessage=function(Eq){if(Eq!=null){lq.push(Eq);}}
this.purgeErrorData=function(){hq=new Array();iq=new Array();}
this.purgeFieldData=function(){kq=new Array();}
this.purgeMessageData=function(){lq=new Array();}
this.showErrorBoxes=function(Fq){this.setErrorBoxes(Fq,true);}
this.hideErrorBoxes=function(Gq){this.setErrorBoxes(Gq,false);}
this.setErrorBoxes=function(Hq,Iq){var Jq=new Array();if(Hq==null){Jq=iq;}
else{if(typeof Hq=="string"){if(Hq!=null){var i;Jq=Hq.split(",");}}
else{if(Hq){Jq=Hq;}}}
for(i=0;i<Jq.length;i++){var Kq=document.getElementById(Jq[i]);if(Kq==null){continue;}
if(Iq==true){setElementStyle(Kq,"display","block");}
else{if(Jq[i].indexOf("_priv")!=-1&&userLoggedIn==false){continue;}
setElementStyle(Kq,"display","none");}}}
this.markInputFields=function(Lq){this.setInputFields(Lq,true);}
this.unmarkInputFields=function(Mq){this.setInputFields(Mq,false);}
this.setInputFields=function(Nq,Oq){var Pq=null;var i;if(Nq!=null){Pq=Nq.split(",");}
else{Pq=kq;}
for(i=0;i<Pq.length;i++){var Qq=document.getElementById(Pq[i]);if(Qq==null){continue;}
if(Oq==true){setElementStyle(Qq,"border","1px solid red");}
else{setElementStyle(Qq,"border","1px solid rgb(29,213,0)");}}}
this.checkInputErrors=function(Rq){var i;var Sq=true;this.purgeFieldData();this.findErrorBoxes(mq.getNode());for(i=0;i<Rq.length;i++){kq.push(Rq[i]["inputfield"]+"_ipt");var Tq=Rq[i]["value"];var Uq=Rq[i]["type"];if(Uq==null){Uq="integer";}
var Vq=false;if(Rq[i]["mandatory"]=="1"&&Tq==""){Rq[i]["error"]=1;Sq=false;}
else{if(Tq==""){continue;}
switch(Uq){case "integer":var Wq=parseInt(Tq);if(Wq==Tq){Vq=true;}
break;case "text":var Xq=new RegExp("[[a-z]|[A-Z]|[0-9]]*");if(Xq.exec(Tq)){Vq=true;}
break;case "string":Vq=true;break;case "float":var Wq=parseFloat(Tq);if(Wq==Tq){Vq=true;}
break;case "pattern":Vq=true;break;case "email":var Yq=new RegExp("[_|a-z|\.|-|0-9]*\@[_|a-z|\.|-]*\.[_|a-z|-]*");var Vq=Yq.exec(Tq);if(Vq==null){Rq[i]["error"]=1;Vq=false;}
break;default:break;}}
if(Sq==true&&Vq==false){Sq=false;}
if(Vq==false){Rq[i]["error"]=1;Sq=false;}
else{if(Rq[i]["pattern"]!=null){var Xq=new RegExp(Rq[i]["pattern"]);Vq=Xq.exec(Tq);}
if(Vq==null){Rq[i]["error"]=1;Sq=false;}}}
jq=Rq;return Sq;}
this.checkResponseErrors=function(){var i;for(i in hq){if(typeof hq[i]=="function"){continue;}
if(hq[i]["regexp"]==""||hq[i]["regexp"]==null){continue;}
var Zq=new RegExp(hq[i]["regexp"],"g");var j;var $q=false;for(j=0;j<lq.length;j++){if(Zq.exec(lq[j])!=null){$q=true;break;}}
if($q==true){hq[i]["error"]=1;}
else{hq[i]["error"]=0;}}
return true;}
this.showErrors=function(){this.renderErrors(true);}
this.hideErrors=function(){this.renderErrors(false);}
this.renderErrors=function(ar){var i;this.hideErrorBoxes();this.unmarkInputFields();if(jq!=null){for(i=0;i<jq.length;i++){if(jq[i]["error"]==1&&ar==true){var j;var br=jq[i]["errorbox"].split(",");var cr=new Array();for(j=0;j<br.length;j++){var dr=this.findErrorEntry(br[j]);if(dr!=null){cr.push(dr["id"]);}}
this.showErrorBoxes(cr);this.markInputFields(jq[i]["inputfield"]+"_ipt");}}}
for(i in hq){if(typeof hq[i]=="function"){continue;}
if(hq[i]["error"]==1&&ar==true){this.showErrorBoxes(hq[i]["id"]);this.markInputFields(hq[i]["inputfield"]+"_ipt");}}}
this.getErrorActions=function(){var er=new Array();if(hq!=null){var i;for(i=0;i<hq.length;i++){if(!hq[i]){continue;}
if(hq[i]["error"]==1){if(hq[i]["showaction"]!=""){er.push(hq[i]["showaction"]);}}}}
return er;}
this.init=function(){if(eq!=null){this.setParent(eq);}
this.setId(id);}
this.reset=function(){var i;for(i=0;i<hq.length;i++){var fr=hq[i];if(fr){var gr=fr["inputfieldids"];var hr=fr["errorboxid"];this.unmarkInputFields(gr);this.hideErrorBoxes(hr);}}
this.purgeErrorData();}
this.setErrorFlag=function(ir){var i;for(i in hq){if(typeof hq[i]=="function"){continue;}
if(i==ir){hq[i]["error"]=1;break;}}}
this.clearErrorFlag=function(jr){var i;for(i in hq){if(typeof hq[i]=="function"){continue;}
if(i==jr||jr==null){hq[i]["error"]=0;}}}
this.clearErrorFlags=function(){this.clearErrorFlag();}
this.init();}
function DisplayLayer(id,kr,lr,mr,nr,or,pr,qr,rr,sr,tr,ur,vr,wr,xr,yr,zr,Ar,Br,Cr,Dr,Er,Fr,Gr,Hr,Ir,Jr,Kr){var Lr="noname";var Mr=null;var Nr=-1;var Or=null;var Pr=null;var Qr=-1;var Rr=false;var Sr=1;var Tr=1;var Ur=nr;var Vr=null;var Wr=false;var Xr=false;var Yr=null;var Zr=0;var $r=0;var as=true;var bs=true;var cs=-1;var ds=-1;var es=-1;var fs=new Array();var gs=new Array();var hs=null;var is=null;var js=false;var ks=false;var ls=false;var ms=new Array();ms["getData"]="";ms["getTemplate"]="";ms["getAll"]="";ms["setData"]="";var ns=new Array(DisplayLayer.HEIGHT_REDUCED,DisplayLayer.HEIGHT_NORMAL);var os=1;var ps=new Array();var qs=1;var rs="";var ss="";var ts="dynamic";var us=200;var vs=10;var ws=21;var xs=null;var ys="";var zs=false;var As=false;var Bs=0;var Cs="getData";var Ds="";var Es="";var Fs=false;this.init=function(){if(id!=null){Lr=id;}
if(kr!=null){Nr=kr;}
if(lr!=null){Qr=lr;}
if(!this.setParas(mr,nr,or,pr,qr,rr,sr,tr,ur,vr,wr,xr,yr,zr,Ar,Br,Cr,Dr,Er,Fr,Gr,Hr,Ir,Jr,Kr)){log.error("set of parameters failed");return false;}
this.prepareScrollPanel();if(!this.setDataArea()){log.error("Could not set Data Area for displayLayer "+Lr);return false;}
this.prepareConfigSelector();this.setVerticalPosition(true);return true;}
this.prepareScrollPanel=function(){if(Rr){var Gs=Lr+"_scr";var Hs=new ScrollLayer(Gs,Sr,Tr,Ur,false,false,"grey","blue",false);if(!Hs){log.error("Could not create new scrollLayer for displayLayer "+Lr);return false;}
Vr=Hs;setElementStyle(Or,"width",Sr*100+"%");}}
this.setParas=function(mr,nr,or,Is,qr,rr,sr,tr,ur,vr,wr,xr,yr,zr,Ar,Br,Cr,Dr,Er,Fr,Gr,Hr,Ir,Jr,Kr){if(this.setNode()==false){log.error("could not set node for layer "+Lr);return false;}
if(mr!=null){this.setMaxPages(mr);}
if(nr!=null){this.setStepsPerPage(nr);}
if(or!=null){this.setStepInterval(or);}
if(Is!=null){Xr=Is;}
this.prepareConfigSelector();if(qr!=null){this.setLeftSelectorOffset(qr);}
if(rr!=null){this.setRightSelectorOffset(rr);}
if(sr!=null){this.setPredecessor(sr);}
if(tr!=null){this.setSuccessor(tr);}
if(ur!=null){this.setErrSuccessor(ur);}
if(vr!=null){this.setTimedQueue(vr);}
if(wr!=null){this.setImmediateQueue(wr);}
if(xr!=null){this.setAutoUpdate(xr);}
if(yr!=null){this.setAllowedHeights(yr);}
if(zr!=null){this.setCurrentHeightIndex(zr);}
if(Ar!=null){this.setTagLine(Ar);}
if(Br!=null){this.setTagLine(null,Br);}
if(Cr!=null){this.setTagLineType(Cr);}
if(Dr!=null&&typeof Dr=="boolean"){if(Dr==true){this.setTemplateClean();}
else{this.setTemplateDirty();}}
if(Er!=null&&typeof Er=="boolean"){if(Er==true){this.setDataClean();}
else{this.setDataDirty();}}
if(Fr==null||Fr==true){this.setErrorControl();}
if(Gr!=null){this.setFavIcon(Gr);}
if(Hr!=null){this.setIsPrivate(Hr);}
if(Ir!=null){this.setTimer(Ir);}
if(Jr!=null){this.setAutoupdateType(Jr);}
if(Kr!=null){this.setDataChangeEffect(Kr);}
return true;}
this.setDataChangeEffect=function(Kr){Es=Kr;}
this.getDataChangeEffect=function(){return Es;}
this.setAutoupdateType=function(Jr){Cs=Jr;}
this.getAutoupdateType=function(){return Cs;}
this.setTimer=function(Ir){Bs=Ir;}
this.getTimer=function(){return Bs;}
this.setIsPrivate=function(Hr){As=Hr;}
this.getIsPrivate=function(){return As;}
this.setFavIcon=function(Gr){ys=Gr;}
this.setErrorControl=function(){if(xs==null){xs=new ErrorControl(null,this);}
else{xs.reset();}}
this.getErrorControl=function(){return xs;}
this.prepareConfigSelector=function(){if(Xr==true&&Yr==null){Yr=new ConfigSelector(Lr+"_sel",this,null,null,"hidden",0);if(!Yr){log.error("Could not create config selector for display layer "+Lr);return false;}}
if(Yr!=null){Yr.init();Yr.setVisible();}}
this.setMaxPages=function(Js){if(Js!=null){Sr=Js;if(Js>1){Rr=true;}
if(Vr!=null){Vr.setMaxPages(Js);}}
setElementStyle(Or,"width",Sr*100+"%");}
this.getMaxPages=function(){return Sr;}
this.setStepsPerPage=function(Ks){if(Ks!=null){Tr=Ks;if(Vr!=null){Vr.setStepsPerPages(Ks);}}}
this.setStepInterval=function(Ls){if(Ls!=null){Ur=Ls;if(Vr!=null){Vr.setStepInterval(Ls);}}}
this.setLeftSelectorOffset=function(qr){Zr=qr;}
this.setRightSelectorOffset=function(rr){$r=rr;}
this.setTimedQueue=function(vr){hs=vr;}
this.setImmediateQueue=function(wr){is=wr;}
this.setAutoUpdate=function(xr){js=xr;}
this.setId=function(Ms){if(Ms!=null){Lr=Ms;}
else{Ms=Lr;}
if(!this.setNode()){log.error("Could not set DOM Node for displayLayer "+Lr);return false;}
this.prepareScrollPanel();if(!this.setDataArea()){log.error("Could not set Data Area for displayLayer "+Lr);return false;}
this.prepareConfigSelector();this.setVerticalPosition(true);}
this.getActionValues=function(){var Ns=new Array();if(!Or){return null;}
Ns=getActionAttributes(Or);return Ns;}
this.requestGetData=function(Os,Ps,Qs,Rs,Ss){var Ts=Mr.getId();var Us=Ts;if(this.checkPriv()==false){this.setPrivBox(true);}
else{this.setPrivBox(false);}
switch(Qs){case Request.RT_GETDAT:break;case Request.RT_GETTPL:break;case Request.RT_GETALL:break;default:if(Qs==""){if(Ps!=null){var Vs=new Request(Ts,null,Request.RT_SETDAT,Nr,Qr,Ps,0,2,2,Us,Rs,Ss,null,tmpClearCache);return is.addRequest(Vs);}
return true;}
log.error("invalid request type in requestGetData in layer "+Lr);return false;}
if(Nr==Module.M_SELECT&&Ts!="m_idAdder"){Ts="m_idAdder";}
var Ws=-1;if(Os==true){Ws=Bs;}
var i;for(i in Ps){if(typeof Ps[i]=="function"){continue;}}
var Xs=findParaInData(Ps,"clearcache");var Vs=new Request(Ts,null,Qs,Nr,Qr,Ps,Ws,2,2,Us,Rs,Ss,null,Xs);var Ys=false;if(Os==true){if(hs==null){log.error("no timed queue defined");return false;}
Ys=hs.addRequest(Vs);ms[Qs]=Vs.getId();}
else{if(is==null){log.error("no immediate queue defined");return false;}
Ys=is.addRequest(Vs);ms[Qs]=Vs.getId();}
zs=true;return Ys;}
this.checkPriv=function(){var Zs=false;if(As==false){Zs=true;}
else{if(userLoggedIn!=null&&userLoggedIn==false){Zs=false;}
else{Zs=true;}}
return Zs;}
this.setPrivBox=function($s){var at=this.getErrorControl();if(at!=null){at.setErrorBoxes(Mr.getId()+"_bdy_s"+Mr.getStatusName(Nr)+"_l"+Qr+"_err_priv",$s);var bt=at.findErrorEntry("priv");if(bt){if($s==true){Action.handleActions(bt["showaction"]);}
else{Action.handleActions(bt["hideaction"]);}}}}
this.hideErrorBoxes=function(){var ct=this.getErrorControl();if(ct!=null){ct.hideErrorBoxes();}}
this.notifyResponseError=function(dt){}
this.requestSetData=function(et,ft,gt){if(doRender==true){return;}
if(Mr==null){return false;}
var ht=Mr.getId();var it=ht;var jt=gt;if(jt==null){jt=this.getInputDataMap();}
if(is==null){log.error("no immediate queue defined");return false;}
if(Nr==Module.M_SELECT&&ht!="m_idAdder"){ht="m_idAdder";}
var kt=findParaInData(gt,"clearcache");var lt=new Request(ht,null,Request.RT_SETDAT,Nr,Qr,jt,0,2,2,it,et,ft,null,kt);return is.addRequest(lt);}
this.handleResponse=function(nt){if(nt.getStatus()=="1"&&nt.getChanged()=="0"){return true;}
var ot=nt.getRequestType();switch(ot){case "getTemplate":var pt=nt.getPara("tpl");if(pt!=null){this.hide();this.setTemplate(pt);var qt=nt.getPara("script");this.prepareConfigSelector();var rt="mods['"+Mr.getId()+"'].getCurrentLayer().show();";this.setScript(qt+";"+rt);this.getErrorControl().findErrorBoxes(this.getNode());this.handlePostActions(nt);}
else{log.error("received template for layer "+Lr+" is empty");}
break;case "getData":if(this.getDataChangeEffect()!=""){this.doEffect(this.getDataChangeEffect(),nt);}
else{this.hideErrors();this.setDataInTemplate(nt);this.handlePostActions(nt);}
zs=false;break;case "getAll":var pt=nt.getPara("tpl");var st=nt.getPara("data");if(pt!=null){var qt=nt.getPara("script");var rt="mods['"+Mr.getId()+"'].getCurrentLayer().show();";this.doEffect("fade",nt,pt,qt+rt);}
else{log.error("received template for layer "+Lr+" is empty");}
zs=false;break;case "setData":if(nt.getStatus()=="1"){this.setDataClean();}
break;default:log.error("invalid request type in response");break;}
ms[ot]="";var tt=nt.getPara("footer");Mr.setFooter(tt);}
this.handlePostActions=function(ut){if(ut==null){return;}
if(ut.getStatus()==1){this.handleSuccess(ut.getPara("successaction"));}
else{this.handleError(ut.getStatus(),ut.getPara("erroraction"),ut.getStatusMessage());}}
this.handleError=function(vt,wt,xt){log.error("received response with error "+vt+" ("+xt+")");var yt=this.getErrorControl();if(yt!=null){yt.purgeMessageData();yt.addErrorMessage(xt);}
if(wt!=null&&wt!=""&&wt!="undefined"){Action.handleActions("scopeModule(\""+Mr.getId()+"\"); "+wt);}
else{Action.handleActions("scopeModule(\""+Mr.getId()+"\"); checkResponseErrors(); showErrors();");}
if(js==true&&ls==true){var zt="showErrors();";this.requestGetData(true,null,Cs,null,zt)}}
this.handleSuccess=function(At){if(At!=""&&At!=null){Action.handleActions(At);}
if(js==true&&ls==true){var Bt="showErrors();";this.requestGetData(true,null,Cs,null,Bt)}}
this.autoUpdateStart=function(Ct,Dt,Et,Ft){if(js==false){ls=false;}
else{if(ls==false){if(Ct==null){Ct=Cs;}
ls=true;if(ms[Ct]==""){Ft+="showErrors();";this.requestGetData(false,Dt,Ct,Et,Ft);}
return true;}}
Action.handleActions(Et);}
this.autoUpdateStop=function(){if(ls==true){ls=false;}}
this.isActive=function(){return ks;}
this.setActive=function(){ks=true;}
this.setInactive=function(){ks=false;}
this.setNode=function(Gt){if(Gt){Or=Gt;}
else{var Ht=document.getElementById(Lr);if(Ht!=null){Or=Ht;}
else{Or=null;log.error("DOMNode for displayLayer "+Lr+" could not be found");return false;}}
if(Rr==true){if(Vr){Vr.setNode();}}
return true;}
this.setDataArea=function(It){var Jt=It;if(!Jt){var Kt="";if(Rr==true){Kt=Lr+"_scr";}
else{Kt=Lr;}
Jt=document.getElementById(Kt);}
if(!Jt){log.error("data area with id "+Kt+" for displayLayer "+Lr+" was not found");return false;}
Pr=Jt;return true;}
this.setDataDirty=function(){as=true;}
this.setDataClean=function(){as=false;}
this.isDataDirty=function(){return as;}
this.setPredecessor=function(Lt){if(Lt<0){cs=null;}
else{cs=Lt;}}
this.getPredecessor=function(){return cs;}
this.setSuccessor=function(Mt){if(Mt<0){ds=null;}
else{ds=Mt;}}
this.getSuccessor=function(){return ds;}
this.setErrSuccessor=function(Nt){if(Nt<0){es=null;}
else{es=Nt;}}
this.getErrSuccessor=function(){return es;}
this.setChain=function(Ot,Pt,Qt){this.setPredecessor(Ot);this.setSuccessor(Pt);this.setErrSuccessor(Qt);}
this.setOrder=function(Rt){if(Rt!=null){Qr=Rt;}}
this.clean=function(){if(Rr==true){var St=this.getScrollLayer().getNode();if(St){St.innerHTML="";}}
else{Or.innerHTML="";}}
this.activate=function(Tt,Ut,Vt){if(bs==true){this.clean();}
var Wt=this.getSelector();if(Wt){}
Wr=true;if(Or!=null){setElementStyle(Or,"display","block");setElementStyle(Or,"visibility","visible");setElementStyle(Or,"zIndex",100);this.showProgressBar();}
else{log.error("no DOM Node defined for this display layer");return false;}
if(Mr!=null){Mr.setFavIcon(ys);}
if(Mr!=null&&Vt!=true&&ts=="static"){if(rs!=""&&rs!=null){Mr.getBreadCrumb().hide();Mr.setTagLine(rs,ss);}}
var Xt=null;if(kr!=Module.M_SELECT&&kr!=Module.M_CONFIG){Xt={"layer":Qr,"status":Nr};}
if(bs==true){if(Ut){Ut+="showErrors();";}
else{Ut="showErrors();";}
if(js==true){this.autoUpdateStart(Request.RT_GETALL,Xt,Tt,Ut);}
else{this.requestGetData(false,Xt,Request.RT_GETALL,Tt,Ut);}}
else{if(Ut){Ut+="showErrors();";}
else{Ut="showErrors();";}
if(js==true){this.autoUpdateStart(Cs,Xt,Tt,Ut);}
else{}}
this.setVerticalPosition(true);return true;}
this.deactivate=function(Yt){Wr=false;if(Or!=null){setElementStyle(Or,"display","none");setElementStyle(Or,"zIndex",(100-Yt));this.autoUpdateStop();this.cleanRequests();return true;}
return false;}
this.setTemplateDirty=function(){bs=true;}
this.setTemplateClean=function(){bs=false;}
this.getTemplateDirty=function(){return bs;}
this.getNode=function(){return Or;}
this.getId=function(){return Lr;}
this.getScrollLayer=function(){var Zt=null;if(this.isScrollLayer()){Zt=Vr;}
return Zt;}
this.isScrollLayer=function(){return Rr;}
this.scrollLayer=function($t,au){var bu=-1;if(Xr==true){var cu=0;if($t==1){if(Yr.getPos()>=Zr){cu=1;}}
else{if(Yr.getPos()<((Sr*Tr)-$r)){cu=1;}}
if(cu==1){if($t==-1){Yr.prevPos();bu=this.getScrollLayer().scrollLeft(null,au);}
else{Yr.nextPos();bu=this.getScrollLayer().scrollRight(null,au);}}
else{if($t==-1){Yr.prevPos();}
else{Yr.nextPos();}}}
else{if($t==-1){this.getScrollLayer().scrollLeft(null,au);}
else{this.getScrollLayer().scrollRight(null,au);}}
bu=this.getScrollLayer().getCurrentStep();return bu;}
this.scrollRight=function(du){return this.scrollLayer(1,du);}
this.scrollLeft=function(eu){return this.scrollLayer(-1,eu);}
this.scrollDirectTo=function(fu,gu){var sl=this.getScrollLayer();if(sl==null){return;}
if(Yr!=null){sl.scrollDirectTo(fu,gu);this.setSelectorPos(fu);}
else{scrollLayer.scrollDirectTo(fu,gu);}}
this.getSelector=function(){return Yr;}
this.setSelectorPos=function(hu){if(Yr){return Yr.setPos(hu);}
return false;}
this.getSelectorPos=function(){if(Yr){return Yr.getPos();}
return -1;}
this.setParent=function(iu){if(iu){Mr=iu;}}
this.setTemplate=function(ju){if(Pr){DWRUtil.setValue(Pr.getAttribute("id"),ju);this.setTemplateClean();this.getErrorControl().findErrorBoxes(Or);this.getErrorControl().showErrors();return true;}
return false;}
this.setScript=function(ku){var lu="";var mu=0;if(Mr!=null){lu=Mr.getServiceId();}
var nu=navigator.userAgent;if(nu.indexOf("Safari")!=-1){var ou=eval(ku);}
else{var pu=lu+"_s"+Module.getStatusShortName(Nr)+"_l"+Qr;var qu=document.getElementById(pu);if(qu!=null){document.getElementsByTagName("head")[0].removeChild(qu);}
var e=document.createElement("script");e.setAttribute("id",pu);e.text=ku;e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);}}
this.setDataInTemplate=function(ru){var su=ru.getResponse();var tu=ru.getModuleId();var uu=ru.getModuleStatus();var vu=ru.getModuleLayer();var wu={};var i;for(i in su){if(typeof su[i]=="function"||i=="data_out"){continue;}
wu[tu+"_sd_data_"+i]=su[i];}
var xu=ru.getData();var i;var yu=Module.getStatusShortName(uu)+"_"+vu;for(i in xu){if(i==""||typeof xu[i]=="function"){continue;}
switch(i){case yu:var zu=xu[i]["data"];var Au=Date.parse(xu[i]["timestamp"]);var Bu=new Date(Au);wu[tu+"_s"+uu+"_l"+vu+"_sd_"+i+"_timestamp"]=formatDate(Bu,"dd.MM.yy HH:mm");if(zu==null){continue;}
var f;for(f in zu){if(typeof zu[f]=="function"){continue;}
if(typeof zu[f]=="object"){var Cu=zu[f];if(Cu){var j;for(j=0;j<Cu.length;j++){var k;for(k in Cu[j]){var Du=tu+"_s"+uu+"_l"+vu+"_sd_"+i+"_"+k+"_"+j;wu[tu+"_s"+uu+"_l"+vu+"_sd_"+i+"_"+k+"_"+j]=Cu[j][k];}}}}
else{wu[tu+"_s"+uu+"_l"+vu+"_sd_"+i+"_"+f]=zu[f];}}
break;default:wu[tu+"_s"+uu+"_l"+vu+"_sd_data_"+i]=xu[i];}}
if(wu){this.cleanDataInTemplate();DWRUtil.setValues(wu,Or);}
return false;}
this.cleanDataInTemplate=function(){var Eu="_sd_";var Fu=getLikeElements(Or,"span","id",Eu,1);if(Fu!=null){var i;for(i=0;i<Fu.length;i++){DWRUtil.setValue(Fu[i],"");}}}
this.setPrivDataInTemplate=function(Gu){var i;var Hu=new Array();for(i in Gu){if(typeof Gu[i]=="function"){continue;}
var Iu=Lr+"_"+i+"_ipt";Hu[Iu]=Gu[i];}
DWRUtil.setValues(Hu);return true;}
this.clearPrivDataInTemplate=function(Ju){var i;var Ku=new Array();for(i in Ju){if(typeof Ju[i]=="function"){continue;}
var Lu=Lr+"_"+i+"_ipt";Ku[Lu]="";}
DWRUtil.setValues(Ku);return true;}
this.getInputData=function(){var Mu;fs=new Array();if(Yr){Mu=new Array();var Nu=Yr.getSelectedValue();if(Nu!=null){Mu["elem"]=Yr.getSelectedObj();Mu["id"]=Nu["id"];Mu["name"]=Nu["name"];Mu["value"]=Nu["value"];Mu["type"]=Nu["type"];Mu["pattern"]=Nu["pattern"];Mu["errorbox"]=Nu["errorbox"];Mu["mandatory"]="1";if(Nu["name"].indexOf("_")==0){Mu["priv"]=1;}
else{Mu["priv"]=0;}
fs.push(Mu);}
else{}}
var Nu=getLikeElements(Or,null,"class","m_ipt");var i;for(i=0;i<Nu.length;i++){Mu=new Array();Mu["id"]=Nu[i].getAttribute("id");Mu["name"]=Nu[i].getAttribute("name");if(Nu[i].getAttribute("type")=="radio"){if(Nu[i].checked==false){Mu["value"]="";}
else{Mu["value"]=Nu[i].value;}}
else{if(Nu[i].getAttribute("type")=="checkbox"){if(Nu[i].checked==false){Mu["value"]=Nu[i].parentNode.getAttribute("default");}
else{Mu["value"]=Nu[i].value;}}
else{Mu["value"]=Nu[i].value;}}
Mu["elem"]=Nu[i].parentNode;Mu["type"]=Nu[i].parentNode.getAttribute("inputtype");Mu["pattern"]=Nu[i].parentNode.getAttribute("pattern");Mu["mandatory"]=Nu[i].parentNode.getAttribute("mandatory");Mu["errorbox"]=Nu[i].parentNode.getAttribute("errorbox");Mu["inputfield"]=Nu[i].parentNode.getAttribute("inputfield");Mu["priv"]=Nu[i].parentNode.getAttribute("priv");Mu["default"]=Nu[i].parentNode.getAttribute("default");Mu["copyfrom"]=Nu[i].parentNode.getAttribute("copyfrom");if(Mu["inputfield"]==null){Mu["inputfield"]=Nu[i].parentNode.getAttribute("id");}
Mu["label"]=Nu[i].parentNode.getAttribute("label");if(Mu["label"]==Mu["value"]){Mu["value"]="";}
fs.push(Mu);}
this.checkCopyFrom();return true;}
this.checkCopyFrom=function(){var i;var Ou=new Array();for(i=0;i<fs.length;i++){var Pu=fs[i];Ou[Pu["name"]]=Pu["value"];}
for(i=0;i<fs.length;i++){var Pu=fs[i];if(Pu["copyfrom"]!=""&&Pu["copyfrom"]!=null){var Qu=[];if(Pu["copyfrom"].match(",")){Qu=Pu["copyfrom"].split(",");}
else{Qu.push(Pu["copyfrom"]);}
var j;for(j=0;j<Qu.length;j++){Pu["value"]+=Ou[Qu[j]];}}}}
this.cleanRequests=function(){var i;for(i in ms){if(typeof ms[i]=="function"){continue;}
if(ms[i]!=null&&ms[i]!=""){if(hs!=null){hs.removeRequest(ms[i]);ms[i]="";}}}
ls=false;}
this.checkInputData=function(){var r=false;if(xs!=null){r=xs.checkInputErrors(fs);}
return r;}
this.checkResponseErrors=function(){if(xs!=null){return xs.checkResponseErrors();}
return false;}
this.showErrors=function(){if(xs!=null){xs.showErrors();}}
this.hideErrors=function(){if(xs!=null){xs.hideErrors();}}
this.getErrorActions=function(){if(xs!=null){return xs.getErrorActions();}
return[];}
this.getInputDataMap=function(Ru){if(Ru==null){Ru=fs;}
var Su=new Array();var i;for(i=0;i<Ru.length;i++){Su[Ru[i]["name"]]=Ru[i]["value"];}
return Su;}
this.getInputDataElement=function(Tu){var i;for(i=0;i<fs.length;i++){if(fs[i]["name"]==Tu){return fs[i];}}
return null;}
this.setInputDataElement=function(Uu){var i;for(i=0;i<fs.length;i++){if(fs[i]["name"]==Uu["name"]){fs[i]=Uu;return true;}}
fs.push(Uu);return true;}
this.toString=function(Vu){var Wu="<br>";var Xu="<pre>";var Yu="</pre>";if(Vu=="TEXT"){Wu="\n";Xu="\n";Yu="\n";}
var Zu="";var i;Zu+=Xu;Zu+="ID     : "+Lr+Wu;Zu+="ORDER  : "+Qr+Wu;Zu+="DISPLAY: "+Wr+Wu;Zu+="SELECTOR: "+Xr+Wu;Zu+="AUTOUPDATE: "+js+Wu;Zu+=Yu;return Zu;}
this.getAllowedHeights=function(){return ns;}
this.getVerticalPositions=function(){return ps;}
this.setAllowedHeights=function(yr){if(typeof yr=="string"){var $u=new Array();var av=new Array();var bv=yr.split(",");if(bv==null||bv.length==null){$u.push(yr);}
else{var i;for(i=0;i<bv.length;i++){var cv=bv[i].split(":");if(cv[1]!=""&&cv[1]!=undefined){if(DisplayLayer.allowedHeightFactors[cv[0]]!=null){$u[i]=DisplayLayer.allowedHeightFactors[cv[0]];}
else{$u[i]=cv[0];}
av[i]=cv[1];}
else{if(DisplayLayer.allowedHeightFactors[bv[i]]!=null){$u[i]=DisplayLayer.allowedHeightFactors[bv[i]];}
else{$u[i]=bv[i];}
av[i]=0;}}}
var i;var dv=0;for(i=($u.length-1);i>=0;i--){ns[i]=$u[i];if(av[i]=="auto"){ps[i]=-dv;}
else{ps[i]=av[i];}
dv+=(ns[i]-ws);}}
else{ns=yr;}}
this.getCurrentHeight=function(){return ns[os];}
this.getCurrentVerticalPosition=function(){return ps[os];}
this.setVerticalPosition=function(ev){if(ps[os]==""||ps[os]=="undefined"||ps[os]==null){return;}
if(ev==null||ev==true){setElementStyle(Or,"top",ps[os]+"px");}
else{setElementStyle(Or,"top",ps[os]+"px");}}
this.getCurrentHeightIndex=function(){return os;}
this.setCurrentHeightIndex=function(fv){var gv=false;if(fv>=ns.length||Nr==null){return false;}
else{if(os==fv){return true;}}
os=fv;var hv="initHeight_s"+Nr+"_l"+Qr;var iv={};iv[hv]=os;this.requestSetData(null,null,iv);this.setVerticalPosition(true);gv=true;return gv;}
this.getToggledHeight=function(){var jv=1;while(jv){if(qs==1){os++;if(os>=ns.length){os=ns.length-1;qs=0;}
else{jv=0;}}
if(qs==0){os--;if(os<0){os=0;qs=1;continue;}
else{jv=0;}}}
this.setVerticalPosition(false);return ns[os];}
this.getTagLine=function(){return rs;}
this.setTagLine=function(kv,lv,mv){if(kv!=null){rs=kv;}
if(lv!=null){ss=lv;}
if(mv!=null){ts=mv;}}
this.getTagLineLink=function(){return ss;}
this.setTagLineLink=function(nv){this.setTagLine(null,nv);}
this.getTagLineType=function(){return ts;}
this.setTagLineType=function(ov){this.setTagLine(null,null,ov);}
this.reset=function(){if(Rr==true){this.scrollDirectTo(0);}
if(Xr==true){this.getSelector().reset();}}
this.handleTimeOut=function(pv){}
this.handleMissedResponse=function(qv){}
this.setSelectLayerLevel=function(rv){Ds=rv;}
this.getSelectLayerLevel=function(sv){return Ds;}
this.setScrollPos=function(tv,uv,vv,wv){if(Nr!=Module.M_SELECT){return true;}
if(wv==null||wv==""){wv="/";}
if(vv!=null&&vv!=""){var xv=uv.split("/");var yv=xv.slice(0,vv+1);uv=yv.join("/");}
var zv=findIndex(tv,uv,wv);this.scrollDirectTo(zv);if(webPad!=null){webPad.checkControl();}
return zv;}
this.hide=function(){setElementStyle(Or,"visibility","hidden");}
this.show=function(){setElementStyle(Or,"visibility","visible");}
this.startVScroll=function(Av){if(Av==null||Av=="undefined"){Av=5500;}
if(Fs==true){return;}
var Bv=this.getId()+"_v";var Cv=document.getElementById(Bv);var Dv=$(Bv).getStyle("height");var Ev=Number(Dv.replace("px",""));if(Cv){Fs=true;var Fv=new Fx.Scroll(Lr+"_v",{wait:false,duration:Av,offset:{'x':0,'y':0},transition:Fx.Transitions.linear});var me=this;var Gv=Av;Fv.scrollTo(0,Ev).chain(function(){this.set(0);Fs=false;me.startVScroll(Gv);});}}
this.doEffect=function(Hv,Iv,Jv,Kv){var me=this;var Lv=Iv;var Mv=500;if(browser&&browser.indexOf("MSIE")!=-1){Hv="none";}
switch(Hv){case "fade":var Nv=this.getNode();var Ov=$(Lr).effects({duration:Mv,transition:Fx.Transitions.Quart.easeOut});if(Iv.getRequestType()=="getAll"){this.showProgressBar();Ov.start({'opacity':[1.0,0.0]}).chain(function(){me.setTemplate(Jv);me.prepareConfigSelector();me.setScript(Kv);me.getErrorControl().findErrorBoxes(me.getNode());me.handlePostActions(Lv);me.hideProgressBar();if(me.checkPriv()==false){me.setPrivBox(true);}
else{me.setPrivBox(false);}
this.start({opacity:1.0});});}
else{this.showProgressBar();Ov.start({'opacity':[1.0,0.0]}).chain(function(){me.hideErrors();me.setDataInTemplate(Lv);me.getErrorControl().findErrorBoxes(me.getNode());me.handlePostActions(Lv);me.hideProgressBar();if(me.checkPriv()==false){me.setPrivBox(true);}
else{me.setPrivBox(false);}
this.start.delay(500,this,{opacity:[0.0,1.0]});});}
break;default:if(Iv.getRequestType()=="getAll"){me.hide();me.setTemplate(Jv);me.prepareConfigSelector();me.setScript(Kv);}
else{me.hideErrors();me.setDataInTemplate(Lv);}
me.getErrorControl().findErrorBoxes(me.getNode());me.handlePostActions(Lv);me.hideProgressBar();if(me.checkPriv()==false){me.setPrivBox(true);}
else{me.setPrivBox(false);}}}
this.showProgressBar=function(){var Pv=Lr+"_prg";var Qv=document.getElementById(Pv);if(Qv){setElementStyle(Qv,"display","block");}}
this.hideProgressBar=function(){var Rv=Lr+"_prg";var Sv=document.getElementById(Rv);if(Sv){setElementStyle(Sv,"display","none");}}
this.init();}
var scrollControlNames={"scrollNavControl":"scr_nav","scrollLeftControl":"scr_left_control","scrollRightControl":"scr_right_control","scrollArea":"scr_area"};function ScrollLayer(id,Tv,Uv,Vv){var Wv=id||"noname";var Xv=null;var Yv=Tv||0;var Zv=Uv||1;var $v=Vv||Uv;var aw=0;var bw=0;var cw=100;var dw=null;var ew=null;this.init=function(){if(!this.setNode()){log.error("Could not set DOM Node for scrollingPanel "+Wv);return false;}
this.calcScrollInterval();}
this.setNode=function(fw){if(fw){Xv=fw;}
else{var gw=document.getElementById(Wv);if(gw){Xv=gw;}
else{Xv=null;log.error("DOMNode for scrolling panel "+Wv+" could not be found");return false;}}
return true;}
this.getNode=function(){return Xv;}
this.setMaxPages=function(hw){if(hw!=null){Yv=hw;}
this.calcScrollInterval();}
this.getMaxPages=function(){return Yv;}
this.setStepsPerPages=function(iw){if(iw!=null){_stepsPerPages=iw;}
this.calcScrollInterval();}
this.setStepInterval=function(jw){if(jw!=null){$v=jw;}}
this.calcScrollInterval=function(){cw=100/(Zv*Yv);}
this.scrollRight=function(kw,lw){var mw=1;if(kw){mw=Math.abs(kw);}
else{mw=$v;}
var to=0;var nw=bw*(cw+0.0037);if(aw<(Yv-1)){if((Yv*Zv)<=(bw+mw)){mw=(Yv*Zv)-bw;}
bw+=mw;to=bw*(cw+0.0037);aw=Math.floor(bw/Zv);}
else{aw=0;bw=0;to=0;}
if(lw==1){var ow=new Fx.Style(Wv,"left",{duration:500,transition:Fx.Transitions.Sine.easeInOut,unit:"%"});ow.start(-to);}
else{setElementStyle(Xv,"left","-"+to+"%");}
return aw;}
this.scrollLeft=function(qw,rw){var sw=1;if(qw){sw=Math.abs(qw);}
else{sw=$v;}
var tw=0;if(aw>0||(aw==0&&bw>0)){if((bw-sw)<0){sw=bw;}
bw-=sw;tw=bw*(cw+0.0037);aw=Math.floor(bw/Zv);}
else{aw=Yv-1;bw=aw*Zv;tw=bw*(cw+0.0037);}
if(rw==1){var uw=new Fx.Style(Wv,"left",{duration:500,transition:Fx.Transitions.Sine.easeInOut,unit:"%"});uw.start(-tw);}
else{setElementStyle(Xv,"left","-"+tw+"%");}
return aw;}
this.scrollDirectTo=function(vw,ww){var xw=vw;if(xw>(Yv*Zv)){xw=(Yv*Zv);}
bw=vw;var yw=bw*cw;aw=Math.floor(bw/Zv);if(ww==1){var zw=new Fx.Style(Wv,"left",{duration:500,transition:Fx.Transitions.Sine.easeInOut,unit:"%"});zw.start(-yw);}
else{setElementStyle(Xv,"left","-"+yw+"%");}
return aw;}
this.moveHorizontal=function(Aw,to,Bw,Cw){if(Cw==0){return;}
var Dw=Bw/Cw;if(ew){clearTimeout(ew);}
var Ew=(to-Aw)/Cw;setElementStyle(Xv,"left",Aw+"%");ew=setTimeout(this.moveHorizontal.bind(this),Dw);}
this.getCurrentPage=function(){return aw;}
this.getCurrentStep=function(){return bw;}
this.getMaxSteps=function(){return Yv*Zv;}
this.toString=function(Fw){var i;var Gw="<br>";var Hw="<pre>";var Iw="</pre>";if(Fw=="TEXT"){Gw="\n";Hw="\n";Iw="\n";}
var Jw="";Jw+=Hw;Jw+="ID          : "+Wv+Gw;Jw+="ScrollLeft  : "+this.controls["scrollLeftControl"]+Gw;Jw+="ScrollRight : "+this.controls["scrollRightControl"]+Gw;Jw+="ScrollArea  : "+this.controls["scrollArea"]+Gw;for(i=0;i<=Yv;i++){Jw+="ScrollNav "+i+" : "+this.controls["scrollNavControl_"+i]+Gw;}
Jw+=Iw;return Jw;}
this.init();}
DisplayLayer.HEIGHT_EXTENDED_2=500;DisplayLayer.HEIGHT_EXTENDED_1=400;DisplayLayer.HEIGHT_NORMAL=196;DisplayLayer.HEIGHT_REDUCED=56;DisplayLayer.allowedHeightFactors={"0x":"56px","0.25x":"91px","0.5x":"126px","0.75x":"161px","1.0x":"196px","1.25x":"231px","1.5x":"266px","1.75x":"301px","2.0x":"336px","2.5x":"406px","3.0x":"476px"};function Logger(Kw,Lw,Mw,Nw,Ow){var Pw=Logger.LEVEL_INFO;var Qw=Logger.LEVEL_ERROR;var Rw=50;var Sw=10;var Tw="debug_area";var Uw=null;var Vw=new Array();var Ww=new Array();var Xw=new Array("NONE","ERROR","WARN","INFO","DEBUG","SPECIAL");this.init=function(){if(Nw!=null){if(this.isValidLevel(Nw)==true){Qw=Nw;}}
if(Kw!=null){if(this.isValidLevel(Kw)==true){Pw=Kw;}}
if(Lw!=null){Rw=Lw;}
if(Ow!=null){Sw=Ow;}
if(Mw!=null){Tw=Mw;}
this.getLocalLogElement();this.log(Logger.LEVEL_INFO,"Started logger with maxLocalLines = "+Rw+" and maxServerLines = "+Sw);this.log(Logger.LEVEL_INFO,"localLevel = "+Pw+" and serverLevel = "+Qw);}
this.isValidLevel=function(Yw){if(Xw[Yw]!=""){return true;}
return false;}
this.getLocalLogElement=function(){if(Uw==null){Uw=document.getElementById(Tw);}}
this.getLocalLevel=function(){return Pw;}
this.getLocalLevelByName=function(){return this.getLevelByName(Pw);}
this.getServerLevel=function(){return Qw;}
this.getServerLevelByName=function(){return this.getLevelByName(Qw);}
this.getLevelByName=function(Zw){return Xw[Zw];}
this.log=function($w,ax){if(Uw!=null){if($w<=Pw||($w==Logger.LEVEL_SPECIAL&&Pw!=Logger.LEVEL_NONE)){this.collectLocal($w,ax);this.updateLocal();}}
if(DWR==true&&Sw>0){if($w<=Qw||($w==Logger.LEVEL_SPECIAL&&Qw!=Logger.LEVEL_NONE)){this.collectServer($w,ax);if(this.getSendBufferLength()>=Sw){this.send();this.purgeSendBuffer();}}}}
this.updateLocal=function(){if(Uw!=null){Uw.innerHTML=Vw.join("<br>");}}
this.error=function(bx){this.log(Logger.LEVEL_ERROR,bx);}
this.warn=function(cx){this.log(Logger.LEVEL_WARN,cx);}
this.info=function(dx){this.log(Logger.LEVEL_INFO,dx);}
this.debug=function(ex){this.log(Logger.LEVEL_DEBUG,ex);}
this.special=function(fx){this.log(Logger.LEVEL_SPECIAL,fx);}
this.collectLocal=function(gx,hx){if(this.getLocalBufferLength()>=Rw){Vw.shift();}
Vw.push(Xw[gx]+": "+hx);}
this.collectServer=function(ix,jx){Ww.push(new Date().toUTCString()+": "+Xw[ix]+": "+jx);}
this.getSendBufferLength=function(){return Ww.length;}
this.getLocalBufferLength=function(){return Vw.length;}
this.purgeSendBuffer=function(){Ww=new Array();}
this.purgeLocalBuffer=function(){Vw=new Array();}
this.send=function(){DWREngine._execute("dwr",'Logger','log',1,"\n"+Ww.join("\n"),Logger.handleResponse);}
this.setLocalLevel=function(Kw){if(this.isValidLevel(Kw)){Pw=Kw;this.log(Logger.LEVEL_SPECIAL,"Switched local log level to "+this.getLevelByName(Kw));}}
this.setServerLevel=function(Nw){if(this.isValidLevel(Nw)){Qw=Nw;this.log(Logger.LEVEL_SPECIAL,"Switched server log level to "+this.getLevelByName(Nw));}}
this.setLevel=function(kx){if(this.isValidLevel(kx)){Qw=kx;Pw=kx;this.log(Logger.LEVEL_SPECIAL,"Switched server AND local log level to "+this.getLevelByName(kx));}}
this.init();}
Logger.handleResponse=function(lx){return;}
Logger.LEVEL_NONE=0;Logger.LEVEL_ERROR=1;Logger.LEVEL_WARN=2;Logger.LEVEL_INFO=3;Logger.LEVEL_DEBUG=4;Logger.LEVEL_SPECIAL=5;function getElementStyle(mx,nx,ox){var px=$(mx).getStyle(ox);return px;}
function globalCalcColumnWidth(qx){var i;for(i=0;i<qx.length;i++){qx[i].calcPosX();qx[i].calcWidth();}}
function getWindowWidth(){var rx;if(self.innerWidth){rx=self.innerWidth;}
else if(document.documentElement&&document.documentElement.clientWidth){rx=document.documentElement.clientWidth;}
else if(document.body){rx=document.body.clientWidth;}
return rx;}
function getWindowHeight(){var sx;if(self.innerHeight){sx=self.innerHeight;}
else if(document.documentElement&&document.documentElement.clientHeight){sx=document.documentElement.clientHeight;}
else if(document.body){sx=document.body.clientHeight;}
return sx;}
function getLikeElements(tx,ux,vx,wx,xx,yx){var zx;var Ax;var Bx=[];var Cx;if(yx==null){yx=false;}
if(wx!=null){Cx=new RegExp(wx);}
if(tx!=null){zx=tx;}
else{zx=document;}
if(xx==1){}
if(ux!=null){Ax=zx.getElementsByTagName(ux);}
else{Ax=zx.getElementsByTagName("*");}
if(vx!=null){for(var i=0;i<Ax.length;i++){if(wx=="selectable"){if(xx==1){}}
var Dx=Ax[i].getAttribute(vx);if(Dx==null){if(vx=="class"){Dx=Ax[i].className;}}
if(wx){if(xx==1){}
if((yx==true&&Dx==wx)||(yx==false&&Cx.exec(Dx))){Bx.push(Ax[i]);}}
else{Bx.push(Ax[i])}}}
else{Bx=Ax;}
return Bx;}
function globalSetStyle(Ex,Gx,Hx){return setElementStyle(Ex,Gx,Hx);}
function setElementStyle(Ix,Jx,Kx){if(Ix==null){}$(Ix).setStyle(Jx,Kx);return true;}
function splitValue(Lx,Mx){if(!Lx){return new Array(-1,Mx);}
var Nx=Lx;var Ox=Mx;if(typeof Lx=="string"){if(Lx.search(/px/)!=-1){Nx=Lx.replace(/px/,"");Ox="px";}
else if(Lx.search(/%/)!=-1){Nx=Lx.replace(/%/,"");Ox="%";}}
return new Array(Number(Nx),Ox);}
function doInnerHTML(Px,Qx){try{var Rx=Px.childNodes;for(var i=0;i<Rx.length;i++){Px.removeChild(Rx[i]);}
var Sx=new DOMParser().parseFromString(Qx,'text/xml');var Tx=document.createRange();Tx.selectNodeContents(document.getElementById(elementId));Tx.deleteContents();for(var i=0;i<Sx.childNodes.length;i++){document.getElementById(elementId).appendChild(document.importNode(Sx.childNodes[i],true));}
return true;}
catch(e){log.error("try to parse with DOMParser failed");try{document.getElementById(elementId).innerHTML=Qx;return true;}
catch(ee){return false;}}}
function notifyModules(Ux,Vx){if(Ux==null){Ux=mods;}
var i;for(i in Ux){if(typeof Ux[i]=="function"){continue;}
if(Ux[i]!=null){if(Vx==1){Ux[i].notifyLogin();}
else{Ux[i].notifyLogout();}}}}
function getActionAttributes(Wx){var Xx=["action","success","failure","rsuccess","rfailure"];var Yx=new Array();var i;for(i=0;i<Xx.length;i++){var Zx=Wx.getAttribute(Xx[i]);if(Zx==null){Zx="";}
var $x=navigator.userAgent;if(Xx[i]=="action"&&$x.indexOf("Opera")!=-1){var ay=new RegExp('https?://[\\w|\\.|\\:|\\d]+/{1,2}',"gi");var by=ay.exec(Zx);Zx=Zx.replace(by,"");}
Yx[Xx[i]]=Zx;}
return Yx;}
function hideInputLabel(cy,dy,ey,fy){if(dy==null){log.error("no element given for hiding input label");cy.cancelBubble=true;return false;}
if(dy.value==undefined){log.error("no value attribute found to hide");cy.cancelBubble=true;return false;}
if(dy.value==ey){dy.value="";if(fy==1){dy.type="password";}}
cy.cancelBubble=true;return false;}
function showInputLabel(gy,hy,iy,jy){if(hy==null){log.error("no element given for showing input label");return false;}
if(hy.value==undefined){log.error("no value attribute found to show");gy.cancelBubble=true;return false;}
if(hy.value==""){hy.value=iy;if(jy==1){hy.type="text";}}
gy.cancelBubble=true;return false;}
function string2Boolean(ky,ly){if(ky==null||ky==""){return ly;}
return(ky=="true"||ky=="TRUE")?true:false;}
function setGraphicalListBox(my,ny){var oy=my.getAttribute("id");var py=oy.split("_");var qy=py[0]+"_"+py[1]+"_vbt";var ry=my.getAttribute("action");Action.handleActions(ry);var sy=document.getElementById(ny+"_bdy_sa");var qy=py[0]+"_"+py[1]+"_lb";var ty=document.getElementById(qy);hideGraphicalListBox(ty);}
function toggleGraphicalListBox(uy){var vy=uy.getAttribute("id");var wy=vy.split("_");var xy=wy[0]+"_"+wy[1]+"_lb";var yy=document.getElementById(xy);var zy=$(xy).getStyle("display");if(zy=="block"){hideGraphicalListBox(yy);}
else{showGraphicalListBox(yy);}}
function hideGraphicalListBox(Ay){setElementStyle(Ay,"display","none");}
function showGraphicalListBox(By){setElementStyle(By,"display","block");}
function createDateList(Cy,to,Dy,Ey,Fy,Gy){var Hy=new Array();var Iy;if(typeof Cy=="string"){Iy=string2Date(Cy);if(Iy==null){return null;}}
else{Iy=Cy;}
var Jy;var Ky;if(typeof to=="string"){if(to!=null&&to!=""){Jy=string2Date(to);if(Jy==null){return null;}
Ky=formatDate(Jy,Gy,"DE");}
else{Jy=null;Ky="";}}
else{if(to==null){Jy=null;}
else{Jy=to;Ky=formatDate(Jy,Gy,"DE");}}
var Ly=new Date(Iy);var My=0;while(true){var Ny=formatDate(Ly,Gy,"DE");Hy.push(Ny);My++;if(Dy!=null&&Dy>-1&&My==Dy){break;}
if((Dy==null||Dy==-1)&&Ky!=""&&Ny==Ky){break;}
switch(Fy){case "d":Ly.setDate(Ly.getDate()+Ey);break;case "M":Ly.setMonth(Ly.getMonth()+Ey);break;case "y":Ly.setYear(Ly.getYear()+Ey);break;case "h":Ly.setHour(Ly.getHour()+Ey);break;case "m":Ly.setMinutes(Ly.getMinutes()+Ey);break;case "s":Ly.setSeconds(Ly.getSeconds()+Ey);break;default:log.error("invalid type for step "+Fy);return null;}}
return Hy;}
function getCurrentDateString(Oy){var Py=new Date();var Qy=formatDate(Py,Oy,"DE");return Qy;}
function string2Date(Ry){var Sy=Ry.split(/[ |\.|:]/);var Ty=new Date(Sy[2],(Sy[1]-1),Sy[0],Sy[3]||0,Sy[4]||0,Sy[5]||0);return Ty;}
function populateSelectElem(Uy,Vy,Wy,Xy,Yy,Zy,$y,az){var bz=document.getElementById(Uy);if(bz==null){return true;}
var cz=0;if(bz.type&&bz.type=="select-one"){if(Xy!=null){if(Xy==""){Xy=";";}
var dz=new Array();var ez=new Array();var i;for(i=0;i<Vy.length;i++){var fz=Vy[i].split(Xy,2);if(fz==null){return false;}
dz.push(fz[0]);ez.push(fz[1]);}
Vy=dz;Wy=ez;}
if(az==null||az==0){bz.options.length=0;}
else if(az==1){cz=bz.options.length;}
if(Wy==null){Wy=Vy;}
if(Yy==null){Yy=0;}
else{if(typeof Yy=="string"){var gz=findStringInArray(Vy,Yy);if(gz>-1){Yy=gz;}
else{Yy=0;}}
else{if(Yy<0){Yy=0;}}}
if(az==2){cz=Yy;}
if(Zy==null){Zy=Vy.length-1;}
else{if(typeof Zy=="string"){var gz=findStringInArray(Vy,Zy);if(gz>-1){Zy=gz;}
else{Zy=Vy.length-1;}}
else{if(Zy!=null&&Zy>Vy.length){Zy=Vy.length-1;}}}
if($y&&$y!=-1){if((Yy+$y)>=Vy.length){$y=Vy.length-Yy;}
Zy=Yy+$y-1;}
var i;for(i=0;i<=(Zy-Yy);i++){var hz;if(typeof Wy=="string"){hz=i;}
else{hz=Wy[Yy+i];}
bz.options[i+cz]=new Option(Vy[Yy+i],hz,false,false);}}
return true;}
function findStringInArray(iz,jz){var i;for(i=0;i<iz.length;i++){if(iz[i]==jz){return i;}}
return -1;}
function replaceUmlauts(id){var kz=document.getElementById(id);var lz="";if(kz){lz=kz.value;var mz=new Array(/\u00fc/,"ue",/\u00e4/,"ae",/\u00fc/,"oe");for(var i=0;i<mz.length;i++){lz=lz.replace(mz[i],mz[++i]);}
kz.value=lz;}}
function findParaInData(nz,oz){var i;for(i in nz){if(typeof nz[i]=="function"){continue;}
if(i==oz){return nz[i];}}
return 0;}
function checkInputFieldValue(id){var pz=document.getElementById(id);if(pz){if(pz.value==""){return true;}}
return false;}
function hideInputField(id){var qz=document.getElementById(id);if(qz){setElementStyle(qz,"visibility","hidden");return true;}
return false;}
function showInputField(id){var rz=document.getElementById(id);if(rz){setElementStyle(rz,"visibility","visible");rz.hashFocus=true;return true;}
return false;}
function setNav(sz,tz,uz){var vz;if(sz==null){vz=new Array("hdr_nav","ftr_nav");}
else{vz=new Array(sz);}
var wz=tz.getAttribute("id");if(wz){var xz=wz.split("_");var i;for(i=0;i<vz.length;i++){var yz="m_"+xz[1]+"_"+vz[i];var zz=document.getElementById("m_"+xz[1]+"_"+vz[i]);var Az=getLikeElements(zz,"div","id","ctl$");var i;for(i=0;i<Az.length;i++){var wz=Az[i].getAttribute("id");var xz=wz.split("_");var yz=xz[xz.length-2]+"_"+xz[xz.length-1];var Bz=xz[0]+"_"+xz[1];var Cz=mods[Bz];if(Cz!=null){Cz.setNavControl(yz,uz);}}}}}
function tt_setTip(Dz,Ez,Fz,Gz,Hz){try{return tt_setTip2(Dz,Ez,Fz,Gz,Hz);}
catch(e){log.warn("no tt_setTip loaded");}
return false;}
function findIndex(Iz,Jz,Kz){if(Kz==null||Kz==""){Kz="/";}
var Lz=Iz.split(Kz);var Mz=false;if(Lz){var i;for(i=0;i<Lz.length;i++){if(Lz[i]==Jz){Mz=true;break;}}
if(Mz==true){return i;}}
return 0;}
function setHomePage(Nz,Oz,Pz,Qz,Rz){if(document.all){Nz.style.behavior='url(#default#homepage)';Nz.setHomePage(Pz);}
else{Nz.T_WIDTH=300;Nz.T_OPACITY=90;Nz.T_DELAY=0;Nz.T_BGCOLOR='#ffffff';Nz.T_FONTCOLOR='#666677';Nz.T_BORDERCOLOR='#A0A0A0';Nz.T_STICKY=true;Nz.T_STATIC=true;Nz.T_TITLE=Qz;tt_setTip(Rz,'4711',Nz,Oz);}}
function setToolTip(Sz,Tz,Uz,Vz,Wz,Xz){switch(Uz){case 1:Tz.T_WIDTH=80;Tz.T_OPACITY=80;Tz.T_BGCOLOR='#ffffff';break;case 2:Tz.T_WIDTH=80;Tz.T_OPACITY=80;Tz.T_BGCOLOR='#ffffff';Tz.T_FONTCOLOR='#666677';Tz.T_BORDERCOLOR='#666677';Tz.T_TEMP=3000;default:}
if(Xz==1){Xz=true;}
else{Xz=false;}
return tt_setTip(Vz,Wz,Tz,Sz,Xz);}
function determineBrowser(Yz){var Zz="";if(Yz.match(/Safari/)){Zz="Safari";}
else if(Yz.match(/MSIE 6.0/)){Zz="MSIE6";}
else if(Yz.match(/MSIE 7.0/)){Zz="MSIE7";}
else if(Yz.match(/Firefox\/2/)){Zz="Firefox2";}
else if(Yz.match(/Firefox\/1/)){Zz="Firefox1";}
else if(Yz.match(/Opera\/9/)){Zz="Opera9";}
else{Zz="Other";}
return Zz;}
function determineOS($z){var aA="";if($z.match(/Windows/)){aA="Windows";}
else if($z.match(/Mac OS/)){aA="MacOS";}
else if($z.match(/Linux/)){aA="Linux";}
else{aA="Other";}
return aA;}
function simpleMap2String(bA){var i;var cA="{ ";var dA=new Array();for(i in bA){if(typeof bA[i]=="function"){continue;}
dA.push("'"+i+"':'"+bA[i]+"'");}
return "{ "+dA.join(",")+" }";}
function prepareAction(eA){var fA=eA.split(';');var gA=new Array();var i;for(i=0;i<fA.length;i++){if(fA[i]!=""){gA.push("Action."+fA[i]);}}
return gA.join(';')+';';}
function setZIndex(hA,iA){$(hA).setStyle("zIndex",iA);}
var charMasks={' ':'sp','"':'dq',"'":'sq'};function maskCharacterInQuotes(jA,kA,lA){var mA=lA.split("|");if(!charMasks[kA]){return jA;}
var nA="##"+charMasks[kA]+"##";var oA=new RegExp(kA,'ig');var x;for(x=0;x<mA.length;x++){var pA=new RegExp(mA[x]+".*?"+mA[x],'ig');var qA=jA.match(pA);if(qA){var i;for(i=0;i<qA.length;i++){tmpResult=qA[i].replace(oA,nA);jA=jA.replace(qA[i],tmpResult);}}}
return jA;}
function unmaskCharacterInQuotes(rA,sA){if(!charMasks[sA]){return rA;}
var tA=new RegExp("##"+charMasks[sA]+"##","ig");return rA.replace(tA,sA);}
function Module(id,uA,vA,wA,xA,yA,zA,AA,BA,CA,DA,EA,FA,GA,HA,IA,JA,KA,LA,MA,NA,OA,PA,QA,RA,SA,TA){var UA="";var VA="module";var WA=-1;var XA=-1;var YA=-1;var ZA=-1;var $A=-1;var aB=-1;var bB=-1;var cB=-1;var dB=Module.M_INACTIVE;var eB=Module.M_VISIBLE;var fB=true;var gB=true;var hB=true;var iB=true;var jB=new Array(DisplayLayer.HEIGHT_REDUCED,DisplayLayer.HEIGHT_NORMAL);var kB=0;var lB=true;var mB=null;var nB=null;var oB=null;var pB=null;var qB=1;var rB=0;var sB=-1;var tB=-1;var uB=10;var vB=200;var wB=new Array();wB[Module.M_INACTIVE]=null;wB[Module.M_ACTIVE]=null;wB[Module.M_SELECT]=null;wB[Module.M_CONFIG]=null;var xB=new Array;xB[Module.M_INACTIVE]=new Array;xB[Module.M_ACTIVE]=new Array;xB[Module.M_SELECT]=new Array;xB[Module.M_CONFIG]=new Array;var yB=new Array;yB[Module.M_INACTIVE]=0;yB[Module.M_ACTIVE]=0;yB[Module.M_SELECT]=0;yB[Module.M_CONFIG]=0;var zB=new Array;zB[Module.M_INACTIVE]=-1;zB[Module.M_ACTIVE]=-1;zB[Module.M_SELECT]=-1;zB[Module.M_CONFIG]=-1;var AB=new Array();AB[Module.M_INACTIVE]=new Array();AB[Module.M_ACTIVE]=new Array();AB[Module.M_SELECT]=new Array();AB[Module.M_CONFIG]=new Array();var BB=new Array();BB["cfg_ctl"]=null;BB["del_ctl"]=null;BB["rsz_ctl"]=null;var CB="";var DB="";var EB=null;var FB=null;var GB=false;var HB=null;var IB=false;var JB=null;var KB=null;var LB=true;var MB=null;var NB="";var OB=1;var PB=0;var QB=-1;var RB=true;var SB=1;var TB=1;var UB=0;var VB="img";var WB="skin_1";var XB=new Array();var YB=true;var ZB=true;var $B=true;var aC=null;var bC=true;this.initParas=function(){if(id!=null){UA=id;}
if(uA!=null){this.setNode(uA);this.setId();}
this.setParas(wA,xA,yA,zA,AA,BA,CA,DA,EA,FA,GA,HA,IA,JA,KA,LA,MA,NA,OA,PA,QA,RA,SA,TA);if(vA!=null&&typeof vA=="object"){pB=vA;}}
this.setParas=function(wA,xA,yA,zA,AA,BA,CA,DA,EA,FA,GA,HA,IA,JA,KA,LA,MA,NA,OA,PA,QA,RA,SA,TA){var cC;if(wA!=null&&wA!="null"){cC=splitValue(wA,"px");WA=(cC[1]=="%")?cC[0]:-1;XA=(cC[1]=="px")?cC[0]:-1;}
if(xA!=null&&xA!="null"){cC=splitValue(xA,"px");YA=(cC[1]=="%")?cC[0]:-1;ZA=(cC[1]=="px")?cC[0]:-1;}
if(yA!=null&&yA!="null"){cC=splitValue(yA,"px");$A=(cC[1]=="%")?cC[0]:-1;aB=(cC[1]=="px")?cC[0]:-1;}
if(zA!=null&&zA!="null"){cC=splitValue(zA,"px");bB=(cC[1]=="%")?cC[0]:-1;cB=(cC[1]=="px")?cC[0]:-1;}
if(AA!=null&Module.isValidModuleStatus(AA)==true){dB=AA;}
if(BA!=null&&(BA==Module.M_VISIBLE||BA==Module.M_INVISIBLE)){eB=BA;}
if(CA!=null&&typeof CA=="boolean"){fB=CA;}
if(DA!=null&&typeof DA=="boolean"){gB=DA;}
if(EA!=null&&typeof EA=="boolean"){hB=EA;}
if(FA!=null&&typeof FA=="boolean"){iB=FA;}
if(GA!=null&&GA.length){jB=GA;}
if(HA!=null&&typeof HA=="object"&&HA.getType()=="queue"){JB=HA;}
if(IA!=null&&typeof IA=="object"&&IA.getType()=="queue"){KB=IA;}
if(JA!=null){LB=JA;}
if(KA!=null&&typeof KA=="number"){this.setSelectBase(KA);}
this.setDlStatus(LA);this.setDlLayer(MA);if(PA){XB=PA;}
if(OA!=null){if(WB!=OA){WB=OA;this.changeSkin();}
else{WB=OA;}}
if(imgPath!=null){VB=imgPath;}
if(NA!=null){RB=NA;}
if(QA!=null){YB=QA;}
if(RA!=null){ZB=RA;}
if(SA!=null){$B=SA;}
if(TA!=null){bC=TA;}}
this.init=function(){this.initParas();if(!this.setNode()){log.error("cannot set node for "+UA+".Leaving function");return false;}
this.setStatusNodes();this.setNavControlNodes();this.setWebPadNodes();this.calcWidth();if(bB!=-1){this.calcHeight();}
if(cB==-1){cB=jB[0];}
this.checkDragable();this.checkNavControls();this.initControlPads();this.initBreadCrumb();if(!this.render()){log.error("rendering of module "+UA+" failed. Leaving function");return false;}
return true;}
this.render=function(){this.setVisibility();this.setStatus();return true;}
this.getSelectPath=function(){return NB;}
this.setDlLayer=function(MA){QB=MA;}
this.getDlLayer=function(){return QB;}
this.setDlStatus=function(LA){PB=LA;}
this.getDlStatus=function(){return PB;}
this.setSelectBase=function(dC,eC,fC,gC){OB=dC;if(eC==true){var hC={"selectbase":OB};this.requestSetData(this.getStatus(),null,hC,fC,gC);}}
this.getSelectBase=function(){return OB;}
this.setSelectLayerLevel=function(iC,jC){var kC=this.getLayerByIndex(Module.M_SELECT,iC);if(kC!=null){kC.setSelectLayerLevel(jC);return true;}
return false;}
this.getSelectLayerLevel=function(lC){var mC=getLayerByIndex(Module.M_SELECT,lC);if(mC!=null){return mC.getSelectLayerLevel();}
return "";}
this.initBreadCrumb=function(){if(LB==true&&MB==null){MB=new BreadCrumb(UA+"_hdr_bcr"," | ");MB.hide();}}
this.setSelectPath=function(nC,oC,pC,qC,rC){NB=nC;if(oC!=null){OB=oC;}
if(pC==null){pC=false;}
if(pC==true){var sC;if(oC!=null){sC={"path":NB,"selectbase":OB};}
else{sC={"path":NB};}
this.requestSetData(this.getStatus(),null,sC,qC,rC);}}
this.getBreadCrumb=function(){return MB;}
this.setBreadCrumb=function(tC){MB=tC;}
this.getServiceId=function(){return CB;}
this.setServiceId=function(uC){CB=uC;}
this.getServiceName=function(){return DB;}
this.setServiceName=function(vC){DB=vC;}
this.isDraggable=function(){return fB;}
this.isResizeable=function(){return gB;}
this.isConfigurable=function(){return hB;}
this.isDeleteable=function(){return iB;}
this.checkNavControls=function(wC){if(!wC){wC=("cfg_ctl","rsz_ctl","del_ctl");}
var i;for(i in wC){switch(i){case "cfg_ctl":if(wC[i]==1&&$B==true){this.showNavControl("cfg_ctl");}
else{this.hideNavControl("cfg_ctl");}
break;case "rsz_ctl":if(wC[i]==1&&gB==true){this.showNavControl("rsz_ctl");}
else{this.hideNavControl("rsz_ctl");}
break;case "del_ctl":if(wC[i]==1&&iB==true){this.showNavControl("del_ctl");}
else{this.hideNavControl("del_ctl");}
break;default:break;}}}
this.checkDragable=function(){var xC=$(UA+"_hdr");if(xC!=null){if(fB==true){xC.removeEvents();setElementStyle(xC,"cursor","move");this.addDragNDrop();}
else{setElementStyle(xC,"cursor","default");}}}
this.getAllowSearch=function(){return RB;}
this.initControlPads=function(){if(EB!=null){setElementStyle(EB,"right",0);this.hideWebPad(true);}
if(HB!=null){setElementStyle(HB,"right",0);setElementStyle(HB,"top",0);this.hideSearchPad(true);}}
this.calcPosX=function(){var yC=$(UA).getStyle("left");if(yC.search(/px/)){XA=Math.floor(Number(yC.replace(/px/,"")));}
else{var zC=window.width;WA=Number(yC.replace(/%/,""));XA=Math.floor(zC*(WA/100));}}
this.getAbsPosX=function(){return XA;}
this.getRelPosX=function(){return WA;}
this.calcPosY=function(){var AC=getElementStyle(UA,"top","top");if(AC.search(/px/)){ZA=Math.floor(Number(AC.replace(/px/,"")));}
else{var BC=window.height;YA=Number(AC.replace(/%/,""));ZA=Math.floor(winSize*(YA/100));}}
this.getAbsPosY=function(){return ZA;}
this.getRelPosY=function(){return YA;}
this.calcWidth=function(){var CC=$(UA).getStyle("width");if(CC.search(/px/)!=-1){aB=Math.floor(Number(CC.replace(/px/,"")));}
else{if(pB!=null){var DC=pB.getAbsWidth();$A=Number(CC.replace(/%/,""));aB=Math.floor(DC*($A/100));}}}
this.getAbsWidth=function(){return aB;}
this.getRelWidth=function(){return $A;}
this.calcHeight=function(){var EC=$(UA).getStyle("height");if(EC.search(/px/)!=-1){cB=Math.floor(Number(EC.replace(/px/,"")));}
else{if(pB!=null){var FC=$(pB.getId()).getStyle("height");bB=Number(EC.replace(/%/,""));cB=Math.floor(FC*(bB/100));}}}
this.getAbsHeight=function(){return cB;}
this.getRelHeight=function(){return bB;}
this.getType=function(){return VA;}
this.getStatusName=function(AA){return Module.getStatusShortName(AA);}
this.getStatus=function(){return dB;}
this.createLayerName=function(AA,GC){var HC=this.getStatusName(AA);if(HC==""){log.error("invalid status "+AA);return "";}
var IC=GC;if(IC==null){IC=yB[AA];}
return UA+"_bdy_s"+HC+"_l"+IC;}
this.isValidLayer=function(AA,JC){var KC=AA;if(KC&&!Module.isValidModuleStatus(KC)){log.error("invalid status "+KC);return false;}
if(!KC){KC=this.getStatus();}
var LC=JC;if(!LC){LC=zB[KC];}
return true;}
this.addLayer=function(AA,MC,NC,OC,PC,QC,RC,SC,TC,UC,VC,IA,HA,WC,GA,XC,YC,ZC,$C,aD,bD,cD,dD,eD,fD,gD,hD){var iD=this.createLayerName(AA,MC);if(iD==""){log.error("could not create a layer name for status "+AA);return false;}
var jD=MC;if(HA==null){HA=JB;}
if(IA==null){IA=KB;}
if(GA==null){if(jB==null){GA=new Array(DisplayLayer.HEIGHT_REDUCED,DisplayLayer.HEIGHT_NORMAL);}
else{GA=jB;}}
if(XC==null){XC=1;}
var kD=new DisplayLayer(iD,AA,jD,NC,OC,PC,QC,RC,SC,TC,UC,VC,IA,HA,WC,GA,XC,YC,ZC,$C,aD,bD,cD,dD,eD,fD,gD,hD);if(!kD){log.error("could not add layer "+iD+" to status "+AA+" in module "+UA);return false;}
kD.setOrder(MC);kD.setParent(this);if(TC==null){if(jD==0){kD.setPredecessor(-1);}
else{kD.setPredecessor(jD-1);}}
if(UC==null){kD.setSuccessor(jD+1);}
if(VC==null){kD.setErrSuccessor(jD);}
xB[AA][iD]=kD;zB[AA]=jD;return true;}
this.getLayerByName=function(AA,lD){var mD=xB[AA][lD];if(!mD){log.warn("config panel "+lD+" was not found in module "+UA);return null;}
return mD;}
this.getLayerByIndex=function(AA,nD){var oD=UA+"_bdy_s"+this.getStatusName(AA)+"_l"+nD;var pD=xB[AA][oD];if(!pD){log.warn("display layer in status "+AA+" with index "+nD+" was not found in module "+UA);return null;}
return pD;}
this.getAllLayersByName=function(AA){var i;var qD=new Array();for(i in xB[AA]){if(xB[AA][i]==null){continue;}
if(typeof xB[AA][i]=="function"){continue;}
var rD=xB[AA][i].getId();if(rD!=null){qD.push(rD);}}
return qD;}
this.getAllLayersForStatus=function(AA){return xB[AA];}
this.getNumberOfLayers=function(AA){if(!Module.isValidModuleStatus(AA)){log.error("Status "+AA+" is not a valid status");return -1;}
return yB[AA];}
this.getCurrentLayer=function(AA){var sD;if(AA){if(Module.isValidModuleStatus(AA)){sD=AA;}
else{return null;}}
else{sD=this.getStatus();}
var tD=zB[sD];var uD=this.getLayerByIndex(sD,tD);return uD;}
this.getCurrentLayerIndex=function(AA){var vD;if(AA){if(Module.isValidModuleStatus(AA)){vD=AA;}
else{return null;}}
else{vD=this.getStatus();}
var wD=null;if(zB[vD]!=null){wD=zB[vD]}
return wD;}
this.setLayerData=function(AA,xD,yD){var zD=this.getStatusName(AA);if(zD==""){log.error("invalid status "+AA);return false;}
var AD=this.createLayerName(AA,xD);if(AD==""){log.error("could not create the layer name for status "+AA+" and layer number "+xD);return false;}
if(xB[AA][AD].fillDataArea(yD)==false){log.error("data could not be set to layer "+AD+" in status "+AA);return false;}
return true;}
this.setLayerDataDirty=function(AA,BD){var CD=AA;if(AA==null){CD=this.getStatus();}
var DD=this.getStatusName(AA);if(DD==""){log.error("invalid status "+AA);return false;}
var ED=this.createLayerName(AA,BD);if(ED==""){log.error("could not create the layer name for status "+AA+" and layer number "+BD);return false;}
if(xB[AA][ED].fillDataArea(data)==false){log.error("data could not be set to layer "+ED+" in status "+AA);return false;}
return true;}
this.switchLayerToFront=function(AA,FD,GD,HD,ID,JD,KD){var LD=AA;if(AA==null){LD=this.getStatus();}
var MD=this.createLayerName(LD,FD);if(MD==""){log.error("layer name for status "+LD+" and layer "+FD+" could not be created");return false;}
var i;var j=1;for(i in xB[LD]){if(typeof xB[LD][i]=="function"){continue;}
var ND=i;if(xB[LD][ND].getId()!=null){xB[LD][ND].deactivate(j);j++;}}
if(xB[LD][MD]!=null){if(GD!=null){switch(GD){case true:xB[LD][MD].setTemplateClean();xB[LD][MD].setDataClean();break;case false:xB[LD][MD].setTemplateDirty();xB[LD][MD].setDataDirty();break;default:}}
if(HD==null||HD==false){var OD=xB[LD][MD].getCurrentHeight();this.setHeight(OD);}
else{var PD=this.getCurrentLayer();var QD=PD.getCurrentHeightIndex();xB[LD][MD].setCurrentHeightIndex(QD);}
xB[LD][MD].activate(ID,JD,KD);switch(LD){case Module.M_SELECT:var RD=this.getBreadCrumb();if(RD){RD.render(null,false,0,FD+1);}
break;case Module.M_INACTIVE:case Module.M_CONFIG:case Module.M_ACTIVE:break;}
zB[LD]=FD;if(webPad!=null){webPad.checkControl();}}
else{log.warn("Could not find layer object for the name "+MD+" loading it");this.requestGetAll(AA,FD,null,false,ID,JD);}
return true;}
this.nextLayer=function(AA,SD){var TD=AA;if(TD==null){TD=this.getStatus();}
var UD=this.getStatusName(TD);if(UD==""){log.error("invalid status "+TD);return -1;}
var VD=this.createLayerName(TD,zB[TD]);var WD=xB[TD][VD];var XD=-1;if(SD==null||SD==false){XD=WD.getSuccessor();}
else{XD=WD.getErrSuccessor();}
if(XD==null){return -1;}
if(this.switchLayerToFront(TD,XD,false)==false){log.error("could not  layer from "+zB[TD]+" to "+XD);return -1;}
zB[TD]=XD;return XD;}
this.nextErrorLayer=function(AA){return this.nextLayer(AA,true);}
this.prevLayer=function(AA){var YD=AA;if(YD==null){YD=this.getStatus();}
var ZD=this.getStatusName(YD);if(ZD==""){log.error("invalid status "+YD);return -1;}
var $D=this.createLayerName(YD,zB[YD]);var aE=xB[YD][$D];var bE=aE.getPredecessor();if(bE==null){return -1;}
if(this.switchLayerToFront(YD,bE)==false){log.error("could not  layer from "+zB[YD]+" to "+bE);return -1;}
zB[YD]=bE;return bE;}
this.scrollLayer=function(cE,AA,dE,eE){var fE=-1;if(AA){var gE=this.getStatusName(AA);if(gE==""){log.error("invalid status "+AA);return -1;}
fE=AA;}
else{fE=this.getStatus();}
var hE=-1;if(dE){if(dE>this.displayLayerCount[fE]){log.error("invalid layer index"+dE);return -1;}
hE=dE;}
else{hE=zB[fE];}
var iE=this.getLayerByIndex(fE,hE);if(!iE){log.error("in status "+fE+" a layer with index"+hE+" could not be found");return -1;}
if(iE.isScrollLayer()==false){log.warn("layer "+dE+" in status "+AA+" of module "+UA+" is no scroll layer");return -1;}
var jE=-1;if(cE==-1){jE=iE.scrollLeft(eE);}
else{jE=iE.scrollRight(eE);}
return jE;}
this.scrollLayerRight=function(AA,kE){return this.scrollLayer(1,AA,kE);}
this.scrollLayerLeft=function(AA,lE){return this.scrollLayer(-1,AA,lE);}
this.scrollLayerTo=function(mE,AA,nE,oE){var pE=AA;if(!pE){pE=this.getStatus();}
var qE=nE;if(!qE){qE=zB[pE];}
var rE=UA+"_bdy_s"+this.getStatusName(pE)+"_l"+qE;var sE=xB[pE][rE];if(!sE.isScrollLayer()){return -1;}
var tE=sE.scrollDirectTo(mE,oE);return tE;}
this.getModulId=function(){return UA;}
this.getId=function(){return UA;}
this.setId=function(uE){if(uE==null||uE==undefined){uE=UA;}
var vE=mB.getAttribute("id");if(vE==uE){return true;}
var wE=mB;wE.setAttribute("id",uE);var xE=new RegExp(vE,"g");var yE=getLikeElements(wE,null,"id",vE);for(i=0;i<yE.length;i++){var zE=yE[i].getAttribute("id");var AE=zE.replace(xE,uE);yE[i].setAttribute("id",AE);}
var BE=new Array("onclick","onmouseover","onmouseout");var CE=new Array();var i;for(i=0;i<BE.length;i++){var DE=getLikeElements(wE,null,BE[i],null);CE=CE.concat(DE);}
var j;for(i=0;i<BE.length;i++){for(j=0;j<CE.length;j++){var EE=CE[j].getAttribute(BE[i]);if(EE==null){continue;}
if(typeof EE=="function"){var FE=EE.toString();var GE=FE.replace(xE,uE);if(GE.indexOf("toggle")!=-1){}
GE=GE.replace("function anonymous\(\)","");GE=GE.replace("^.*\{","");var HE=new Function(GE);CE[j].setAttribute(BE[i],HE);continue;}
else{var GE=EE.replace(xE,uE);CE[j].setAttribute(BE[i],GE);}}}
if(MB!=null){MB.setId(uE);}
UA=uE;return true;}
this.getNode=function(){return mB;}
this.getWebPadNode=function(){return EB;}
this.getWebPadNodeFrame=function(){return FB;}
this.getSearchPadNode=function(){return HB;}
this.setNode=function(IE){var JE=null;if(IE!=null){mB=IE;JE=document.getElementById(mB.getAttribute("id")+"_ct");}
else{JE=document.getElementById(UA);if(JE!=null){mB=JE;}
else{mB=null;log.error("DOMNode for module "+UA+" could not be found");return false;}
JE=document.getElementById(UA+"_ct");}
if(JE!=null){nB=JE;JE=document.getElementById(UA+"_b");}
else{nB=null;log.error("DOMNodeCt for module "+UA+" could not be found");return false;}
if(JE!=null){oB=JE;}
else{oB=null;}
return true;}
this.setStatusNodes=function(){var KE=new Array(Module.M_INACTIVE,Module.M_SELECT,Module.M_CONFIG,Module.M_ACTIVE);var i;for(i=0;i<KE.length;i++){var LE=document.getElementById(UA+"_bdy_s"+this.getStatusName(KE[i]));if(LE!=null){wB[KE[i]]=LE;}
else{}}}
this.setLayerNodes=function(){var ME=new Array(Module.M_INACTIVE,Module.M_SELECT,Module.M_CONFIG,Module.M_ACTIVE);var i;for(i=0;i<ME.length;i++){var j;for(j in xB[ME[i]]){if(typeof xB[ME[i]][j]=="function"){continue;}
xB[ME[i]][j].setId();xB[ME[i]][j].reset();}}}
this.setWebPadNodes=function(){var NE=UA+"_wpc";var OE=document.getElementById(NE);if(OE!=null){EB=OE;}
else{log.warn("Could not find DOM Node for webpad container");}
var NE=UA+"_wpcf";var OE=document.getElementById(NE);if(OE!=null){FB=OE;}
var NE=UA+"_spc";var OE=document.getElementById(NE);if(OE!=null){HB=OE;}
else{log.warn("Could not find DOM Node for webpad container");}}
this.setNavControlNodes=function(){var PE=new Array("cfg_ctl","del_ctl","rsz_ctl");var i;for(i=0;i<PE.length;i++){var QE=getLikeElements(mB,"div","id",PE[i]);if(QE&&QE[0]!=null){BB[PE[i]]=QE[0];}}}
this.setColumn=function(RE){sB=RE;}
this.getColumn=function(){return sB;}
this.setOrder=function(SE){tB=SE;}
this.getOrder=function(){return tB;}
this.setParent=function(TE){if(TE!=null){pB=TE;}}
this.getParentObj=function(){return pB;}
this.getParentName=function(){if(pB!=null){return pB.getId();}
return null;}
this.getParentIndex=function(){if(pB!=null){return pB.findModuleIndex(UA);}
return -1;}
this.setPos=function(wA,xA){if(wA){var UE=splitValue(wA,"px");XA=(UE[1]=="px")?UE[0]:-1;WA=(UE[1]=="%")?UE[0]:-1;this.calcPosX();}
if(xA){var UE=splitValue(xA,"px");ZA=(UE[1]=="px")?UE[0]:-1;YA=(UE[1]=="%")?UE[0]:-1;this.calcPosY();}
if(lB==true){}}
this.renderPos=function(){var VE=true;return VE;}
this.toggleHeight=function(){var WE=this.getCurrentLayer(this.getStatus());var XE=this.getCurrentLayerIndex(this.getStatus());if(WE==null){log.error("could not find current layer for toggling");return false;}
var YE=WE.getToggledHeight();var ZE=WE.getCurrentHeightIndex();if(this.setSize(null,YE,false)==true){var $E="initHeight_s"+Module.getStatusShortName(this.getStatus())+"_l"+XE;var aF={"height":ZE};aF[$E]=ZE;this.requestSetData(this.getStatus(),null,aF,null,null);return true;}
return false;}
this.setHeight=function(zA,bF){return this.setSize(null,zA,bF);}
this.setHeightIndex=function(AA,cF,dF,eF){if(AA==null){AA=this.getStatus();}
if(cF==null){cF=this.getCurrentLayerIndex(this.getStatus());}
else{if(!this.isValidLayer(AA,cF)){log.error("invalid layer "+cF+" in status "+AA);return false;}}
if(dF==null){dF=1;}
var fF=this.getLayerByIndex(AA,cF);if(fF==null||fF.setCurrentHeightIndex(dF)==false){log.error("could not set height index for status "+AA+" and layer "+cF+" to "+dF);return false;}
if(AA==this.getStatus()&&cF==this.getCurrentLayerIndex(this.getStatus())){var zA=fF.getCurrentHeight();this.setHeight(zA,eF);}
return true;}
this.setSize=function(yA,zA,gF){var hF=0;var iF=56;if(YB==false){iF-=28;}
if(ZB==false){iF-=28;}
var jF=400;if(yA){var kF=splitValue(yA,"px");if(kF[1]=="%"){$A=kF[0];}
else{aB=kF[0];}}
var lF=-1;if(zA){var kF=splitValue(zA,"px");if(kF[1]=="%"){if(bB==kF[0]){return false;}
bB=kF[0];}
else{if(cB<kF[0]){lF=1;}
if(cB==kF[0]){return false;}
cB=kF[0];}}
if(lB==true){if(gF==true){if(oB!=null){setElementStyle(oB,"height",(cB-iF)+"px");}
setElementStyle(mB,"height",(cB+hF)+"px");if(pB!=null){pB.calcModuleThreshY();}
if(currentPage!=null){currentPage.adaptHeight(true);}}
else{if(lF==1){if(pB!=null){pB.calcModuleThreshY();}
if(currentPage!=null){currentPage.adaptHeight(true);}}
if(oB!=null){var mF=new Fx.Style(oB.getAttribute("id"),'height',{duration:jF,transition:Fx.Transitions.Sine.easeOut});mF.start((cB-iF));}
var me=this;var nF=new Fx.Style(UA,'height',{duration:jF,transition:Fx.Transitions.Sine.easeOut});nF.start((cB+hF)).chain(function(){if(lF==-1){if(pB!=null){pB.calcModuleThreshY();}
if(currentPage!=null){currentPage.adaptHeight(true);}}});}}
return true;}
this.renderSize=function(){var oF=true;if(mB.style){if($A!=-1){if(!globalSetStyle(mB,"width",$A+"%")){log.error("could not set style for _relWidth");oF=false;}}
else if(aB!=-1){if(!globalSetStyle(mB,"width",aB+"px")){log.error("could not set style for _absWidth");oF=false;}}
if(bB!=-1){if(!globalSetStyle(mB,"height",bB+"%")){log.error("could not set style for _relHeight");oF=false;}}
else if(cB!=-1){if(!globalSetStyle(mB,"height",cB+"px")){log.error("could not set style for _absHeight");oF=false;}}
oF=true;}
return oF;}
this.setToVisible=function(){return this.setVisibility(Module.M_VISIBLE);}
this.setToInvisible=function(){return this.setVisibility(Module.M_INVISIBLE);}
this.setToHidden=function(){return this.setVisibility(Module.M_HIDDEN);}
this.setVisibility=function(pF){if(pF){switch(pF){case Module.M_VISIBLE:eB=Module.M_VISIBLE;break;case Module.M_INVISIBLE:eB=Module.M_INVISIBLE;break;case Module.M_HIDDEN:eB=Module.M_HIDDEN;break;default:log.error("invalid parameter "+pF+" for given visibility attribute");return false;}}
if(lB==true){var qF="";var rF="";switch(eB){case Module.M_VISIBLE:qF="block";rF="visible";break;case Module.M_INVISIBLE:qF="block";rF="hidden";break;case Module.M_HIDDEN:qF="none";rF="hidden";break;default:log.error("invalid parameter "+eB+" for set visibility attribute");return false;}
if(!globalSetStyle(mB,"display",qF)){log.error("could not set style for display to "+qF);ret_code=false;}
if(!globalSetStyle(mB,"visibility",rF)){log.error("could not set style for visibility to "+rF);ret_code=false;}}
return true;}
this.setStatusToActive=function(sF,tF){return this.setStatus(Module.M_ACTIVE,sF,tF);}
this.setStatusToInactive=function(uF,vF){return this.setStatus(Module.M_INACTIVE,uF,vF);}
this.setStatusToConfig=function(wF,xF){return this.setStatus(Module.M_CONFIG,wF,xF);}
this.setStatusToSelect=function(yF,zF){return this.setStatus(Module.M_SELECT,yF,zF);}
this.setStatus=function(AA,AF,BF){if(BF==null){BF=false;}
if(AA){switch(AA){case Module.M_INACTIVE:dB=Module.M_INACTIVE;break;case Module.M_SELECT:dB=Module.M_SELECT;break;case Module.M_ACTIVE:dB=Module.M_ACTIVE;break;case Module.M_CONFIG:dB=Module.M_CONFIG;break;default:log.error("invalid parameter "+AA+" for status property");return false;}}
if(lB==true){var CF=new Array();CF[Module.M_INACTIVE]="none";CF[Module.M_ACTIVE]="none";CF[Module.M_SELECT]="none";CF[Module.M_CONFIG]="none";switch(dB){case Module.M_INACTIVE:CF[Module.M_INACTIVE]="block";if(webPad!=null&&webPad.isHooked()){var DF=webPad.getHookedModuleId();if(DF==UA){webPad.releaseModule();}
if(searchPad!=null&&searchPad.isHooked()){var DF=searchPad.getHookedModuleId();if(DF==UA){searchPad.releaseModule();}}}
var EF={"cfg_ctl":1,"rsz_ctl":1,"del_ctl":1};this.checkNavControls(EF);this.setNavControl("cfg_ctl",false);this.setNavControl("del_ctl",false);this.showTagLine();if(MB!=null){MB.hide();}
setZIndex(mB,20);if(pB!=null&&!pB.isStickyZ()){setZIndex(pB.getNode(),20);}
break;case Module.M_SELECT:CF[Module.M_SELECT]="block";if(webPad!=null&&!webPad.isHooked()){webPad.hookModule(this);}
if(searchPad!=null){if(!searchPad.isHooked()){searchPad.hookModule(this);}
if(this.getAllowSearch()){webPad.showControl("MORE");}
else{webPad.hideControl("MORE");}}
var EF={"cfg_ctl":1,"rsz_ctl":0,"del_ctl":1};this.checkNavControls(EF);this.setNavControl("cfg_ctl",true);this.setNavControl("del_ctl",true);this.hideTagLine();if(MB!=null){MB.show();}
setZIndex(mB,100);if(pB!=null&&!pB.isStickyZ()){setZIndex(pB.getNode(),100);}
break;case Module.M_ACTIVE:CF[Module.M_ACTIVE]="block";if(webPad!=null&&webPad.isHooked()){var DF=webPad.getHookedModuleId();if(DF==UA){webPad.releaseModule();}
if(searchPad!=null&&searchPad.isHooked()){var DF=searchPad.getHookedModuleId();if(DF==UA){searchPad.releaseModule();}}}
var EF={"cfg_ctl":1,"rsz_ctl":1,"del_ctl":1};this.checkNavControls(EF);this.setNavControl("cfg_ctl",false);this.setNavControl("del_ctl",false);this.showTagLine();if(MB!=null){MB.hide();}
setZIndex(mB,20);if(pB!=null&&!pB.isStickyZ()){setZIndex(pB.getNode(),20);}
break;case Module.M_CONFIG:CF[Module.M_CONFIG]="block";if(webPad!=null&&!webPad.isHooked()){webPad.hookModule(this);}
if(searchPad!=null){if(!searchPad.isHooked()){searchPad.hookModule(this);}
this.hideSearchPad();webPad.hideControl("MORE");}
var EF={"cfg_ctl":1,"rsz_ctl":0,"del_ctl":1};this.checkNavControls(EF);this.setNavControl("cfg_ctl",true);this.setNavControl("del_ctl",true);this.showTagLine();if(MB!=null){MB.hide();}
setZIndex(mB,100);if(pB!=null&&!pB.isStickyZ()){setZIndex(pB.getNode(),100);}
break;default:log.error("invalid parameter "+dB+" for status property");return false;}
var i;for(i=0;i<CF.length;i++){if(CF[i]==""||CF[i]==null){continue;}
if(wB[i]!=null){if(!setElementStyle(wB[i],"display",CF[i])){log.error("could not set style for element");return false;}}}
if(AF!=null){this.switchLayerToFront(dB,AF,BF);}
else{if(dB==Module.M_INACTIVE||dB==Module.M_ACTIVE||dB==Module.M_CONFIG){var FF={"status":dB};this.requestSetData(dB,null,FF,null,null);var GF=this.getCurrentLayer(dB);if(GF!=null){var HF=GF.getTagLineType();if(HF=="static"){this.setTagLine(GF.getTagLine(),GF.getTagLineLink());}}}}}
return true;}
this.handleConfigButton=function(){var IF=this.getStatus();switch(IF){case Module.M_INACTIVE:break;case Module.M_SELECT:break;case Module.M_CONFIG:break;case Module.M_ACTIVE:break;default:break;}}
this.setStatusTemplate=function(AA,JF,KF){var LF=wB[AA];if(LF==null){log.error("could not find status container for Status "+AA);return false;}
LF.innerHTML=JF;if(KF!=null&&KF!=""){this.setScript(AA,KF);}}
this.setScript=function(AA,MF){var NF=this.getServiceId();var OF=0;var PF=navigator.userAgent;if(PF.indexOf("Safari")!=-1){var QF=eval(MF);}
else{var RF=NF+"_s"+Module.getStatusShortName(AA);var SF=document.getElementById(RF);if(SF!=null){document.getElementsByTagName("head")[0].removeChild(SF);}
var e=document.createElement("script");e.setAttribute("id",RF);e.text=MF;e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);}}
this.setStatusData=function(AA,TF){}
this.setTagLine=function(UF,VF,WF){if(UF==null){return true;}
var XF=UA+"_hdr_tgl";var YF=$(XF);if(YF!=null){if(VF&&VF!=""){var ZF=/^\{(.+?)\}$/;var $F=ZF.exec(VF);if($F!=null){WF=prepareAction($F[1]);VF="";}}
var aG="";if((VF==""||VF==null||VF=="undefined"||VF=="none")&&(WF==""||WF==null||WF=="undefined")){aG=UF;}
else{var bG="";if(VF!=""&&VF!="none"){bG=" target=_new href=\""+VF+"\"";}
else{bG=" href=\"#\"";}
var cG="";if(WF!=""){cG=" onclick=\""+WF+"\"";}
aG="<a"+bG+cG+">"+UF+"</a>";}
YF.setHTML(aG);return true;}
return false;}
this.showTagLine=function(){var dG=UA+"_hdr_tgl";var eG=document.getElementById(dG);if(eG!=null){setElementStyle(eG,"visibility","visible");}}
this.hideTagLine=function(){var fG=UA+"_hdr_tgl";var gG=document.getElementById(fG);if(gG!=null){setElementStyle(gG,"visibility","hidden");}}
this.setHeaderText=function(hG,iG){var jG="m";switch(iG){case "LEFT":jG="l";break;case "MID":jG="m";break;default:return false;}
var kG=UA+"_hdr_"+jG;var lG=document.getElementById(kG);if(!lG){log.error("could not find header node "+kG);return false;}
lG.innerHTML=hG;return true;}
this.hideNavControl=function(mG){var nG=BB[mG];if(nG!=null){setElementStyle(nG,"visibility","hidden");setElementStyle(nG,"display","none");}}
this.showNavControl=function(oG){var pG=BB[oG];if(pG!=null){setElementStyle(pG,"display","block");setElementStyle(pG,"visibility","visible");}}
this.setNavControl=function(qG,rG){var sG=this.getId()+"_"+qG+"_a";var tG=this.getId()+"_"+qG+"_i";var uG=document.getElementById(sG);var vG=document.getElementById(tG);if(rG==true){if(uG!=null){setElementStyle(uG,"display","block");setElementStyle(uG,"visibility","visible");}
if(vG!=null){setElementStyle(vG,"display","none");setElementStyle(vG,"visibility","hidden");}}
else{var wG=this.getStatus();if(wG!=Module.M_SELECT&&wG!=Module.M_CONFIG){if(uG!=null){setElementStyle(uG,"display","none");setElementStyle(uG,"visibility","hidden");}
if(vG!=null){setElementStyle(vG,"display","block");setElementStyle(vG,"visibility","visible");}}}}
this.hideNav=function(xG){var yG;if(xG==null){yG=new Array("hdr_nav","ftr_nav");}
else{yG=new Array(xG);}
var i;for(i=0;i<yG.length;i++){var zG=document.getElementById(UA+"_"+yG[i]);if(zG!=null){globalSetStyle(zG,"visibility","hidden");globalSetStyle(zG,"display","none");}}}
this.showNav=function(AG){var BG;if(AG==null){BG=new Array("hdr_nav","ftr_nav");}
else{BG=new Array(AG);}
var i;for(i=0;i<BG.length;i++){var CG=document.getElementById(UA+"_"+BG[i]);if(CG!=null){globalSetStyle(CG,"visibility","visible");globalSetStyle(CG,"display","block");}}}
this.showWebPad=function(DG){if(GB==false&&(bC==true||UA=="m_idAdder")){this.calcWidth();if(EB!=null){var EG=getElementStyle(EB,"width","width");var FG=new Number(EG.replace(/px/,""));var GG=getElementStyle(EB,"left","left");var HG=new Number(GG.replace(/px/,""));var IG=0-FG+12;if(DG==true){setElementStyle(EB,"right",IG);setElementStyle(EB,"visibility","visible");setElementStyle(EB,"display","block");}
else{setElementStyle(EB,"right",IG);setElementStyle(EB,"visibility","visible");setElementStyle(EB,"display","block");}
GB=true;if(RB==false){webPad.hideControl("MORE");}
else{webPad.showControl("MORE");}}
else{}}}
this.hideWebPad=function(JG){this.hideSearchPad(JG);if(EB!=null){var KG=getElementStyle(EB,"width","width");if(!KG){log.warn("no width style!");return;}
var LG=new Number(KG.replace(/px/,""));var MG=0;if(JG==true){setElementStyle(EB,"visibility","hidden");setElementStyle(EB,"right",MG);}
else{setElementStyle(EB,"visibility","hidden");setElementStyle(EB,"right",MG);}
GB=false;}}
this.toggleWebPad=function(NG){if(EB!=null){if(GB==false){this.showWebPad(NG);}
else{this.hideWebPad(NG);}}}
this.showSearchPad=function(OG){if(IB==false){this.hideWebPad();this.calcWidth();if(HB!=null){var PG=getElementStyle(HB,"width","width");var QG=new Number(PG.replace(/px/,""));var RG=getElementStyle(HB,"right","right");var SG=new Number(RG.replace(/px/,""));var TG=0-QG+12;if(OG==true){setElementStyle(HB,"right",TG);setElementStyle(HB,"visibility","visible");setElementStyle(HB,"display","block");}
else{setElementStyle(HB,"right",TG);setElementStyle(HB,"visibility","visible");setElementStyle(HB,"display","block");}
IB=true;SB=this.getCurrentLayerIndex(Module.M_SELECT);this.switchLayerToFront(Module.M_SELECT,0,true);}}}
this.hideSearchPad=function(UG){if(HB!=null){var VG=getElementStyle(EB,"height","height");var WG=getElementStyle(HB,"top","top");if(!VG){log.warn("no height style!");return;}
var XG=0;var YG=Number(VG.replace(/px/,""))+2;if(UG==true){setElementStyle(HB,"visibility","hidden");}
else{setElementStyle(HB,"visibility","hidden");}
IB=false;if(searchPad!=null){if(webPad.isHooked()==true&&searchPad.isHooked()==true){var ZG=this.getLayerByIndex(Module.M_SELECT,SB);if(ZG!=null&&this.getStatus()==Module.M_SELECT){this.switchLayerToFront(Module.M_SELECT,SB,false);}}}}}
this.toggleSearchPad=function($G){if(HB!=null){var aH=getElementStyle(HB,"top","top");if(aH=="1px"){this.showSearchPad($G);}
else{this.hideSearchPad($G);}}}
this.isSearchPadActive=function(){return IB;}
this.toString=function(bH){var cH="<br>";var dH="<pre>";var eH="</pre>";if(bH=="TEXT"){cH="\n";dH="\n";eH="\n";}
var fH="";var i;fH+=dH;fH+="ID    : "+UA+cH;fH+="RELPOS XY: "+WA+","+YA+cH;fH+="ABSPOS XY: "+XA+","+ZA+cH;fH+="COLUMN: "+this.getParentName()+cH;fH+="ORDER : "+this.getParentIndex()+cH;fH+="RELHEIGHT: "+bB+cH;fH+="ABSHEIGHT: "+cB+cH;fH+="RELWIDTH: "+$A+cH;fH+="ABSWIDTH: "+aB+cH;fH+="STATUS: "+dB+cH;fH+="VISIBLE: "+eB+cH;fH+="DRAGABLE: "+fB+cH;fH+="RESIZEABLE: "+gB+cH;fH+="CONFIGURABLE: "+hB+cH;fH+="DELETEABLE: "+iB+cH;fH+="ALLOWEHEIGHTS: "+jB+cH;fH+="IMMEDIATEQUEUE: "+JB+cH;fH+="TIMEDQUEUE: "+KB+cH;fH+="WITHBREADCRUMB: "+LB+cH;switch(dB){case Module.M_INACTIVE:fH+="STATUS: INACTIVE"+cH;break;case Module.M_ACTIVE:fH+="STATUS: ACTIVE"+cH;break;case Module.M_CONFIG:fH+="STATUS: CONFIG"+cH;break;case Module.M_SELECT:fH+="STATUS: SELECT"+cH;break;default:fH+="STATUS: UNKNOWN"+cH;break;}
fH+=eH;return fH;}
this.requestGetGeneralData=function(AA,gH,hH,iH,jH,kH,lH){if(jH==null){log.error("invalid request type");return false;}
switch(jH){case Request.RT_GETDAT:break;case Request.RT_GETTPL:break;case Request.RT_GETALL:break;default:log.error("invalid Request type "+jH);return false;}
var mH=AA;if(mH==null){mH=this.getStatus();}
var nH=gH;var oH=this.getLayerByIndex(mH,nH);if(nH==null||oH==null){var pH=UA;var qH=UA;if(mH==Module.M_SELECT&&UA!="m_idAdder"){qH="m_idAdder";}
var rH=findParaInData(hH,"clearcache");var sH=new Request(qH,null,jH,mH,nH,hH,0,2,2,pH,kH,lH,null,rH);if(JB!=null){return JB.addRequest(sH);}
else{log.error("no queue defined to add the request");return false;}}
else{var oH=this.getLayerByIndex(mH,nH);if(oH){kH=this.findActionValues(mH,nH,kH,"rsuccess");lH=this.findActionValues(mH,nH,lH,"rfailure");return oH.requestGetData(iH,hH,jH,kH,lH);}
else{log.error("layer with index "+nH+","+nH+" does not exist in module "+UA);}}}
this.requestGetTemplate=function(AA,tH,uH,vH,wH,xH){return this.requestGetGeneralData(AA,tH,uH,vH,Request.RT_GETTPL,wH,xH);}
this.requestGetData=function(AA,yH,zH,AH,BH,CH){return this.requestGetGeneralData(AA,yH,zH,AH,Request.RT_GETDAT,BH,CH);}
this.requestGetAll=function(AA,DH,EH,FH,GH,HH){return this.requestGetGeneralData(AA,DH,EH,FH,Request.RT_GETALL,GH,HH);}
this.requestSetData=function(AA,IH,JH,KH,LH){if(IH!=null){var MH=this.getLayerByIndex(AA,IH);if(MH==null){log.error("could not find layer "+IH+" in status "+AA);return false;}
MH.requestSetData(KH,LH);}
else{var NH=findParaInData(JH,"clearcache");var OH=new Request(UA,null,Request.RT_SETDAT,null,null,JH,0,2,2,UA,KH,LH,null,NH);if(JB!=null){return JB.addRequest(OH);}
else{log.error("no queue defined to add the request");return false;}}
return true;}
this.handleSetData=function(PH){}
this.getInputData=function(AA,QH){var RH=null;if(!AA){RH=this.getStatus();}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status "+AA);return false;}
RH=AA;}
var SH=null;if(!QH){SH=this.getCurrentLayer(RH);}
else{if(!this.isValidLayer(QH)){log.error("invalid layer -2"+QH);return false;}
SH=this.getLayerByIndex(RH,QH);}
SH.getInputData();var TH="";return true;}
this.getInputDataMap=function(AA,UH){var VH=null;if(!AA){VH=this.getStatus();}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status "+AA);return null;}
VH=AA;}
var WH=null;if(!UH){WH=this.getCurrentLayer(VH);}
else{if(!this.isValidLayer(UH)){log.error("invalid layer -1"+UH);return null;}
WH=this.getLayerByIndex(VH,UH);}
return WH.getInputDataMap();}
this.getInputDataElement=function(XH,AA,YH){var ZH=this.findStatusAndLayer(AA,YH);if(ZH==null){return null;}
AA=ZH["status"];YH=ZH["layer"];var $H=this.getLayerByIndex(AA,YH);if($H==null){return null;}
var aI=$H.getInputDataElement(XH);return aI;}
this.setInputDataElement=function(bI,AA,cI){var dI=true;var eI=this.findStatusAndLayer(AA,cI);if(eI==null){return false;}
AA=eI["status"];cI=eI["layer"];var fI=this.getLayerByIndex(AA,cI);if(fI==null){dI=false;}
if(!fI.setInputDataElement(bI)){dI=false;}
return dI;}
this.findStatusAndLayer=function(AA,gI){var hI=new Array();hI["return"]=false;if(AA==null){hI["status"]=this.getStatus();}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status "+AA);hI=null;}
else{hI["status"]=AA;}}
if(gI==null){hI["layer"]=this.getCurrentLayerIndex(hI["status"]);}
else{if(!this.isValidLayer(gI)){log.error("invalid layer 0"+gI);hI=null;}
else{hI["layer"]=gI;}}
return hI;}
this.checkInputData=function(AA,iI){var jI=null;if(!AA){jI=this.getStatus();}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status "+AA);return false;}
jI=AA;}
var kI=null;if(!iI){kI=this.getCurrentLayer(jI);}
else{if(!this.isValidLayer(iI)){log.error("invalid layer 1"+iI);return false;}
kI=this.getLayerByIndex(jI,iI);}
var lI=kI.checkInputData();return lI;}
this.checkResponseErrors=function(AA,mI){var nI=null;if(!AA){AA=this.getStatus();}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status a"+AA);return false;}}
var oI=null;if(!mI){oI=this.getCurrentLayer(AA);}
else{if(!this.isValidLayer(AA,mI)){log.error("invalid layer a "+mI);return false;}
oI=this.getLayerByIndex(AA,mI);}
var pI=oI.checkResponseErrors();return pI;}
this.saveData=function(AA,qI){var rI=null;if(!AA){rI=this.getStatus();}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status "+AA);return false;}
rI=AA;}
var sI=null;if(!qI){sI=this.getCurrentLayer(rI);}
else{if(!this.isValidLayer(qI)){log.error("invalid layer 3"+qI);return false;}
var tI=qI;sI=this.getLayerByIndex(rI,tI);}
return sI.requestSetData();}
this.saveConfigData=function(uI){return this.saveData(Module.M_CONFIG,tmpLayer);}
this.saveSelectData=function(vI){return this.saveData(Module.M_SELECT,tmpLayer);}
this.handleResponse=function(wI){if(UA=="m_idTagcloud"){}
if(wI==null||wI.getType()!="response"){log.error("bad response for module "+UA);return false;}
if(wI.getModuleSrcId()!=UA){log.error("received response for another module "+wI.getModuleSrcId());return false;}
if(!Request.isValidRequestType(wI.getRequestType())){log.error("invalid requesttype "+wI.getRequestType()+" received in module "+UA);return false;}
var xI=wI.getModuleLayer();var yI=wI.getModuleStatus();var zI=null;if(yI!=null&&xI!=null){zI=this.getLayerByIndex(yI,xI);if(zI==null){log.warn("could not find the status,layer "+yI+","+xI+" for the response");this.setScript(AA,wI.getPara("script"));zI=this.getLayerByIndex(yI,xI);if(zI==null){return false;}
var AI=zI.handleResponse(wI);this.switchLayerToFront(yI,xI,true);return AI;}
else{var AI=zI.handleResponse(wI);return AI;}}
if(yI!=null&&xI==null){switch(wI.getPara("requesttype")){case Request.RT_GETTPL:var BI=navigator.userAgent;if(BI.indexOf("Firefox/2.0.0.2")!=-1){var CI="Action.handleActions(\""+wI.getPara("successaction")+"\");";this.setStatusTemplate(yI,wI.getPara("tpl"),wI.getPara("script")+";"+CI);}
else{this.setStatusTemplate(yI,wI.getPara("tpl"),wI.getPara("script"));}
break;case Request.RT_GETDAT:this.setStatusData(yI,wI.getPara("data"));break;case Request.RT_GETALL:this.setStatusTemplate(yI,wI.getPara("tpl"),wI.getPara("script"));break;default:log.error("invalid request type for status "+yI+" : "+wI.getPara("requesttype"));return false;}}
else{if(wI.getStatus()=="1"){switch(wI.getPara("requesttype")){case Request.RT_ADDMOD:Module.handleAddModule(wI,this);break;case Request.RT_CHGSVC:Module.handleChangeService(wI);break;case Request.RT_LOGIN:this.handleLogin(wI);break;case Request.RT_LOGOUT:this.handleLogout(wI);break;case Request.RT_REGUSR:this.handleRegisterUser(wI);break;case Request.RT_SNDLOG:this.handleForgotLogin(wI);break;case Request.RT_SNDPWD:this.handleForgotPw(wI);break;case Request.RT_CHGUDT:this.handleChangeUserData(wI);break;case Request.RT_REMMOD:this.handleDeleteModule(wI);return;case Request.RT_MOVMOD:this.handleMoveModule(wI);break;case Request.RT_SETDAT:this.handleSetData(wI);break;case Request.RT_GETPRVDAT:this.handleGetPrivData(wI);break;case Request.RT_SEARCH:SearchPad.handleResponse(wI);break;case Request.RT_SNDFF:this.handleSendFF(wI);break;default:log.error("invalid request type for "+wI.getPara("requesttype"));break;}}}
if(wI.getStatus()=="0"||wI.getStatus()=="2"){log.error("RECEIVED response with error "+wI.getStatus()+" ("+wI.getStatusMessage()+")");if(yI==null){yI=this.getStatus();}
if(xI==null){xI=this.getCurrentLayerIndex(yI);}
zI=this.getLayerByIndex(yI,xI);if(zI!=null){var DI=zI.getErrorControl();if(DI!=null){DI.purgeMessageData();DI.addErrorMessage(wI.getStatusMessage());}
zI.notifyResponseError(wI);}
var EI=wI.getPara("erroraction");if(EI!=null&&EI!=""){Action.handleActions("scopeModule(\""+UA+"\"); "+EI);}
else{Action.handleActions("scopeModule(\""+UA+"\"); checkResponseErrors(); showErrors();");}
return true;}
var FI=wI.getPara("successaction");if(FI!=""&&FI!=null){var BI=navigator.userAgent;if(BI.indexOf("Firefox/2.0.0.2")==-1||wI.getPara("requesttype")!=Request.RT_GETTPL){Action.handleActions(FI);}}
if(webPad!=null&&wI.getPara("requesttype")!="setData"){webPad.checkControl();}}
this.handleTimeOut=function(GI){}
this.handleMissedResponse=function(HI){}
this.requestSelectService=function(II,JI,KI,LI){if(LI==null){LI=false;}
if(CB==II&&LI==false){this.setStatus(TB,UB,false);return true;}
var MI="";var NI=null;var OI=null;var PI=null;var QI=this.getParentName();if(UA!="m_idAdder"){tmpId=this.getId();MI=Request.RT_CHGSVC;OI={"serviceid":II,"parentid":QI,"position":KI,"path":JI};}
else{tmpId="m_idAdder";MI=Request.RT_ADDMOD;OI={"serviceid":II,"parentid":QI,"position":KI,"path":JI};}
KI=0;var RI=new Request(tmpId,null,MI,null,null,OI,0,2,2,null,null,null,null);if(!JB.addRequest(RI)){log.error("could not add the request "+RI.getId()+" to the immediate queue");return false;}
CB=II;return true;}
this.selectService=function(SI,TI,UI,VI,WI,XI,YI){return this.requestSelectService(SI,TI,UI,VI,WI,XI,YI);}
this.setImmediateQueue=function(ZI){JB=ZI;}
this.setTimedQueue=function($I){KB=$I;}
this.renderCrumb=function(){if(MB!=null){var aJ=0;var bJ=0;var cJ=this.getStatus();var dJ=this.getCurrentLayerIndex(Module.M_SELECT);var eJ=this.getCurrentLayerIndex(Module.M_CONFIG);if(cJ==Module.M_CONFIG){var fJ=dJ+eJ+1;MB.render();}
else{MB.render();}}}
this.requestRegisterUser=function(gJ,pw,hJ,iJ,jJ,kJ,lJ){var mJ=this.getStatus();var nJ=this.getCurrentLayerIndex(mJ);kJ=this.findActionValues(mJ,nJ,kJ,"rsuccess");lJ=this.findActionValues(mJ,nJ,lJ,"rfailure");var oJ=hex_md5(pw);var pJ={"login":gJ,"pw":oJ,"pwconfirm":oJ,"email":hJ,"sec_quest":iJ,"sec_ans":jJ};var qJ=new Request(this.getId(),null,Request.RT_REGUSR,null,null,pJ,0,null,null,null,kJ,lJ);if(!JB.addRequest(qJ)){log.error("could not add the request "+qJ.getId()+" to the immediate queue");return false;}
return true;}
this.handleRegisterUser=function(rJ){userLoggedIn=true;notifyModules(null,1);}
this.requestLogin=function(sJ,pw,tJ,uJ){var vJ=this.getStatus();var wJ=this.getCurrentLayerIndex(vJ);tJ=this.findActionValues(vJ,wJ,tJ,"rsuccess");uJ=this.findActionValues(vJ,wJ,uJ,"rfailure");var xJ=hex_md5(pw);var yJ={"login":sJ,"pw":xJ,"force":"true"};var zJ=new Request(this.getId(),null,Request.RT_LOGIN,null,null,yJ,0,null,null,null,tJ,uJ);if(!JB.addRequest(zJ)){log.error("could not add the request "+zJ.getId()+" to the immediate queue");return false;}
return true;}
this.handleLogin=function(AJ){userLoggedIn=true;Action.reload();}
this.requestLogout=function(BJ,CJ,DJ){var EJ=this.getStatus();var FJ=this.getCurrentLayerIndex(EJ);if(CJ==null){CJ=this.findActionValues(EJ,FJ,CJ,"rsuccess");}
if(DJ==null){DJ=this.findActionValues(EJ,FJ,CJ,"rfailure");}
if(BJ==null){BJ=0;}
if(BJ!=0&&BJ!=1){BJ=0;}
var GJ={"hard":BJ};if(BJ==1){if(!CJ){CJ="";}
CJ+="reload();";}
var HJ=new Request(this.getId(),null,Request.RT_LOGOUT,null,null,GJ,0,2,2,null,CJ,DJ);if(!JB.addRequest(HJ)){log.error("could not add the request "+HJ.getId()+" to the immediate queue");return false;}
return true;}
this.handleLogout=function(IJ){userLoggedIn=false;notifyModules(null,0);var JJ=IJ.getPara("successaction");Action.handleActions(JJ);}
this.requestForgotPw=function(KJ,LJ,MJ,NJ,OJ){var PJ=this.getStatus();var QJ=this.getCurrentLayerIndex(PJ);NJ=this.findActionValues(PJ,QJ,NJ,"rsuccess");OJ=this.findActionValues(PJ,QJ,OJ,"rfailure");var RJ={"login":KJ,"sec_quest":LJ,"sec_ans":MJ};var SJ=new Request(this.getId(),null,Request.RT_SNDPWD,null,null,RJ,0,null,null,null,NJ,OJ);if(!JB.addRequest(SJ)){log.error("could not add the request "+SJ.getId()+" to the immediate queue");return false;}
return true;}
this.handleForgotPw=function(TJ){var UJ=TJ.getPara("successaction");Action.handleActions(UJ);}
this.requestForgotLogin=function(VJ,WJ,XJ){var YJ=this.getStatus();var ZJ=this.getCurrentLayerIndex(YJ);WJ=this.findActionValues(YJ,ZJ,WJ,"rsuccess");XJ=this.findActionValues(YJ,ZJ,XJ,"rfailure");var $J={"email":VJ};var aK=new Request(this.getId(),null,Request.RT_SNDLOG,null,null,$J,0,null,null,null,WJ,XJ);if(!JB.addRequest(aK)){log.error("could not add the request "+aK.getId()+" to the immediate queue");return false;}
return true;}
this.handleForgotLogin=function(bK){var cK=bK.getPara("successaction");Action.handleActions(cK);}
this.requestChangeUserData=function(dK,eK,fK,gK,hK,iK,jK){var kK=this.getStatus();var lK=this.getCurrentLayerIndex(kK);iK=this.findActionValues(kK,lK,iK,"rsuccess");jK=this.findActionValues(kK,lK,jK,"rfailure");var mK=hex_md5(dK);var nK=hex_md5(eK);var oK={"oldpw":mK,"newpw":nK,"email":fK,"sec_quest":gK,"sec_ans":hK};var pK=new Request(this.getId(),null,Request.RT_CHGUDT,null,null,oK,0,null,null,null,iK,jK);if(!JB.addRequest(pK)){log.error("could not add the request "+pK.getId()+" to the immediate queue");return false;}
return true;}
this.handleChangeUserData=function(qK){var rK=qK.getPara("successaction");Action.handleActions(rK);}
this.notifyLogin=function(){var sK=this.getStatus();var tK=this.getCurrentLayer(sK);if(tK!=null){if(tK.checkPriv()==false){tK.setPrivBox(true);}
else{tK.cleanRequests();tK.hideErrorBoxes();tK.setPrivBox(false);tK.autoUpdateStart();}}}
this.notifyLogout=function(){var uK=this.getStatus();var vK=this.getCurrentLayer(uK);if(vK!=null){if(vK.checkPriv()==false){vK.setPrivBox(true);vK.cleanRequests();}
else{vK.setPrivBox(false);}}}
this.startAutoUpdate=function(){var wK=this.getStatus();var xK=this.getCurrentLayer(wK);if(xK){xK.autoUpdateStart();}}
this.stopAutoUpdate=function(){var yK=this.getStatus();var zK=this.getCurrentLayer(yK);if(zK){zK.autoUpdateStop();}}
this.getCurrentActionValuesArray=function(AA,AK){if(AA==null){AA=this.getStatus();}
if(AA==null){log.error("invalid status in module "+UA+". Cant intiate action");return false;}
if(AK==null){AK=this.getCurrentLayerIndex(AA);}
if(AK==null){log.error("invalid layer for status "+AA+" in module "+UA+". Cant initiate action");return false;}
return AB[AA][AK];}
this.doAction=function(AA,BK){if(AA==null){AA=this.getStatus();}
if(AA==null){log.error("invalid status in module "+UA+". Cant intiate action");return false;}
if(BK==null){BK=this.getCurrentLayerIndex(AA);}
if(BK==null){log.error("invalid layer for status "+AA+" in module "+UA+". Cant initiate action");return false;}
var CK=this.getLayerByIndex(AA,BK);if(CK==null){log.error("could not find layer "+BK+" in status "+AA+" in module "+UA);return false;}
var DK=CK.getSelector();var EK=null;if(DK!=null){DK.setSelectableNodes();if(DK.getPos()==-1){DK.setPos(0);}
DK.selectObj();DK.cleanDirtySelection();EK=DK.getActionValues();}
if(EK==null){EK=CK.getActionValues();}
AB[AA][BK]=EK;var FK=false;if(EK["action"]!=null){FK=Action.handleActions(EK["action"]);}
if(FK==false){if(EK["failure"]!=null){FK=Action.handleActions(EK["failure"]);}
else{FK=true;}}
else{if(EK["failure"]!=null){FK=Action.handleActions(EK["success"]);}
else{FK=true;}}
return FK;}
this.findActionValues=function(AA,GK,HK,IK){if(HK==null){if(AB[AA][GK]){HK=AB[AA][GK][IK];}}
return HK;}
this.reset=function(JK){if(JK!=null){this.setNode(JK);}
else{this.setNode();}
this.setStatusNodes();this.setLayerNodes();this.setNavControlNodes();this.setWebPadNodes();if(LB==true){this.getBreadCrumb().setId(UA+"_hdr_bcr");}}
this.remove=function(){if(pB!=null){pB.removeModule(UA);}}
this.del=function(KK){if(this.getId()=="m_idLogin"){return false;}
if(webPad.getHookedModuleId()==this.getId()){webPad.releaseModule();searchPad.releaseModule();}
if(this.getId()=="m_idAdder"){if(this.getParentObj().removeModule(UA)==null){log.error("DOM Remove of module failed");return false;}
this.setToInvisible();this.setStatusToInactive(0);this.setSelectPath("",1,true);this.setServiceId("");}
else{this.requestDeleteModule(KK);}
return true;}
this.requestDeleteModule=function(LK){this.cleanRequests();var MK=new Request(UA,null,Request.RT_REMMOD,null,null,null,0,2,2,null,null,null);if(JB!=null){return JB.addRequest(MK);}
else{log.error("no queue defined to add the request");return false;}
delete mods[this.getId()];return true;}
this.handleDeleteModule=function(NK){if(this.getParentObj().removeModule(UA)==null){log.error("DOM Remove of module failed");return false;}
if(webPad!=null){if(webPad.getHookedModuleId()==this.getId()){webPad.releaseModule();}}
return true;}
this.requestMoveModule=function(OK,PK,QK){if(OK==null){OK="";}
if(PK==null){PK=this.getParentObj().getId();if(PK==null){log.error("could not find current parent of this module");return false;}}
if(QK==null){QK=this.getOrder();if(QK==-1){log.error("could not find current position inside of parent");return false;}}
var RK={"oldParentid":OK,"newParentid":PK,"newPosition":QK};var SK=new Request(UA,null,Request.RT_MOVMOD,null,null,RK,0,2,2,null,null,null);if(JB!=null){return JB.addRequest(SK);}
else{log.error("no queue defined to add the request");return false;}}
this.handleMoveModule=function(TK){}
this.setDirtyLayers=function(AA){if(Module.isValidModuleStatus(AA)==false){log.error("no valid status "+AA);return false;}
if(AA==null){AA=this.getStatus();}
var i;for(i in xB[AA]){if(typeof xB[AA][i]=="function"){continue;}
xB[AA][i].setTemplateDirty();var UK=xB[AA][i].getSelector();if(UK!=null){UK.reset();}}}
this.setFavIcon=function(VK){if(VK=="none"){this.hideFavIcon();return true;}
else{this.showFavIcon();}
var WK=document.getElementById(UA+"_hdr_fav");if(WK==null){log.warn("Could not find an element for the fav icon");return false;}
if(VK==null||VK==""||typeof VK!="string"){VK=VB+"/"+WB+"/empty.ico";}
else{VK=VK.replace(/\{imgPath\}/g,VB);VK=VK.replace(/\{skinPath\}/g,WB);if(VK.indexOf("/")<0){VK=VB+"/"+WB+"/"+VK;}}
document.images[UA+"_hdr_fav"].src=VK;return true;}
this.showFavIcon=function(){var XK=document.getElementById(UA+"_hdr_fav");if(XK){setElementStyle(XK,"display","block");setElementStyle(XK,"visibility","visible");var YK=document.getElementById(UA+"_hdr_m");if(YK){if(browser.indexOf("MSIE")>=0){setElementStyle(YK,"left","30px");}
else{setElementStyle(YK,"left","25px");}}}}
this.hideFavIcon=function(){var ZK=document.getElementById(UA+"_hdr_fav");if(ZK){setElementStyle(ZK,"display","none");setElementStyle(ZK,"visibility","hidden");var $K=document.getElementById(UA+"_hdr_m");if($K){setElementStyle($K,"left","0px");}}}
this.getFavIcon=function(){return document.images[UA+"_hdr_fav"].src;}
this.getFooter=function(){if(ZB){return document.getElementById(UA+"_ftr_l").innerHTML;}
else{return "";}}
this.setFooter=function(aL){if(ZB){var bL=document.getElementById(UA+"_ftr_l");if(bL==null){log.error("could not find footer element for module "+UA);return false;}
document.getElementById(UA+"_ftr_l").innerHTML=aL;}}
this.requestGetPrivData=function(cL,dL){var eL=false;var fL=new Request(this.getId(),null,Request.RT_GETPRVDAT,null,null,null,0,2,2,null,cL,dL);if(JB!=null){eL=JB.addRequest(fL);}
else{log.error("no queue defined to add the request");eL=false;}
return eL;}
this.handleGetPrivData=function(gL){var hL=this.getLayerByIndex(this.getDlStatus(),this.getDlLayer());if(hL==null){log.error("could not find layer for dl");return false;}
hL.setPrivDataInTemplate(gL.getDataPriv());var iL=this.getId()+"_bdy_s"+this.getStatusName(PB)+"_l"+QB+"_frm";var jL=document.getElementById(iL);try{jL.submit();}
catch(e){log.warn("submit for deep login failed with module "+UA+". Reason: "+e.message);return false;}
hL.clearPrivDataInTemplate(gL.getDataPriv());delete gL;var kL=gL.getPara("successaction");if(kL!=null&&kL!=""){Action.handleActions(kL);}
return true;}
this.cleanRequests=function(AA,lL){var mL=new Array();if(AA==null){var nL=[Module.M_ACTIVE];var i;for(i in nL){if(typeof nL[i]=="function"){continue;}
var j;for(j in xB[nL[i]]){if(typeof xB[nL[i]][j]=="function"){continue;}
xB[nL[i]][j].cleanRequests();}}}
else{if(!Module.isValidModuleStatus(AA)){log.error("invalid status "+AA);return false;}
if(lL==null){mL=xB[AA];var i;for(i in mL){if(typeof mL[i]=="function"){continue;}
mL[i].cleanRequests();}}
else{var oL=this.getLayerByIndex(AA,lL);if(oL!=null){oL.cleanRequests();}}}
var i;for(i=0;i<mL.length;i++){mL[i].cleanRequests();}
return true;}
this.clickHotSpot=function(){if(webPad.isHooked()){if(webPad.getHookedModuleId()!=UA){var pL=webPad.getHookedModule();pL.clickHotSpot();}}
var qL=this.getStatus();var rL=this.getCurrentLayerIndex();switch(this.getStatus()){case Module.M_INACTIVE:if(this.getId()=="m_idLogin"){this.setStatus(Module.M_CONFIG,0,false);}
else{var sL=this.getSelectPath();var tL=null;if(sL!=""){var uL=sL.split("/");tL=uL.length;}
var vL="gotoStatus(Module.M_SELECT,"+(tL)+",'"+this.getId()+"');";var wL=this.getBreadCrumb();if(wL){wL.setCrumbByPath(sL);wL.setLen(tL-1);}
mods["m_idAdder"].setSelectPath(sL,null,true,vL);}
TB=qL;UB=rL;break;case Module.M_ACTIVE:if(this.isConfigurable()==true){if(this.getId()=="m_idLogin"){this.setStatus(Module.M_CONFIG,3,false);}
else{if(yB[Module.M_CONFIG]>0){this.setStatus(Module.M_CONFIG,0,false);}}}
else{var sL=this.getSelectPath();var tL=null;if(sL!=""){var uL=sL.split("/");tL=uL.length;}
var vL="gotoStatus(Module.M_SELECT,"+(tL)+",'"+this.getId()+"');";mods["m_idAdder"].setSelectPath(sL,null,true,vL);var wL=this.getBreadCrumb();if(wL){wL.setCrumbByPath(sL,this.getSelectBase());wL.setLen(tL-1);}}
TB=qL;UB=rL;break;case Module.M_CONFIG:case Module.M_SELECT:if(this.getId()=="m_idAdder"){this.del();this.setToHidden();}
else{this.setStatus(TB,UB,false);}
break;}}
this.clickDelButton=function(){this.del();if(this.getId()=="m_idAdder"){this.setToHidden();}}
this.showSpecial=function(xL,AA,yL){if(AA==null){AA=this.getStatus();}
if(yL==null){yL=this.getCurrentLayerIndex(AA);}
var zL=UA+"_bdy_s"+Module.getStatusShortName(AA)+"_l"+yL+"_sp_"+xL;var AL=document.getElementById(zL);if(AL){setElementStyle(AL,"visibility","visible");}
return true;}
this.hideSpecial=function(BL,AA,CL){if(AA==null){AA=this.getStatus();}
if(CL==null){CL=this.getCurrentLayerIndex(AA);}
var DL=UA+"_bdy_s"+Module.getStatusShortName(AA)+"_l"+CL+"_sp_"+BL;var EL=document.getElementById(DL);if(EL){setElementStyle(EL,"visibility","hidden");}
return true;}
this.getOldStatus=function(){return TB;}
this.isVisible=function(){if(eB==Module.M_VISIBLE){return true;}
return false;}
this.requestSendFF=function(FL,GL,HL,IL){var JL=this.getStatus();var KL=this.getCurrentLayerIndex(JL);HL=this.findActionValues(JL,KL,HL,"rsuccess");IL=this.findActionValues(JL,KL,IL,"rfailure");if(GL==null){GL=0;}
var LL={"recipients":FL,"with_profile":GL};var ML=new Request(this.getId(),null,Request.RT_SNDFF,null,null,LL,0,null,null,null,HL,IL);if(!JB.addRequest(ML)){log.error("could not add the request "+ML.getId()+" to the immediate queue");return false;}}
this.handleSendFF=function(NL){}
this.changeSkin=function(){var i;for(i=0;i<Module.elemList.length;i++){var OL=UA+"_"+Module.elemList[i]["id"];var PL=Module.elemList[i]["value"];PL=PL.replace(/\@skin\@/g,WB);PL=PL.replace(/\@imgPath\@/g,imgPath);var j;for(j in XB){if(typeof XB[j]=="function"){continue;}
var QL=new RegExp("@"+j+"@","g");PL=PL.replace(QL,XB[j])}
if(PL.indexOf("@")!=-1){}
if(PL.indexOf("@")==-1){var RL=$(OL);if(RL){switch(Module.elemList[i]["type"]){case "style":setElementStyle(RL,Module.elemList[i]["name"],PL);break;case "img":RL[Module.elemList[i]["name"]]=PL;break;default:break;}}}}}
this.addDragNDrop=function(){var SL=$(UA+"_hdr_m");if(!SL){log.error("cannot set drag event to module header of "+UA);return false;}
SL.addEvent('mousedown',function(e){e=new Event(e).stop();if(UA=="m_idAdder"){return false;}
var TL=$(UA).clone().setStyles($(UA).getCoordinates()).setStyles({'opacity':0.7,'position':'absolute'}).addEvents({'emptydrop':function(){this.remove();draggedModuleId="";},'mousemove':function(e){if(aC){var UL=aC.getModulesThreshY();var VL=false;var j;if(aC.getNumberOfModules()==0){j=0;}
else{for(j=0;j<UL.length;j++){if(e.clientY<=UL[j]){VL=true;break;}}}
var WL=j;if(WL>=aC.getNumberOfModules()&&WL>0){WL=aC.getNumberOfModules()-1;}
if(pB.getId()==aC.getId()){aC.shiftModule(draggedModuleId,WL);}
else{var XL=pB.findModuleIndex(draggedModuleId);var YL=pB.removeModuleIndex(XL);aC.addModule(YL,WL);}}}}).inject(document.body);var ZL=[];currentPage.setDroppableColumns();ZL=currentPage.getDroppableColumns();var i;var $L=[];for(i=0;i<ZL.length;i++){$L.push(ZL[i].getNode());}
var aM=TL.makeDraggable({droppables:$L});aM.start(e);});}
this.setDraggedCol=function(bM){aC=bM;}
this.getDraggedCol=function(){return aC;}
this.init();}
Module.isValidModuleStatus=function(cM){switch(Number(cM)){case Module.M_INACTIVE:return true;case Module.M_ACTIVE:return true;case Module.M_SELECT:return true;case Module.M_CONFIG:return true;default:return false;}
return false;}
Module.replaceIds=function(dM,eM,fM){if(fM==""){log.error("new Id is empty");return false;}
var gM=dM;gM.setAttribute("id",fM);var hM=new RegExp(eM,"g");var iM=getLikeElements(gM,null,"id",eM);var jM=new Array("onclick","onmouseover","onmouseout");for(i=0;i<iM.length;i++){var kM=iM[i].getAttribute("id");var lM=kM.replace(hM,fM);iM[i].setAttribute("id",lM);}
var mM=new Array();var i;for(i=0;i<jM.length;i++){var nM=getLikeElements(gM,null,jM[i],null);mM=mM.concat(nM);}
var j;for(i=0;i<jM.length;i++){for(j=0;j<mM.length;j++){var oM=mM[j].getAttribute(jM[i]);if(oM==null){continue;}
if(typeof oM=="function"){oM=oM.toString();oM=oM.replace(/function anonymous\(\) \{ /,"");oM=oM.replace(" \}","");}
var pM=oM.replace(hM,fM);var qM=mM[j].setAttribute(jM[i],pM);}}
return true;}
Module.handleAddModule=function(rM,sM){var tM=rM.getDataPara("id");var uM=rM.getDataPara("status");var vM=rM.getDataPara("props");var i;for(i in vM){}
if(tM==null){log.error("could not add service to module. Notify user");return;}
var wM=new Array();if(vM["skinBackgroundColor"]){wM["skinBackgroundColor"]=vM["skinBackgroundColor"];}
else{wM["skinBackgroundColor"]="";}
if(vM["skinTextColor"]){wM["skinTextColor"]=vM["skinTextColor"];}
else{wM["skinTextColor"]="";}
var xM=new Module(tM,sM.getNode(),null,null,null,"100%",null,Number(vM["status"]),Number(vM["visible"]),string2Boolean(vM["dragable"]),string2Boolean(vM["resizeable"]),string2Boolean(vM["configurable"]),string2Boolean(vM["deletable"]),vM["allowedHeights"],queues[vM["immediatequeue"]],queues[vM["timedqueue"]],string2Boolean(vM["withbreadcrumb"],true),Number(vM["selectbase"]),Number(vM["dlstatus"]),Number(vM["dllayer"]),string2Boolean(vM["allowSearch"]),vM["skin"],wM);xM.addLayer(Module.M_SELECT,0,2,1,1,true,0,0,null,1,0,null,queues[vM["immediatequeue"]],false,null,null,null,null,false,true);xM.addLayer(Module.M_SELECT,1,2,1,1,true,0,0,null,2,1,null,queues[vM["immediatequeue"]],false,null,null,null,null,false,true);xM.addLayer(Module.M_SELECT,2,2,1,1,true,0,0,1,3,2,null,queues[vM["immediatequeue"]],false,null,null,null,null,false,true);xM.addLayer(Module.M_SELECT,3,2,1,1,true,0,0,2,4,3,null,queues[vM["immediatequeue"]],false,null,null,null,null,false,true);xM.addLayer(Module.M_SELECT,4,2,1,1,true,0,0,3,null,4,null,queues[vM["immediatequeue"]],false,null,null,null,null,false,true);mods[tM]=xM;xM.setSelectPath(vM["path"],sM.getSelectBase(),true);xM.setServiceName(rM.getDataPara("servicename"));xM.setServiceId(rM.getDataPara("serviceid"));var yM=mods["m_idAdder"].getParentObj();var zM=yM.findModuleIndex("m_idAdder");if(zM==-1){log.error("could not find the adder module in the column!");}
var AM=dummyNode.cloneNode(true);setElementStyle(AM,"display","block");var BM=document.getElementById("tmp");BM.insertBefore(AM,null);sM.reset(AM);sM.setToHidden();sM.setStatusToInactive(0);sM.setSelectPath("",1,true);sM.setServiceId("");sM.setDirtyLayers(Module.M_SELECT);if(webPad!=null){webPad.releaseModule();}
if(searchPad!=null){searchPad.releaseModule();searchPad.setResultDirty();}
yM.removeModule("m_idAdder");yM.addModule(xM,zM);currentModule=xM;currentModule.checkDragable();var CM=vM["initstatus"];var DM=vM["initlayer"];if(CM==null||CM==""){CM=vM["status"];if(CM==null||CM==""){CM=Module.M_CONFIG;}}
if(DM==null||DM==""){DM=vM["layer"];if(DM==null||DM==""){DM=0;}}
var EM=new Array();EM[CM]="gotoStatus("+CM+","+DM+",'"+tM+"');";xM.requestGetAll(Module.M_CONFIG,null,null,false,EM[Module.M_CONFIG]);xM.requestGetTemplate(Module.M_INACTIVE,null,null,false,EM[Module.M_INACTIVE]);xM.requestGetTemplate(Module.M_ACTIVE,null,null,false,EM[Module.M_ACTIVE]);}
Module.handleChangeService=function(FM){var GM=FM.getPara("srcmodulid");var HM=FM.getDataPara("props");var HM=FM.getDataPara("props");var IM=HM["initstatus"];var JM=HM["initlayer"];mods[GM].cleanRequests();if(IM==null||IM==""){IM=HM["status"];if(IM==null||IM==""){IM=Module.M_CONFIG;}}
if(JM==null||JM==""){JM=HM["layer"];if(JM==null||JM==""){JM=0;}}
var KM=mods[GM].getSelectBase();if(HM["selectbase"]){KM=Number(HM["selectbase"]);}
var LM=new Array();if(HM["skinBackgroundColor"]){LM["skinBackgroundColor"]=HM["skinBackgroundColor"];}
else{LM["skinBackgroundColor"]="";}
if(HM["skinTextColor"]){LM["skinTextColor"]=HM["skinTextColor"];}
else{LM["skinTextColor"]="";}
if(!HM["skin"]||HM["skin"]==""){HM["skin"]=skinPath;}
mods[GM].setParas(HM["posX"],HM["posY"],"100%",HM["height"],Number(HM["status"]),Number(HM["visible"]),string2Boolean(HM["dragable"]),string2Boolean(HM["resizeable"]),string2Boolean(HM["configurable"]),string2Boolean(HM["deletable"]),HM["allowedHeights"],queues[HM["immediateQueue"]],queues[HM["timedQueue"]],string2Boolean(HM["withBreadCrumb"]),KM,Number(HM["dlstatus"]),Number(HM["dllayer"]),string2Boolean(HM["allowSearch"]),HM["skin"],LM);mods[GM].setSelectPath(HM["path"],KM,true);mods[GM].setServiceName(FM.getDataPara("servicename"));mods[GM].setServiceId(FM.getDataPara("serviceid"));mods[GM].checkDragable();mods[GM].setDirtyLayers(Module.M_SELECT);mods[GM].initBreadCrumb();mods["m_idAdder"].reset();mods["m_idAdder"].setToHidden();mods["m_idAdder"].setStatusToInactive(0);mods["m_idAdder"].setSelectPath("",1,true);mods["m_idAdder"].setServiceId("");mods["m_idAdder"].setDirtyLayers(Module.M_SELECT);if(webPad!=null){webPad.releaseModule();}
if(searchPad!=null){searchPad.releaseModule();}
var MM=new Array();MM[IM]="setTemplateDirty(Module.M_ACTIVE,'all','"+mods[GM].getId()+"'); gotoStatus("+IM+","+JM+",'"+mods[GM].getId()+"');";mods[GM].requestGetAll(Module.M_CONFIG,null,null,false,MM[Module.M_CONFIG]);mods[GM].requestGetTemplate(Module.M_INACTIVE,null,null,false,MM[Module.M_INACTIVE]);mods[GM].requestGetTemplate(Module.M_ACTIVE,null,null,false,MM[Module.M_ACTIVE]);}
Module.M_INACTIVE=1;Module.M_SELECT=2;Module.M_CONFIG=3;Module.M_ACTIVE=4;Module.M_INVISIBLE=1;Module.M_VISIBLE=2;Module.M_HIDDEN=3;Module.M_HEIGHT_SUPEREXPANDED=400;Module.M_HEIGHT_EXPANDED=196;Module.M_HEIGHT_REDUCED=56;Module.statusName=["","i","s","c","a"];Module.elemList=[{id:"t_tm",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/o.png)"},{id:"t_tl",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/li_o.png)"},{id:"t_tr",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/re_o.png)"},{id:"hdr_fav",type:"img",name:"src",value:"@imgPath@/@skin@/no_favicon.jpg"},{id:"cfg_ctl_i_img",type:"img",name:"src",value:"@imgPath@/@skin@/hspt_i.gif"},{id:"del_ctl_i_img",type:"img",name:"src",value:"@imgPath@/@skin@/del_i.gif"},{id:"cfg_ctl_a_img",type:"img",name:"src",value:"@imgPath@/@skin@/hspt_a.gif"},{id:"del_ctl_a_img",type:"img",name:"src",value:"@imgPath@/@skin@/del_a.gif"},{id:"b_l",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/li.png)"},{id:"b_r",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/re.png)"},{id:"f_l",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/li_u.png)"},{id:"f_m",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/u.png)"},{id:"f_r",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/re_u.png)"},{id:"rsz_ctl_img",type:"img",name:"src",value:"@imgPath@/@skin@/scl.gif"},{id:"bdy_si",type:"style",name:"backgroundColor",value:"@skinBackgroundColor@"},{id:"bdy_si",type:"style",name:"color",value:"@skinTextColor@"},{id:"bdy_sc",type:"style",name:"backgroundColor",value:"@skinBackgroundColor@"},{id:"bdy_sc",type:"style",name:"color",value:"@skinTextColor@"},{id:"bdy_sa",type:"style",name:"backgroundColor",value:"@skinBackgroundColor@"},{id:"bdy_sa",type:"style",name:"color",value:"@skinTextColor@"},{id:"bdy_sa",type:"style",name:"backgroundImage",value:"url(@imgPath@/@skin@/@skinBackgroundImage@)"}];Module.getStatusShortName=function(NM){if(NM>=Module.statusName.length){return null;}
return Module.statusName[NM];}
Module.initialize=function(OM,PM,QM,RM,SM,TM,UM,VM,WM){if(OM!="m_idAdder"){}
mods[OM].setServiceId(QM);mods[OM].setServiceName(RM);mods[OM].setStatusNodes();mods[OM].setNavControlNodes();mods[OM].setWebPadNodes();mods[OM].setDirtyLayers(Module.M_SELECT);if(VM==null){VM=1;}
mods[OM].setSelectPath(SM);mods[OM].setHeightIndex(TM,UM,VM,true);if(WM==null||WM==false){mods[OM].setStatus(TM,UM);}}
function Page(id,XM,YM,ZM,$M,aN,bN,cN,dN,eN,fN,gN){var hN="noname";var iN="page";var jN=-1;var kN=jN;var lN=-1;var mN=lN;var nN=-1;var oN=-1;var pN="%";var qN=-1;var rN=-1;var sN=-1;var tN=-1;var uN=new Array();var vN=new Array();var wN=new Array();var xN=new Array();var yN=new Array();var zN=Page.P_INIVISIBLE;var AN=false;var BN=false;var CN=1;var DN=null;var EN=null;var FN=0;var GN=null;var HN=0;var IN=0;var JN=-1;var KN=-1;var LN="";var MN=-1;var NN=-1;var ON="";var PN=-1;var QN="";var RN=0;var SN=new Array();var TN;var UN;var VN=new Array();var WN;var XN=new Array();var YN=new Array();var ZN=false;var $N=new Array();this.initParas=function(){if(id!=null){hN=id;}
var aO;if(fN!=null){$N=fN;}
TN=this.getCurrentResolution();if(XM!=null){aO=splitValue(XM,ZM);jN=(aO[1]=="%")?aO[0]:-1;kN=jN;lN=(aO[1]=="px")?aO[0]:-1;mN=lN;}
if(YM!=null){aO=splitValue(YM,ZM);nN=(aO[1]=="%")?aO[0]:-1;oN=(aO[1]=="px")?aO[0]:-1;}
if(ZM!=null&&(ZM=="px"||ZM=="%")){pN=ZM;}
if(bN!=null&&typeof bN=="boolean"){zN=bN;}
if(cN!=null&&typeof cN=="boolean"){AN=cN;}
if(dN!=null&&typeof dN=="boolean"){BN=dN;}
if(eN!=null&&typeof eN=="number"){CN=eN;}
if($M!=null){this.setPosX($M);}
if(aN!=null){this.setPosY(aN);}
if(gN!=null){ZN=gN;}}
this.init=function(){this.initParas();if(!this.setNode()){log.error("Could not init page "+hN);return false;}
this.renderSize();this.calcPosX();this.doCenterPage();if(AN==true){}}
this.getWidthPerResolution=function(bO,cO,dO){if(dO==null){dO="relW"}
if(bO==null){bO=TN;}
var i;for(i in $N){if(bO<=i){break;}}
var eO=i;if(cO==null){cO=this.findWidthRelColumnsNumber();}
return $N[i][dO][cO];}
this.getMinWidthPerResolution=function(fO,gO){return this.getWidthPerResolution(fO,gO,"minW");}
this.getMaxWidthPerResolution=function(hO,iO){return this.getWidthPerResolution(hO,iO,"maxW");}
this.findWidthRelColumnsNumber=function(){this.setDroppableColumns();var jO=0;for(i=0;i<wN.length;i++){var kO=wN[i];if(kO.isVisible()&&kO.isDroppable()&&kO.isHiddenOnEmpty()==false){jO++;}}
return jO;}
this.renderPos=function(){var lO;var mO;if(qN!=-1){lO=qN+"%";}
else{lO=rN+"px";}
if(sN!=-1){mO=sN+"%";}
else{mO=tN+"px";}
setElementStyle(DN,"left",lO);setElementStyle(DN,"top",mO);}
this.setPosX=function(nO){this.calcPosX(nO);}
this.setPosY=function(oO){var pO=splitValue(oO,pN);sN=(pO[1]=="%")?pO[0]:-1;tN=(pO[1]=="px")?pO[0]:-1;}
this.getAbsPosX=function(){return rN;}
this.getAbsPosY=function(){return tN;}
this.getRelPosX=function(){return qN;}
this.getRelPosY=function(){return sN;}
this.calcPosX=function(qO){var rO=qO;if(rO==null){rO=getElementStyle(hN,"left","left");}
var sO=getWindowWidth();if(rO.search(/px/)!=-1){rN=Math.floor(Number(rO.replace(/px/,"")));qN=Math.floor((rN/sO)*100);}
else{var tO=rO.replace(/%/,"");qN=tO;rN=Math.floor(sO*(Number(tO)/100));}}
this.doCenterPage=function(){if(ZN==true){var uO=getWindowWidth();var vO=this.getAbsWidth();var wO=(uO-vO)/2;var xO=Math.floor(((wO-150)/uO)*100);if(xO<=0){xO=5;this.calcPosX(xO+"px");}
else{this.calcPosX(xO+"%");}
this.renderPos();}}
this.getCurrentResolution=function(){if(TN==null){TN=screen.width;}
return TN;}
this.getType=function(){return iN;}
this.setNode=function(yO){if(yO){DN=yO;}
else{var zO=document.getElementById(hN);if(zO){DN=zO;}
else{DN=null;log.error("DOMNode for page "+hN+" could not be found");return false;}}
return true;}
this.getNode=function(){return DN;}
this.getId=function(){return hN;}
this.getAbsHeight=function(){return oN;}
this.getAbsWidth=function(){return lN;}
this.getRelHeight=function(){return nN;}
this.getRelWidth=function(){return jN;}
this.getInitRelWidth=function(){return kN;}
this.calcWidth=function(){var AO=-1;AO=getElementStyle(hN,"width","width");if(AO.search(/px/)!=-1){lN=Math.floor(Number(AO.replace(/px/,"")));}
else{var BO=getWindowWidth();var CO=AO.replace(/%/,"");jN=CO;lN=Math.floor(BO*(Number(CO)/100));}}
this.calcHeight=function(){var DO=-1;DO=getElementStyle(hN,"height","height");if(DO.search(/px/)!=-1){oN=Math.floor(Number(DO.replace(/px/,"")));}
else{var EO=getWindowHeight();var FO=DO.replace(/%/,"");nN=FO;oN=Math.floor(EO*(Number(FO)/100));}}
this.setSize=function(XM,YM){if(XM!=null){var GO=splitValue(XM,"px");jN=(GO[1]=="%")?GO[0]:-1;lN=(GO[1]=="px")?GO[0]:-1;}
if(YM!=null){var GO=splitValue(YM,"px");nN=(GO[1]=="%")?GO[0]:-1;oN=(GO[1]=="px")?GO[0]:-1;}
this.renderSize();}
this.renderSize=function(){if(DN==null){return;}
if(jN!=-1){setElementStyle(DN,"width",jN+"%");}
else{if(lN!=-1){setElementStyle(DN,"width",lN+"px");}}
if(nN!=-1){setElementStyle(DN,"height",nN+"%");}
else{if(oN!=-1){setElementStyle(DN,"height",oN+"px");}}
this.calcWidth();this.calcHeight();}
this.recalcWidth=function(){var i;for(i=0;i<uN.length;i++){uN[i].recalcWidth();uN[i].renderSize();}
this.calcWidth();}
this.recalcPageWidth=function(){this.recalcColPos();var HO=0;var i;var IO=0;for(i=0;i<wN.length;i++){var JO=wN[i];if(JO.isVisible()&&JO.isDroppable()&&JO.isHiddenOnEmpty()==false){IO++;}}
var KO=this.getWidthPerResolution();var LO=this.getMinWidthPerResolution();var MO=this.getMaxWidthPerResolution();this.setSize(KO+"%",null);setElementStyle(DN,"minWidth",LO+"px");setElementStyle(DN,"maxWidth",MO+"px");}
this.recalcColPos=function(){var i;for(i=0;i<uN.length;i++){uN[i].setColPos();}}
this.recalcPageHeight=function(NO,OO){var i;var PO=0;for(i=0;i<uN.length;i++){var QO=uN[i];if(NO==true||NO==null){QO.adaptHeight(OO);}
if(QO.isVisible()){var RO=QO.getAbsPosY();var SO=QO.getAbsHeight();var TO=RO+SO;if(PO<TO){PO=TO;}}}
PO+=Page.P_HEIGHTOFFSET;oN=PO;this.setSize(null,oN+"px");}
this.adaptHeight=function(UO){this.recalcPageHeight(true,UO);}
this.setInvisible=function(){return this.setVisibility(Page.P_INVISIBLE);}
this.setVisible=function(){return this.setVisibility(Page.P_VISIBLE);}
this.setVisibility=function(bN){switch(bN){case Page.P_VISIBLE:setElementStyle(DN,"visibility","visible");return true;case Page.P_INVISIBLE:setElementStyle(DN,"visibility","hidden");return true;default:return false;}}
this.addColumn=function(VO,WO){if(!VO){log.error("must give a column for adding");return -1;}
var XO=null;if(WO){var XO=this.findColumnByName(WO);if(!XO){if(WO<uN.length){XO=uN[WO];}}
if(!XO){log.error("column "+WO+" could not be found on this page "+hN);return false;}
XO.addColumn(VO);}
else{VO.setParent(this);uN.push(VO);}
vN.push(VO);if(VO.isDroppable()){wN[wN.length]=VO;}
if(VO.hidesOnEmpty()){VO.hideOnEmpty();}
else{}
this.recalcPageHeight(true,true);return uN.length-1;}
this.hideColumnByName=function(YO){var ZO=this.findColumnByName(YO);if(ZO){this.setColumnVisibility(ZO,Column.C_INVISIBLE);return true;}
return false;}
this.showColumnByName=function($O){var aP=this.findColumnByName($O);if(aP){this.setColumnVisibility(aP,Column.C_VISIBLE);return true;}
return false;}
this.setColumnVisibility=function(bP,cP){var dP=false;if(!bP&&bP.getType()!="column"){return dP;}
dP=bP.setVisibility(cP);this.recalcColumnsWidth();if(BN){this.recalcPageWidth();}
return dP;}
this.requestSetData=function(eP,fP){if(eP){var gP=hN+"."+eP;try{dwr.engine._execute('dwr','user','setProp',gP,fP,Page.handleSetData);}
catch(e){log.error("there was an error in calling DWR"+e.toString());}}}
this.createNewColumnName=function(){return hN+"_c"+uN.length;}
this.getColumnByName=function(hP){var i;for(i=0;i<vN.length;i++){if(hP==vN[i].getId()){return vN[i];}}
return null;}
this.getColumnsIndex=function(iP){var i;for(i=0;i<uN.length;i++){if(iP==uN[i].getId()){return i;}}
return -1;}
this.getColumnByIndex=function(jP){if(jP<uN.length){return uN[jP];}
return -1;}
this.recalcColumnsWidth=function(){var i;var kP=new Array();for(i=0;i<uN.length;i++){if(uN[i].getVisibility()==Column.C_VISIBLE&&uN[i].isRemovable()==true&&uN[i].isHiddenOnEmpty()==false){kP.push(uN[i]);}}
var lP=100/kP.length;var mP=100/kP.length;for(i=0;i<kP.length;i++){var nP=(Math.floor(lP*10)/10)-0.5;if(nP<0){nP=0;}
var oP=(Math.floor((i*mP)*10)/10)-0.5;if(oP<0){oP=0;}
kP[i].setRelSize(nP,null);kP[i].setRelPos(mpPosX,null);kP[i].calcWidth();}
this.setDroppableColumns();}
this.setDroppableColumns=function(){wN=new Array();var i;for(i=0;i<uN.length;i++){if(uN[i].isDroppable()==true){if(uN[i].isVisible()&&uN[i].isActive()){wN.push(uN[i]);}}
if(uN[i].hasColumns()){var pP=uN[i].findDroppableColumns();if(pP){wN=wN.concat(pP);}}}}
this.getDroppableColumns=function(){return wN;}
this.findColumnByName=function(qP){var i;for(i=0;i<uN.length;i++){if(qP==uN[i].getId()){return uN[i];}}
for(i=0;i<uN.length;i++){var rP=uN[i].findColumnByName(qP);if(rP){return rP;}}
return null;}
this.addModule=function(sP,tP,uP){if(sP.getType()!="module"){log.error("given object is no module");return false;}
var vP="END";if(uP){vP=uP;}
var wP=null;var wP=this.getColumnByName(tP);if(!wP){if(tP<uN.length){wP=uN[tP];}}
if(!wP){var i;for(i=0;i<uN.length;i++){tmpCol=uN[i].findColumnByName(tP);if(tmpCol){wP=tmpCol;break;}}}
if(!wP){log.error("Column "+tP+" could not be found on this page "+hN);return false;}
if(!wP.addModule(sP,vP,false)){log.error("COULD not add module "+sP.getId()+" to column "+wP.getId());return false;}
return true;}
this.findDropPosition=function(xP,yP){var zP=-1;var AP=-1;var i,j;var BP=false;var CP=new Array();var DP=0;var EP=0;for(i=0;i<wN.length;i++){if(screen.width<=1024&&i==2){break;}
if(wN[i].isActive()==false||(wN[i].isVisible()==false&&wN[i].hidesOnEmpty()==false)){continue;}
var FP=wN[i].getThreshX()+this.getAbsPosX();if(xP<=FP){BP=true;break;}}
if(BP==true){zP=i;if(wN[zP]!=null){var GP=wN[zP].getModulesThreshY();BP=false;if(wN[zP].getNumberOfModules()==0){j=0;}
else{for(j=0;j<GP.length;j++){if(yP<=GP[j]){BP=true;break;}}}}
AP=j;if(AP>=wN[zP].getNumberOfModules()&&AP>0){AP=wN[zP].getNumberOfModules()-1;}}
else{}
CP.push(zP);CP.push(AP);return CP;}
this.findModuleCoords=function(HP){var i;var IP=-1;var JP=new Array();for(i=0;i<wN.length;i++){IP=wN[i].findModuleIndex(HP);if(IP!=-1){break;}}
if(IP!=-1){JP.push(i);JP.push(IP);}
else{JP.push(-1);JP.push(-1);}
return JP;}
this.findModule=function(KP){var i;var LP=null;for(i=0;i<uN.length;i++){LP=uN[i].findModule(KP);if(LP){break;}}
if(LP){return LP;}
return null;}
this.cloneModule=function(MP,$M,aN){var NP=document.getElementById(MP);if(NP==null){return null;}
var OP=mods[MP];var PP=NP.parentNode;var QP=NP.cloneNode(true);QP.style.position="absolute";QP.style.visibility="visible";QP.style.display="block";var RP;if(OP!=null){OP.calcWidth();RP=OP.getAbsWidth();}
setElementStyle(QP,"width",RP);var SP=document.getElementById("drag_container");SP.appendChild(QP);setElementStyle(QP,"left",$M+"px");setElementStyle(QP,"top",aN+"px");return(QP);}
this.createNewModuleId=function(){if(adderModuleId!=""){return adderModuleId;}
else{return "m"+Math.floor(Math.random()*100000)+"."+tmpDate.getUTCMilliseconds();}}
this.addNewModule=function(TP,UP,VP,WP,XP){if(webPad!=null){if(webPad.isHooked()){return false;}}
var YP=null;if(TP!=null){if(typeof TP=="string"){YP=this.getColumnByName(TP);}
else{YP=vN[TP];}
if(!YP){log.error("column name/index "+TP+" could not be found in page "+hN);return false;}}
else{YP=this.findNextModulePosition();}
var ZP=mods["m_idAdder"];if(ZP==null){log.error("fatal error: no adder module present");return false;}
var $P=ZP.getBreadCrumb();if($P){if(VP!=null&&VP!=""){$P.setCrumbByPath(VP);}}
var aQ=mods["m_idLogin"].getParentObj();var bQ=aQ.getId();var cQ="END";if(!YP.addModule(ZP,cQ)){log.error("Could not add module "+ZP.getId()+" to column "+YP.getId());return false;}
ZP.setToVisible();YP.adaptHeight(true);var dQ=YP.getColDaddy();if(dQ){dQ.adaptHeight(true,true);}
var eQ=YP.getAbsHeight();ZP.calcWidth();ZP.initControlPads();if(UP!=null){var fQ=ZP.getOrder()-1;ZP.requestSelectService(UP,VP,fQ);}
else{if(XP==null){XP=1;}
if(VP!=null&&VP!=""&&VP!=undefined){var gQ=VP.split("/");var hQ=gQ.length;}
else{VP="/";}
var iQ="gotoStatus(Module.M_SELECT,"+(XP)+",'m_idAdder');";ZP.setSelectBase(XP);var jQ={"path":VP,"selectbase":(XP)};ZP.requestGetAll(Module.M_SELECT,XP,jQ,false,iQ,null);}
window.scroll(null,eQ);return true;}
this.findNextModulePosition=function(){var kQ=99;var lQ=null;var i;for(i=0;i<wN.length;i++){if(wN[i].isVisible()==false||wN[i].isActive()==false||wN[i].isHiddenOnEmpty()){continue}
var mQ=wN[i].getColDaddy();if(mQ){if(mQ.isVisible()==false){continue;}}
var nQ=wN[i].getNumberOfModules();var oQ=wN[i].getMaxNumber();if(oQ>-1&&nQ>=oQ){continue;}
if(nQ<kQ){lQ=wN[i];kQ=nQ;}}
if(lQ){}
return lQ;}
this.requestMoveModule=function(){var pQ=this.findModule(ON);if(pQ==null){log.error("could not find selected module "+ON);return;}
if(JN==KN&&MN==NN){return;}
if(KN==-1||NN==-1){return;}
if(LN==-1){pQ.requestMoveModule("");}
else{pQ.requestMoveModule(LN);}}
this.isDraging=function(){if(EN==null){return false;}
return true;}
this.getDynamicPageWidth=function(){return BN;}
this.toString=function(qQ){var rQ="<br>";var sQ="<pre>";var tQ="</pre>";if(qQ=="TEXT"){rQ="\n";sQ="\n";tQ="\n";}
var uQ="";var i;uQ+=sQ;uQ+="ID    : "+hN+rQ;uQ+="RELHEIGHT         : "+nN+" %"+rQ;uQ+="ABSHEIGHT         : "+oN+" px"+rQ;uQ+="RELWIDTH          : "+jN+" %"+rQ;uQ+="ABSWIDTH          : "+lN+" px"+rQ;uQ+="DYNAMICWIDTH      : "+BN+rQ;uQ+="DYNAMICWIDTHFACTOR: "+CN+rQ;uQ+="WIDTHDRAGNDROP    : "+AN+rQ;var i;for(i=0;i<uN.length;i++){uQ+="COLUMN "+i+" : "+uN[i].id+rQ;uQ+=""+uN[i]+rQ;}
uQ+=tQ;return uQ;}
this.setAllColumnsVisibility=function(){var i;for(i=0;i<=uN.length;i++){if(uN[i]){if(uN[i].isVisible()){uN[i].show("none",null,null,null,true,true,false);}
else{uN[i].hide();}}}}
this.init();}
Page.handleSetData=function(vQ){}
Page.P_VISIBLE="block";Page.P_INVISIBLE="none";Page.P_HEIGHTOFFSET=50;function Queue(id,wQ,xQ){var yQ=id||"anonymous";var zQ="queue";var AQ=(wQ!=null)?wQ:60000;var BQ=Math.floor(AQ/60000);var CQ=xQ||10;var DQ=new Array();var EQ=new Array();var FQ=false;var GQ=false;var HQ;var IQ=false;var JQ=0;this.init=function(){GQ=true;this.handleQueue();}
this.getId=function(){return yQ;}
this.getType=function(){return zQ;}
this.getQueueTime=function(){return AQ;}
this.getMaxRequests=function(){return CQ;}
this.getStatus=function(){return GQ;}
this.addRequest=function(KQ){if(KQ&&KQ.getType()=="request"){while(FQ==true){}
if(doRender==true&&AQ==0&&KQ.getRequestType()=="setData"){return true;}
DQ.push(KQ);if(AQ==0){this.handleQueue();}
return true;}
return false;}
this.removeRequest=function(LQ){var MQ;var NQ=null;if(typeof LQ=="string"){MQ=LQ;}
else{MQ=LQ.getId();}
var i;var OQ=false;for(i=0;i<DQ.length;i++){if(MQ==DQ[i].getId()){NQ=DQ.splice(i,1);OQ=true;break;}}
return NQ;}
this.callBack=function(PQ){Queue.handleResponse(PQ);}
this.DWRReq2Req=function(QQ){var RQ;return RQ;}
this.Req2DWRReq=function(SQ){var TQ=new Array();var UQ=new Array();TQ["data"]=UQ;return TQ;}
this.DWRResp2Resp=function(VQ){var WQ;return WQ;}
this.Resp2DWRResp=function(XQ){var YQ;return YQ;}
this.start=function(){if(GQ==true){return false;}
GQ=true;this.handleQueue();return true;}
this.stop=function(){GQ=false;}
this.handleQueue=function(){if(IQ==true){return;}
IQ=true;if(HQ){clearTimeout(HQ);}
this.handleLoggedRequests();FQ=true;var ZQ=[];var $Q=[];if(AQ<=0){ZQ=DQ;DQ=new Array();}
else{var i;for(i=0;i<DQ.length;i++){var aR=DQ[i].decreaseTimer(BQ);if(aR==0||aR==-1){ZQ.push(DQ[i]);}
else{$Q.push(DQ[i]);}}
DQ=$Q;}
JQ++;FQ=false;if(ZQ.length>0){var i;this.startBulk();for(i=0;i<ZQ.length;i++){if(!mods[ZQ[i].getModuleId()]){continue;}
var bR=ZQ[i].getRequest();if(ZQ[i].getRequestType()!="setData"){}
bR["queueid"]=yQ;if(bR!=null){if(!this.callDWR(bR)){log.error("could not send request. read it to the queue again");if(ZQ[i]==null){continue;}
if(ZQ[i].decreaseTimeOutCount()==0){mods[ZQ[i].getModuleId()].handleTimeOut();}
this.addRequest(ZQ[i]);}
else{EQ[ZQ[i].getId()]=ZQ[i];}}}
this.endBulk();}
if(GQ==true&&AQ>0){HQ=setTimeout(this.handleQueue.bind(this),AQ);}
IQ=false;}
this.startBulk=function(){DWREngine.beginBatch();}
this.endBulk=function(){DWREngine.endBatch();}
this.handleLoggedRequests=function(){var i;for(i in EQ){if(typeof EQ[i]=="function"){continue;}
if(EQ[i]==null){continue;}
if(EQ[i].decreaseResponseCount()==0){var cR=EQ[i].getSrcModuleId();if(mods[cR]){var dR=mods[cR];if(dR==null){this.removeLoggedRequest(i);}
dR.handleMissedResponse(EQ[i]);this.removeLoggedRequest(i);}}}}
this.callDWR=function(eR){var fR=eR['requesttype'];var gR=false;var i;if(Request.isValidRequestType(fR)==false){return false;}
if(DWR==true){var hR=eR['modulid'];var iR=eR["data_in"];if(iR instanceof Array){var o=new Object();for(i in iR){if(typeof iR[i]!="function"){o[i]=iR[i];}}
eR["data_in"]=o;}
var iR=eR["data_in_priv"];if(iR instanceof Array){var o=new Object();for(i in iR){if(typeof iR[i]!="function"){o[i]=iR[i];}}
eR["data_in_priv"]=o;}
if(fR==Request.RT_CHGPWD||fR==Request.RT_CHGSEC){eval("result = DWRTest."+fR+"(DWRData,Queue.handleResponse);");return result;}
else{try{DWREngine._execute('dwr',hR,fR,eR,Queue.handleResponse);}
catch(e){log.error("there was an error in calling DWR"+e.toString());}}
return true;}
else{eval("result = DWRTest."+fR+"(DWRData,Queue.handleResponse);");return result;}}
this.findLoggedRequest=function(jR){if(EQ[jR]!=null){return true;}
return false;}
this.removeLoggedRequest=function(kR){if(EQ[kR]!=null){delete EQ[kR];return true;}
return false;}
this.toString=function(lR){var mR="<br>";var nR="<pre>";var oR="</pre>";if(lR=="TEXT"){mR="\n";nR="\n";oR="\n";}
var pR="";var i;pR+=nR;pR+="ID     : "+yQ+mR;var i;pR+="Requests in Queue"+mR;for(i in DQ){if(typeof DQ[i]=="function"){continue;}
pR+="Req: "+DQ[i].getId()+":"+DQ[i].getTimer()+":"+DQ[i].getReqType()+":"+DQ[i].getModStatus()+":"+DQ[i].getModLayer()+":"+DQ[i].getModuleId()+mR;}
pR+=oR;return pR;}
this.init();}
Queue.handleResponse=function(qR){var rR=new Response(qR);if(rR.getRequestType()!="setData"){}
var sR=rR.getRequestId();var tR=rR.getQueueId();var uR=false;var uR=queues[tR].findLoggedRequest(sR);if(uR==true){var uR=queues[tR].removeLoggedRequest(sR);if(uR==false){log.error("cannot remove logged request "+sR+" from queue "+tR);}}
else{}
var vR=rR.getModuleId();var wR=rR.getModuleSrcId();var xR=mods[wR];if(xR!=null){xR.handleResponse(rR);}
else{log.warn("module with id "+wR+" was not found!");}}
function Request(yR,zR,AR,BR,CR,DR,ER,FR,GR,HR,IR,JR,KR,LR){var MR="request";var NR=Request.ST_NEW;var OR={"srcmodulid":null,"modulid":null,"requestid":null,"clearcache":null,"createdate":new Date(),"requesttype":null,"modulestatus":null,"modulelayer":null,"data_in":null,"data_in_priv":null,"data_out":null,"data_out_priv":null,"successaction":null,"erroraction":null};var PR=(FR!=null)?FR:2;var QR=-1;var RR=(GR!=null)?GR:2;var SR=new Array();this.init=function(){if(!OR["requestid"]){OR["requestid"]=this.createId();}
if(yR==null){log.error("no module id given");return false;}
else{OR["modulid"]=yR;}
if(HR==null){OR["srcmodulid"]=OR["modulid"];}
else{OR["srcmodulid"]=HR;}
if(AR==null){log.error("no request type given");return false;}
else{if(!Request.isValidRequestType(AR)){log.error("invalid request type "+AR);return false;}
OR["requesttype"]=AR;}
if(BR==null){}
else{if(!Module.isValidModuleStatus(BR)){log.error("invalid module status");return false;}
OR["modulestatus"]=""+BR;}
if(CR==null||CR<0){}
else{OR["modulelayer"]=CR;}
if(DR!=null){if(typeof DR=="object"){var i;var TR=new Array();var UR=0;var VR=new Array();var WR=0;for(i in DR){if(typeof DR[i]=="function"){continue;}
if(i.indexOf("_")==0){var j=i.substring(1);VR[j]=DR[i];WR++;}
else{TR[i]=DR[i];UR++;}}
if(UR==0){OR["data_in"]=null;}
else{OR["data_in"]=TR;}
if(WR==0){OR["data_in_priv"]=null;}
else{OR["data_in_priv"]=VR;}
var j;for(j in TR){if(typeof TR[j]=="function"){continue;}}
for(j in VR){if(typeof VR[j]=="function"){continue;}}}
else{log.error("invalid data: "+DR);return false;}}
if(FR!=null){if(typeof FR=="number"){PR=FR;}
else{log.error("invalid resendCount: "+FR);return false;}}
if(ER!=null){if(typeof ER=="number"){QR=ER;}
else{log.error("invalid reqTimer: "+ER);return false;}}
if(GR!=null){if(typeof GR=="number"){RR=GR;}
else{log.error("invalid responseCount: "+GR);return false;}}
if(IR!=null){OR["successaction"]=IR;}
if(JR!=null){OR["erroraction"]=JR;}
if(KR!=null){SR=KR;var i;for(i in KR){OR[i]=KR[i];}}
if(LR!=null){OR["clearcache"]=LR;}
return true;}
this.getId=function(){return OR["requestid"];}
this.setId=function(id){if(id){_id=id;NR=Request.ST_NEW;return true;}
return false;}
this.getType=function(){return MR;}
this.getRequestType=function(){return OR["requesttype"];}
this.getReqType=function(){return OR["requesttype"];}
this.setReqType=function(XR){if(XR){if(Request.isValidRequestType(XR)){OR["requesttype"]=XR;NR=Request.ST_NEW;return true;}}
return false;}
this.setRequestType=function(YR){if(YR){if(Request.isValidRequestType(YR)){OR["requesttype"]=YR;NR=Request.ST_NEW;return true;}}
return false;}
this.getModStatus=function(){return OR["modulestatus"];}
this.setModStatus=function(ZR){if(ZR){if(module.isValidStatus(ZR)){OR["modulestatus"]=ZR;NR=Request.ST_NEW;return true;}}
return false;}
this.getModLayer=function(){return OR["modulelayer"];}
this.setModLayer=function($R){if($R){OR["modulelayer"]=$R;NR=Request.ST_NEW;return true;}
return false;}
this.getSrcModuleId=function(){return OR["srcmodulid"];}
this.getModuleId=function(){return OR["modulid"];}
this.getStatus=function(){return NR;}
this.createId=function(){var aS=new Date();return ""+Math.floor(Math.random()*100000)+"_"+aS.getUTCMilliseconds();}
this.getRequest=function(){return OR;}
this.decreaseResendCount=function(){PR--;if(PR<0){PR=0;}
return PR;}
this.getResendCount=function(){return PR;}
this.getTimer=function(){return QR;}
this.setTimer=function(bS){if(bS<-1){bS=-1;}
QR=bS;}
this.decreaseTimer=function(cS){if(QR==-1){return -1;}
QR-=cS;if(QR<0){QR=0;}
return QR;}
this.decreaseResponseCount=function(){RR--;if(RR<0){RR=0;}
return RR;}
this.toString=function(dS,eS){var fS="<br>";var gS="<pre>";var hS="</pre>";if(dS=="TEXT"){fS="\n";gS="\n";hS="\n";}
var iS="";iS+=gS;iS+="resendCount : "+PR+fS;iS+="responseCount : "+RR+fS;iS+="Timer : "+QR+fS;for(i in OR){if(typeof(OR[i])=="function"){continue;}
iS+=i+": "+OR[i]+fS;if(eS!=true){if(i=="data_in"||i=="data_in_priv"||i=="data_out"){var j;var jS=OR[i];for(j in jS){if(typeof(jS[j])=="function"){continue;}
iS+="data -> "+j+": "+jS[j]+fS;}}}}
iS+=hS;return iS;}
if(!this.init()){return null;}}
Request.isValidRequestType=function(kS){var lS=new Array(Request.RT_GETDAT,Request.RT_GETTPL,Request.RT_GETALL,Request.RT_SETDAT,Request.RT_LOGIN,Request.RT_ADDMOD,Request.RT_REMMOD,Request.RT_MOVMOD,Request.RT_CHGSVC,Request.RT_REGUSR,Request.RT_LOGOUT,Request.RT_SNDLOG,Request.RT_SNDPWD,Request.RT_CHGUDT,Request.RT_GETPRVDAT,Request.RT_SEARCH,Request.RT_SNDFF);var i;for(i=0;i<lS.length;i++){if(lS[i]==kS){return true;}}
return false;}
Request.RT_GETDAT="getData";Request.RT_GETTPL="getTemplate";Request.RT_GETALL="getAll";Request.RT_SETDAT="setData";Request.RT_LOGIN="doAuth";Request.RT_ADDMOD="addModule";Request.RT_REMMOD="removeModule";Request.RT_MOVMOD="moveModule";Request.RT_CHGSVC="changeService";Request.RT_REGUSR="registerUser";Request.RT_LOGOUT="logout";Request.RT_SNDLOG="recoverLogin";Request.RT_SNDPWD="recoverPw";Request.RT_CHGUDT="changeUserData";Request.RT_GETPRVDAT="getPrivData";Request.RT_SEARCH="search";Request.RT_SNDFF="sendFF";Request.RS_IMMED=1;Request.RS_01MIN=2;Request.RS_05MIN=3;Request.RS_10MIN=4;Request.ST_NEW=0;Request.ST_CREATED=1;Request.ST_SENT=2;Request.ST_WTFRESP=3;Request.ST_RCVRESP=4;WTFRESP=3;Request.ST_RCVRESP=4;function Response(mS){var nS="";var oS=null;this.init=function(){if(typeof mS=="String"){nS=mS;}
else{if(mS==null){log.error("response data is null!");return;}
else{oS=mS;}}}
this.getType=function(){return "response";}
this.getRequestId=function(){return this.getPara("requestid");}
this.getQueueId=function(){return this.getPara("queueid");}
this.getModuleId=function(){return this.getPara("modulid");}
this.getModuleSrcId=function(){return this.getPara("srcmodulid");}
this.getCreateDate=function(){return this.getPara("createdate");}
this.getResponseDate=function(){return this.getPara("responsedate");}
this.getRequestType=function(){return this.getPara("requesttype");}
this.getModuleStatus=function(){return this.getPara("modulestatus");}
this.getModuleLayer=function(){return this.getPara("modulelayer");}
this.getStatus=function(){return this.getPara("status");}
this.getChanged=function(){return this.getPara("changed");}
this.getStatusMsg=function(){return this.getPara("statusmsg");}
this.getStatusMessage=function(){return this.getPara("statusmsg");}
this.getData=function(){return this.getPara("data_out");}
this.getDataPriv=function(){return this.getPara("data_out_priv");}
this.getScript=function(){return this.getPara("script");}
this.getResponse=function(){return oS;}
this.getDataPara=function(pS){var qS=this.getData();if(qS==null){return null;}
if(qS[pS]){return qS[pS];}
return null;}
this.getPara=function(rS){if(oS[rS]!=null){return oS[rS];}
return null;}
this.handleXML=function(){}
this.toString=function(sS,tS){var uS="<br>";var vS="<pre>";var wS="</pre>";if(sS=="TEXT"){uS="\n";vS="\n";wS="\n";}
var i;var xS=vS;for(i in oS){if(typeof i=="function"){next;}
if(i=="tpl"||i=="script"){xS+=i+" : "+" template/script data "+uS;}
else{xS+=i+" : "+oS[i]+uS;if(tS!=true){if(i=="data_in"||i=="data_out"){var j;var yS=oS[i];if(yS==null){continue;}
xS+=this.listEntries(yS,0);}}}}
xS+=wS;return xS;}
this.listEntries=function(zS,AS){var i;var BS="";for(i=0;i<AS;i++){BS+="#";}
var CS="";for(i in zS){if(typeof zS[i]=="function"){continue;}
CS+=BS+" "+i+" -> "+zS[i]+"<br>";if(typeof zS[i]=="object"){CS+=this.listEntries(zS[i],AS+1);}}
return CS;}
this.init();}
function SearchBox(DS,ES,FS,GS,HS){var IS="nn";var JS=null;var KS=null;var LS="q";var MS="meta";var NS="0a";function _init(){if(DS!=null){JS=DS;}
if(ES!=null){KS=ES;}
if(FS!=null){IS=FS;}
if(GS!=null){LS=GS;}
if(HS!=null){MS=HS;}}
function _rplcUrl(el,OS){var qe="";if(document[OS]==null){return false;}
if(document[OS][LS]){qe=encodeURIComponent(document[OS][LS].value);}
var id=el.getAttribute("id");if(qe!=""){var PS=JS[id];var mt="";PS=PS.replace("@query@",qe);if(document[OS][MS]){mt=document[OS][MS].value;PS=PS.replace("@meta@",mt);}
el.href=PS;return true;}
else{var ac=document[OS].action;var PS=KS[id];document[OS].action=PS;return false;}}
function _actLink(el){var id=el.id;var al=document.getElementById(IS+id+"l");var il=document.getElementById(IS+id+"t");if(al!=null){setElementStyle(al,"display","none");}
if(il!=null){setElementStyle(il,"display","inline");}
if(NS!=""){var al=document.getElementById(IS+NS+"l");var il=document.getElementById(IS+NS+"t");if(al!=null){setElementStyle(al,"display","inline");}
if(il!=null){setElementStyle(il,"display","none");}}
NS=id;}
function _handleFtr(el){var QS=document.getElementById(IS+"_ftr");if(QS==null){return false;}
var id=el.id;if(id=="0a"){setElementStyle(QS,"visibility","visible");}
else{setElementStyle(QS,"visibility","hidden");}}
this.handleTab=function(el,RS){_handleFtr(el);_actLink(el);return _rplcUrl(el,RS);}
_init();}
function SearchPad(id,SS,TS,US,VS,WS){var XS;var YS;var ZS;var $S;var aT;var bT;var cT=new Array();var dT=new Array();var eT=0;var fT=0;var gT;var hT=0;var iT=false;var jT=-1;var kT="";var lT=true;var mT=0;var nT=10;var oT="img";var pT="skin_1";this.init=function(){XS=(id!=null)?id:"noname";aT=(SS!=null)?SS:-1;bT=(TS!=null)?TS:-1;gT=(US!=null)?US:null;iT=(VS!=null&&(VS==true||VS==false))?VS:false;if(WS!=null){nT=WS;}
this.setNode();this.setParentNode();this.setVisibility();if(skinPath!=null){pT=skinPath;}
if(imgPath!=null){oT=imgPath;}}
this.setNode=function(qT){if(qT!=null){YS=qT;}
else{var rT=document.getElementById(XS);if(rT!=null){YS=rT;}
else{log.error("could not find node with id "+XS);return false;}}
return true;}
this.setParentNode=function(sT){if(sT){ZS=sT;}
else{var tT=YS.parentNode;if(tT==null){log.error("could not find the Parent DOM of id "+XS);return false;}
ZS=tT;}
return true;}
this.hookModule=function(uT){if(uT==null||uT.getType()!="module"){log.error("invalid object given. Cannot on on that");return false;}
$S=uT;var vT=uT.getSearchPadNode();if(vT!=null){if(vT.hasChildNodes()==true){var wT=vT.firstChild;vT.replaceChild(YS,wT);}
else{vT.appendChild(YS);}}
else{log.error("Given module "+uT.getId()+" has no search pad container");return false;}
return true;}
this.releaseModule=function(){var xT=$S;$S=null;if(xT!=null){xT.hideSearchPad();}
if(ZS!=null){ZS.appendChild(YS);}
else{log.error("no parent node to add the webpad to");}
this.hide();return xT;}
this.isHooked=function(){if($S!=null){return true;}
return false;}
this.getModuleContext=function(){return $S;}
this.doSearch=function(yT,zT){if(typeof zT=="string"){zT=zT.split(" ");}
if(typeof yT=="string"){yT=yT.split(" ");}
var AT=new Array();for(i=0;i<yT.length;i++){AT.push(new RegExp(yT[i],"gi"));}
this.purgeResult();var i;for(i=0;i<cT.length;i++){var j;for(j=0;j<zT.length;j++){var k;for(k=0;k<AT.length;k++){if(cT[i][zT[j]].match(AT[k])!=null){dT.push(cT[i]);continue;}}}}}
this.getResultTemplatesAsString=function(){var i;var BT=new Array();for(i=0;i<dT.length;i++){var CT=dT[i]["templatename"];var DT=dT[i]["servicename"];var ET=dT[i]["path"]
BT.push(CT+":"+DT+":"+ET.slice(1));}
return BT.join(",");}
this.getKeywords=function(){var FT=getLikeElements(YS,"input","name",null);var GT=FT[0].value;return GT;}
this.search=function(HT){if(lT==true||HT==true){var IT=this.getKeywords();if(IT!=kT){mT=0;}
kT=IT;if(IT==""){return false;}
if(mT==0){this.fillListBox(this.getSearchEntry());}
var JT={"searchWord":IT,"searchLimit":nT,"searchOffset":mT};var KT=new Request("m_idAdder",null,Request.RT_SEARCH,null,null,JT,-1,2,2,null,null,null,null,null);if(queues["immediate"].addRequest(KT)==false){log.error("failed to add request to immediate queue");return false;}}}
this.addEntry=function(LT){cT.push(LT);}
this.addEntries=function(MT){var i;for(i=0;i<MT.length;i++){var NT=MT[i];if(NT[0]!=null){if(!this.addEntry(NT)){log.error("could not add entry with id "+NT[0]);}}}}
this.refreshTree=function(){DWREngine._execute("dwr",'m_idAdder','getAvailableServices',SearchPad.handleResponse);}
this.purgeTree=function(){cT=new Array();}
this.purgeResult=function(){dT=new Array();}
this.setResult=function(OT){dT=OT;}
this.getAllResults=function(){return dT;}
this.getResult=function(PT){if(PT<0||PT>(dT.length-1)){log.error("invalid index "+PT);return null;}
return dT[PT];}
this.getNextResult=function(){fT++;if(fT>(dT.length-1)){return null;}
return this.getResult(fT);}
this.getPrevResult=function(){fT--;if(fT<0){return null;}
return this.getResult(fT);}
this.getFirstResult=function(){fT=0;return this.getResult(fT);}
this.getLastResult=function(){fT=dT.length-1;return this.getResult(fT);}
this.getNoOfResults=function(){return dT.length;}
this.renderListBoxContent=function(){var i;var QT="";if(dT.length==0&&mT>0){return;}
if(dT.length==0){QT=this.getNoResultEntry();}
else{for(i=0;i<dT.length;i++){var RT=dT[i];var ST=oT+"/"+pT+"/emptyfav.gif";var TT={"title":RT,"favicon":ST};QT+=this.getResultEntry(TT,i,this.getResultOffset());}}
this.fillListBox(QT);}
this.fillListBox=function(UT){if(UT==null){UT="";}
var VT=getLikeElements(YS,"div","id","sp_lbx");if(!VT[0]){log.error("could not find the listbox element in searchpad");return false;}
var WT=VT[0];WT.innerHTML=UT;}
this.getResultHeader=function(){return "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin: 2px;\">\n";}
this.getNoResultEntry=function(){var XT="<div style=\"height: 65px; width: 100%; margin-right: 1px; text-align: center; \"><br><br>keine Ergebnisse</div>\n";return XT;}
this.getSearchEntry=function(){var YT="<div style=\"height: 65px; width: 100%; margin-right: 1px; text-align: center; \"><br><br>...suchen...</div>\n";return YT;}
this.getResultEntry=function(ZT,$T,WS){var aU="<div id=\""+$S.getId()+"_sp_rsl_e"+$T+"\" style=\"border-bottom: 1px solid rgb(29,213,0); height: 13px; width: 100%; margin-right: 1px; \">\n";aU+="<div class= \"stext\" style=\"cursor: pointer; position: absolute; width: 14px;\" onclick=\"Action.scopeModule('"+$S.getId()+"'); searchPad.markListEntry("+$T+",this); Action.scrollTo("+$T+",2,0);\" ondblclick=\"Action.scopeModule('"+$S.getId()+"'); searchPad.markListEntry("+$T+",this); Action.scrollTo("+$T+",2,0); Action.jpClickMid();\">\n";aU+=(WS+$T+1)+"\n";aU+="</div>\n";aU+="<div style=\"cursor: pointer; overflow: hidden; position: absolute; left: 15px; width: 90px; height: 13px; margin-left: 3px; font-size: 7pt; \" onclick=\"Action.scopeModule('"+$S.getId()+"'); searchPad.markListEntry("+$T+",this); Action.scrollTo("+$T+",2,0);\" ondblclick=\"Action.scopeModule('"+$S.getId()+"'); searchPad.markListEntry("+$T+",this); Action.scrollTo("+$T+",2,0); Action.jpClickMid();\">\n";aU+=ZT["title"];aU+="</div>\n";aU+="</div>\n";return aU;}
this.getResultFooter=function(){return "</table>";}
this.renderSearchLayer=function(bU){if(!this.isHooked()){return false;}
var cU=$S.getStatus();if(bU==null){bU=0;}
var dU=$S.getLayerByIndex(cU,bU);var eU="deselect(); select(0,'"+$S.getId()+"'); spMarkListEntry("+searchPad.getMarkedListEntry()+"); gotoStatus("+cU+",0,'"+$S.getId()+"'); scrollTo("+searchPad.getMarkedListEntry()+",2,0,'"+$S.getId()+"')";dU.requestGetData(false,null,Request.RT_GETALL,eU,null);dU.prepareConfigSelector();if(webPad!=null){webPad.checkControl(["LEFT","RIGHT","MID"]);}
return true;}
this.hide=function(){setElementStyle(YS,"display","none");iT=false;}
this.show=function(){setElementStyle(YS,"display","block");iT=true;}
this.setVisibility=function(VS){if(VS==true){this.show();}
else{this.hide();}}
this.activate=function(){if($S!=null){var fU=document.getElementById("sp_ibx_ipt");if(fU!=null){fU.focus();}}}
this.deactivate=function(){if($S!=null){$S.hideSearchPad();}}
this.toggle=function(){if($S!=null){$S.toggleSearchPad();}}
this.isVisible=function(){return iT;}
this.isActive=function(){if($S!=null){return $S.isSearchPadActive();}
return false;}
this.getHookedModuleId=function(){if($S!=null){return $S.getId();}
return null;}
this.markListEntry=function(gU){if(gU==null){gU=this.getMarkedListEntry();}
var hU=$S.getId()+"_sp_rsl_e"+gU;var iU=document.getElementById(hU);if(iU==null){return false;}
if(jT>-1){this.unmarkListEntry(jT);}
jT=gU;setElementStyle(iU,"backgroundColor","rgb(29,213,0)");}
this.unmarkListEntry=function(jU){var kU=$S.getId()+"_sp_rsl_e"+jU;var lU=document.getElementById(kU);if(lU==null){log.warn("could not find list element "+kU);return false;}
setElementStyle(lU,"backgroundColor","transparent");}
this.getMarkedListEntry=function(){return jT;}
this.setMarkedListEntry=function(mU){if(this.getNoOfResults()<mU){return false;}
jT=mU;return true;}
this.setResultDirty=function(){lT=true;}
this.setResultClean=function(){lT=false;}
this.isResultDirty=function(){return lT;}
this.isResultClean=function(){if(lT==true){return false;}
return true;}
this.setResultOffset=function(nU){mT=nU;}
this.getResultOffset=function(){return mT;}
this.setOffset=function(oU){nT=oU;}
this.getOffset=function(){return nT;}
this.incOffset=function(pU){if((mT+nT+1)<=eT){mT+=nT;if(pU==true){this.search();}
return true;}
return false;}
this.decOffset=function(qU){if((mT-nT)>=0){mT-=nT;if(qU==true){this.search();}
return true;}
return false;}
this.setResultCount=function(rU){eT=rU;}
this.getResultCount=function(){return eT;}
this.toString=function(sU){var tU="<br>";var uU="<pre>";var vU="</pre>";if(sU=="TEXT"){tU="\n";uU="\n";vU="\n";}
var wU="";var i;wU+=uU;wU+="ID    : "+XS+tU;wU+="Search Tree is"+tU;for(i=0;i<cT.length;i++){var j;var xU="";for(j in cT[i]){if(typeof cT[i]=="function"){continue;}
xU+=j+": "+cT[i][j]+",";}
wU+="Nr. "+i+" : "+xU+tU;}
return wU;}
this.init();}
SearchPad.handleResponse=function(yU){var zU=yU.getDataPara("searchCount");searchPad.setResultCount(zU);var AU=yU.getDataPara("searchResult");searchPad.setResult(AU);searchPad.renderListBoxContent();searchPad.renderSearchLayer();searchPad.markListEntry(searchPad.getMarkedListEntry());}
function Tracker(BU,CU,DU){var EU="noname";var FU=10;var GU=new Array();var HU=Tracker.LEVEL_ALL;var IU=new Array("NONE","SYSTEM","USER","ALL");this.init=function(){if(BU!=null){EU=BU;}
if(DU!=null){FU=DU;}}
this.isValidLevel=function(JU){if(_logMessages[JU]!=""){return true;}
return false;}
this.getServerLevel=function(){return HU;}
this.getServerLevelByName=function(){return this.getLevelByName(HU);}
this.getLevelByName=function(KU){return _logMessages[KU];}
this.log=function(LU,MU){if(DWR==true){var NU=MU.join("::");if(LU<=HU||HU!=Tracker.LEVEL_NONE){this.collectServer(LU,NU);if(this.getSendBufferLength()>=FU){this.send();this.purgeSendBuffer();}}}}
this.collectServer=function(OU,PU){if(OU){GU.push(IU[OU]+"::"+PU);}
else{GU.push(PU);}}
this.getSendBufferLength=function(){return GU.length;}
this.purgeSendBuffer=function(){GU=new Array();}
this.send=function(){DWREngine.beginBatch();var i;for(i=0;i<GU.length;i++){DWREngine._execute("dwr",EU,'log',1,GU[i],Tracker.handleResponse);}
DWREngine.endBatch();}
this.setServerLevel=function(QU){if(this.isValidLevel(QU)){HU=QU;this.log(Logger.LEVEL_SPECIAL,"Switched server log level to "+this.getLevelByName(QU));}}
this.setLevel=function(RU){if(this.isValidLevel(RU)){HU=RU;this.log(Logger.LEVEL_SPECIAL,"Switched server track level to "+this.getLevelByName(RU));}}
this.init();}
Tracker.handleResponse=function(SU){return;}
Tracker.LEVEL_NONE=0;Tracker.LEVEL_SYSTEM=1;Tracker.LEVEL_USER=2;Tracker.LEVEL_ALL=3;
