/********* Basedata for group webwidgets ****
#kesrequire(qooxdoo-implementation.js)
#kescontains(share/webwidgets/dombase.js)
#kescontains(share/webwidgets/cookies.js)
#kescontains(share/webwidgets/popup.js)
#kescontains(share/webwidgets/querystring.js)
#kescontains(share/webwidgets/tabs.js)
#kescontains(share/webwidgets/rpcsingleton.js)
#kescontains(share/webwidgets/inflatabletext.js)
********************************************* */

if(self.Node&&self.Node.prototype){if(!Element.prototype.insertAdjacentHTML){Element.prototype.insertAdjacentHTML=function(B,A){var E=document.createRange();E.selectNode(this);var C=E.createContextualFragment(A);var F=this.parentNode;var D=B.toLowerCase();if(D=="beforebegin"){F.insertBefore(C,this);}if(D=="afterend"){F.insertBefore(C,this.nextSibling);}if(D=="afterbegin"){this.insertBefore(C,this.childNodes[0]);}if(D=="beforeend"){this.appendChild(C);}};}}qx.Class.define("kes.webwidgets.dombase",{type:"static",extend:qx.core.Object,statics:{DomElementDimensions:function(C){var G=qx.bom.element.Style.get(C,"display");if(G!="none"&&G!=null){return{width:C.offsetWidth,height:C.offsetHeight};}var B=C.style;var F=B.visibility;var D=B.position;var A=B.display;B.visibility="hidden";B.position="absolute";B.display="block";var H=C.clientWidth;var E=C.clientHeight;B.display=A;B.position=D;B.visibility=F;return{width:H,height:E};},DomElementById:function(B){if(arguments.length>1){for(var A=0,D=[],C=arguments.length;A<C;A++){D.push(kes.webwidgets.dombase.DomElementById(arguments[A]));}return D;}if(typeof (B)=="string"){B=document.getElementById(B);}return B;},DomElementsByClassName:function(D,A){var C=(kes.webwidgets.dombase.DomElementById(A)||document.body).getElementsByTagName("*");var F=[],G;for(var B=0,E=C.length;B<E;B++){G=C[B];if(kes.webwidgets.dombase.DomElementHasClassName(G,D)){F.push(G);}}return F;},DomElementHasClassName:function(A,B){if(!(A=kes.webwidgets.dombase.DomElementById(A))){return ;}var C=A.className;if(C.length==0){return false;}if(C==B||C.match(new RegExp("(^|\\s)"+B+"(\\s|$)"))){return true;}return false;},DomHardSleep:function(A){var B=(new Date()).getTime();var C=B+A;while((new Date()).getTime()<C){}},DomFillSelect:function(A,C,D){if(!C){return false;}A.options.length=0;SelIdx=0;for(var B=0;B<C.length;B++){if(D&&C[B]["value"]==D){SelIdx=A.options.length;}A.options[A.options.length]=new Option(unescape(C[B]["text"].replace(/\s/g,"%A0")),C[B]["value"],((D&&C[B]["value"]==D)?true:false));}A.selectedIndex=SelIdx;},DomSelectEntry:function(A,C){SelIdx=0;for(var B=0;B<A.options.length;B++){if(A.options[B].value==C){SelIdx=B;break;}}A.selectedIndex=SelIdx;},DomFillOptGroupSelect:function(A,B,C){A.options.length=0;First=true;Parent=A;NewParent=false;IEver=kes.webwidgets.dombase.DomGetInternetExplorerVersion();for(i=0;i<B.length;i++){if(B[i]["value"]==0&&!First){if(NewParent){A.appendChild(Parent);}Parent=document.createElement("optgroup");Parent.label=unescape(B[i]["text"].replace(/\s/g,"%A0"));NewParent=true;}else{opt=new Option(unescape(B[i]["text"].replace(/^\s{2}/,"").replace(/\s/g,"%A0")),B[i]["value"],((C&&B[i]["value"]==C)?true:false));Parent.appendChild(opt);if(IEver!=-1){opt.innerText=unescape(B[i]["text"].replace(/^\s{2}/,"").replace(/\s/g,"%A0"));}First=false;}}if(NewParent){A.appendChild(Parent);}},DomGetInternetExplorerVersion:function(){var C=-1;if(navigator.appName=="Microsoft Internet Explorer"){var A=navigator.userAgent;var B=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(B.exec(A)!=null){C=parseFloat(RegExp.$1);}}return C;},arraySortHelper:function(C,D,B){var A=(D[C])?D[C].toLowerCase():"";var E=(B[C])?B[C].toLowerCase():"";return((A<E)?-1:((A>E)?1:0));},arraySortBySecondIndex:function(A,C,B){return kes.webwidgets.dombase.arraySortByCallback(A,qx.lang.Function.curry(kes.webwidgets.dombase.arraySortHelper,C),B);},arraySortByCallback:function(A,C,B){if(!B){B=1;}A.sort(C);if(B==2){A.reverse();}return A;}}});qx.Class.define("kes.webwidgets.Cookies",{extend:qx.core.Object,type:"singleton",construct:function(){this.Read();},members:{cookieData:null,GetValue:function(B,A){return(this.cookieData[B]!=null)?this.cookieData[B][A]:null;},SetValue:function(B,A,C){if(this.cookieData[B]==null){this.cookieData[B]=[];}this.cookieData[B][A]=C;},Read:function(){this.cookieData={};var D=new String(window.document.cookie).split(";");var B,E,C;for(var A=0;A<D.length;A++){B=D[A].split("=");if(B.length==3){E=new String(B[0]);E=E.replace(" ","");if(this.cookieData[E]==null){this.cookieData[E]=[];}this.cookieData[E][B[1]]=unescape(B[1]);}else{C=B[0];C=C.replace(" ","");if(C.substring(0,12)!="ASPSESSIONID"){if(!this.cookieData[""]){this.cookieData[""]={};}this.cookieData[""][C]=unescape(B[1]);}}}},Write:function(){var I;var F;var G=new Date();var A=new Date();A.setYear(A.getFullYear()+10);G.setYear(G.getFullYear()-10);var C=new String(window.document.cookie).split(";");var E,H,K;for(var D=0;D<C.length;D++){E=C[D].split("=");if(E.length==3){window.document.cookie=E[0]+"="+E[1]+"='';expires="+G.toGMTString();}else{K=E[0];K=K.replace(" ","");if(K.substring(0,12)!="ASPSESSIONID"){window.document.cookie=K+"='';expires="+G.toGMTString();}}}for(var B in this.cookieData){I="";F=this.cookieData[B];for(var J in F){if(F[J]!=null){I=(B=="")?J+"="+F[J]:B+"="+J+"="+escape(F[J]);I+="; expires="+A.toGMTString();window.document.cookie=I;}}}}}});qx.Class.define("kes.webwidgets.popup",{extend:qx.core.Object,construct:function(A,C){var B=qx.lang.Object.mergeWith({modal:false,hidden:true,closebox:"popup_closebox",trigger:"click",outevents:true},arguments[2]||{},true);B.position=B.position||(B.modal?"center":"auto");B.trigger=B.trigger||(B.modal?"click":"mouseover");B.duration=this.first_value(B.duration,this.duration,0.5);B.show_duration=this.first_value(B.show_duration,B.duration);B.hide_duration=this.first_value(B.hide_duration,B.duration);B.opacity=this.first_value(B.opacity,this.opacity,0.5);B.show_delay=this.first_value(B.show_delay,this.show_delay,500);B.hide_delay=this.first_value(B.hide_delay,this.hide_delay,2000);B.cursor_margin=this.first_value(B.cursor_margin,this.cursor_margin,5);this.options=B;if(C){this.link=kes.webwidgets.dombase.DomElementById(C);}this.popup=kes.webwidgets.dombase.DomElementById(A);this.popup.popup=this;if(B.hidden){this.csshide();}if(B.closebox){this.closeboxes=kes.webwidgets.dombase.DomElementsByClassName(B.closebox,this.popup);if(kes.webwidgets.dombase.DomElementHasClassName(B.closebox)){this.closeboxes[this.closeboxes.length]=this.popup;}}else{this.closeboxes=[];}this.register_events();if(qx.core.Variant.isSet("qx.client","mshtml")){var D=kes.webwidgets.dombase.DomElementDimensions(this.popup);this.ieiframe=this.createIEIFrame(this.popup,A,0,0,D.width,D.height,this.popup.style.zIndex-1);this.ieiframe.style.display="none";}},statics:{zIndex:1000,overlay:null,overlay_levels:null},members:{getLink:function(){return this.link;},closeboxes:[],options:{},ieiframe:null,createIEIFrame:function(C,F,E,D,B,A,G){C.insertAdjacentHTML("beforeBegin",'<iframe style="position:absolute;" src="javascript:\'<html></html>\'" frameborder=0 scrolling=no id="'+F+'iframe"></iframe>');ieiframe=kes.webwidgets.dombase.DomElementById(F+"iframe");ieiframe.style.top=E+"px";ieiframe.style.left=D+"px";ieiframe.style.width=B+"px";ieiframe.style.height=A+"px";ieiframe.style.zIndex=G;ieiframe.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";return ieiframe;},is_auto_open:function(){return this.options.trigger=="mouseover";},register_events:function(){var B;if(this.is_auto_open()){B=this.start_show_timer;if(this.link){qx.bom.Event.addNativeListener(this.link,"mouseout",qx.lang.Function.bind(this.stop_show_timer,this));}}else{B=this.show;}if(this.link){qx.bom.Event.addNativeListener(this.link,this.options.trigger,qx.lang.Function.bind(B,this));}if(!this.options.modal){qx.bom.Event.addNativeListener(this.popup,"click",qx.lang.Function.bind(this.bring_to_front,this));}if(this.closeboxes.length>0){for(var A=0;A<this.closeboxes.length;A++){qx.bom.Event.addNativeListener(this.closeboxes[A],"click",qx.lang.Function.bind(this.hide,this));}}if(this.closeboxes.length==0||this.options.outevents){if(this.link){switch(this.link.tagName){default:qx.bom.Event.addNativeListener(this.link,"mouseout",qx.lang.Function.bind(this.start_hide_timer,this));break;}}qx.bom.Event.addNativeListener(this.popup,"mouseover",qx.lang.Function.bind(this.stop_hide_timer,this));qx.bom.Event.addNativeListener(this.popup,"mouseout",qx.lang.Function.bind(this.start_hide_timer,this));}},start_show_timer:function(A){this.stop_show_timer(A);this.show_timer=setTimeout(qx.lang.Function.bind(this.show,this,A),this.options.show_delay);},stop_show_timer:function(A){if(this.show_timer){clearTimeout(this.show_timer);this.show_timer=null;}},start_hide_timer:function(A){this.stop_hide_timer(A);this.hide_timer=setTimeout(qx.lang.Function.bind(this.hide,this,A),this.options.hide_delay);},stop_hide_timer:function(A){if(this.hide_timer){clearTimeout(this.hide_timer);this.hide_timer=null;}},bring_to_front:function(A){if(Number(this.popup.style.zIndex)<kes.webwidgets.popup.zIndex-1){this.popup.style.zIndex=kes.webwidgets.popup.zIndex++;}},csshide:function(){this.popup.style.display="none";if(qx.core.Variant.isSet("qx.client","mshtml")&&this.ieiframe){this.ieiframe.style.display="none";}},cssshow:function(){this.popup.style.display="";if(qx.core.Variant.isSet("qx.client","mshtml")&&this.ieiframe){this.ieiframe.style.display="";}},show:function(A){this.stop_show_timer(A);this.stop_hide_timer(A);if(this.is_open){return ;}if(this.options.modal){this.show_overlay();}var B={};if(!A){B=this.get_popup_position();}else{if(this.is_auto_open()){B=this.get_popup_position(this.mouse_x,this.mouse_y);}else{B=this.get_popup_position(0,0);}}qx.bom.element.Style.set(this.popup,"left",B.x);qx.bom.element.Style.set(this.popup,"top",B.y);qx.bom.element.Style.set(this.popup,"zIndex",kes.webwidgets.popup.zIndex++);if(qx.core.Variant.isSet("qx.client","mshtml")&&this.ieiframe){qx.bom.element.Style.set(this.ieiframe,"left",B.x);qx.bom.element.Style.set(this.ieiframe,"top",B.y);qx.bom.element.Style.set(this.ieiframe,"zIndex",kes.webwidgets.popup.zIndex-1);}this.is_open=true;this.cssshow();},hide:function(A){this.is_open=false;this.csshide();if(this.options.modal){this.hide_overlay();}},get_popup_position:function(B,A){var C;switch(this.options.position){case"center":C=this.get_center_position();break;case"below":C=this.get_below_position();break;default:if(mo=this.options.position.match(/^\s*([^\s,]+)\s*,\s*(below)\+*([^\s,]*)\s*$/)){C=this.get_below_position();C.x=Number(mo[1])||mo[1];if(Number(mo[3])>0){C.y+=Number(mo[3]);}}else{if(mo=this.options.position.match(/^\s*([^\s,]+)\s*,\s*(center)\+*([^\s,]*)\s*$/)){C=this.get_center_position();C.x=Number(mo[1])||mo[1];if(Number(mo[3])>0){C.y+=Number(mo[3]);}}else{if(mo=this.options.position.match(/^\s*([^\s,]+)\s*,\s*([^\s,]+)\s*$/)){C={x:mo[1],y:mo[2]};C.x=Number(C.x)||C.x;C.y=Number(C.y)||C.y;}else{C={x:0,y:0};}}}break;}if(typeof C.x=="number"){C.x+="px";}if(typeof C.y=="number"){C.y+="px";}return C;},get_below_position:function(){var A=qx.bom.element.Location.get(this.link);return{x:A.left,y:A.bottom};},get_center_position:function(){var C=kes.webwidgets.dombase.DomElementDimensions(this.popup);var B={w:qx.bom.Viewport.getWidth(),h:qx.bom.Viewport.getHeight()};var A=(C.width>=B.w)?0:(B.w-C.width)/2;var D=(C.height>=B.h)?0:(B.h-C.height)/2;return{x:A+qx.bom.Viewport.getScrollLeft(),y:D+qx.bom.Viewport.getScrollTop()};},show_overlay:function(){if(!kes.webwidgets.popup.overlay){var A=document.createElement("div");A.setAttribute("id","popup_overlay");qx.bom.element.Style.setCss(A,"display:none; background-color:whitesmoke; position:absolute; top:0px; left:0px; width:100%; height:500px;");document.body.appendChild(A);kes.webwidgets.popup.overlay=A;kes.webwidgets.popup.overlay_levels=[];}kes.webwidgets.popup.overlay.style.height=(qx.bom.Document.getHeight()-5)+"px";var B=kes.webwidgets.popup.zIndex++;kes.webwidgets.popup.overlay.style.zIndex=B;kes.webwidgets.popup.overlay_levels.push(B);if(kes.webwidgets.popup.overlay_levels.length==1){kes.webwidgets.popup.overlay.style.display="";qx.bom.element.Opacity.set(kes.webwidgets.popup.overlay,this.options.opacity);}else{kes.webwidgets.popup.overlay.style.zIndex=B;}},hide_overlay:function(){kes.webwidgets.popup.overlay_levels.pop();var A=kes.webwidgets.popup.overlay_levels.pop();if(A){kes.webwidgets.popup.overlay_levels.push(A);kes.webwidgets.popup.overlay.style.zIndex=A;}else{kes.webwidgets.popup.overlay.style.display="none";}},first_value:function(){for(var A=0;A<arguments.length;A++){if(arguments[A]!==undefined){return arguments[A];}}return undefined;}}});qx.Class.define("kes.webwidgets.QueryString",{extend:qx.core.Object,construct:function(A){this.data={};this.Read((A)?A:null);},members:{data:null,Read:function(D){this.data={};var C,B;var E=(D)?D:new String(window.location.search);E=E.substr(1,E.length);C=E.split("&");for(var A=0;A<C.length;A++){B=C[A].split("=");this.data[B[0]]=B[1];}},GetValue:function(A){return this.data[A];},SetValue:function(A,B){if(B==null){delete this.data[A];}else{this.data[A]=B;}},ToString:function(){var B=new String("");for(var A in this.data){if(B!=""){B+="&";}if(this.data[A]){B+=A+"="+this.data[A];}}return(B.length>0)?"?"+B:B;},Clear:function(){delete this.data;this.data=[];}}});qx.Class.define("kes.webwidgets.Tabs",{extend:qx.core.Object,construct:function(){var A=qx.lang.Object.mergeWith({trigger:"click",showcssclass:"",hidecssclass:"",wrapnext:true},arguments[0]||{},true);this.options=A;this.links=[];this.containers=[];},members:{links:null,containers:null,options:null,currenttab:null,slideshowint:null,ResolveLink:function(A){switch(typeof (A)){case"string":A=kes.webwidgets.dombase.DomElementById(A);break;case"number":A=this.links[A];break;}return A;},addTab:function(B,A){if(!qx.lang.Array.contains(this.links,B)){this.links.push(kes.webwidgets.dombase.DomElementById(B));this.containers.push(kes.webwidgets.dombase.DomElementById(A));qx.lang.Array.getLast(this.links).className=this.options.hidecssclass;qx.bom.Event.addNativeListener(qx.lang.Array.getLast(this.links),this.options.trigger,qx.lang.Function.bind(this.setActiveTab,this,this.links.length-1));}},setActiveTab:function(B){B=this.ResolveLink(B);for(var A=0;A<this.links.length;A++){if(this.links[A]==B){this.containers[A].style.display="";this.links[A].className=this.options.showcssclass;this.currenttab=A;}else{this.containers[A].style.display="none";this.links[A].className=this.options.hidecssclass;}}},next:function(A){if(!this.currenttab){this.setActiveTab(0);return ;}idx=this.currenttab+1;if(idx>=this.links.length){idx=(this.options.wrapnext||A)?0:this.links.length-1;}this.setActiveTab(this.links[idx]);},prev:function(A){if(!this.currenttab){this.setActiveTab(0);return ;}idx=this.currenttab-1;if(idx<0){idx=(this.options.wrapnext||A)?this.links.length-1:0;}this.setActiveTab(this.links[idx]);},startSlideShow:function(A){if(this.slideshowint){this.stopSlideShow();}this.slideshowint=qx.lang.Function.periodical(this.next,A,this,true);},stopSlideShow:function(){if(this.slideshowint){clearInterval(this.slideshowint);this.slideshowint=null;}}}});qx.Class.define("kes.webwidgets.RpcSingleton",{extend:qx.core.Object,type:"singleton",construct:function(A){this.CallsQueue=[];this.CallsCallbacks=[];},members:{RPCLink:"",RPCClient:null,RPCType:"qx",CallsQueueEnabled:false,CallsQueue:null,CallsCallbacks:null,showException:function(A){qx.log.Logger.error("RPC-Execption in origin: "+A.origin+"; code: "+A.code+"; message: "+A.message);},setLink:function(B,A){if(!B||B==""){if(qx.log){qx.log.Logger.error("no rpc-link given");}return false;}if(this.RPCLink!=""&&B!=this.RPCLink){if(qx.log){qx.log.Logger.error("different Link: "+B+" != "+this.RPCLink);}return false;}if(this.RPCLink!=""){return true;}this.RPCLink=B;if(!A||A=="qx"){this.RPCClient=new qx.io.remote.Rpc(this.RPCLink);}else{alert("alte jsonrpc-Bibliothek nicht mehr unterstuetzt");}this.RPCType=A;return true;},StartCallsQueue:function(){if(!this.CallsQueueEnabled){this.CallsQueue=[];this.CallsCallbacks=[];this.CallsQueueEnabled=1;}else{this.CallsQueueEnabled++;}},EnqueueCall:function(B,C){if(this.CallsQueueEnabled){args=[];for(var A=2;A<arguments.length;A++){args.push(arguments[A]);}this.CallsQueue.push({methodName:C,params:args});this.CallsCallbacks.push(B);}else{this.RPCClient._callInternal(arguments,1);}},ExecuteQueuedCalls:function(){if(this.CallsQueueEnabled){if(this.CallsQueueEnabled>1){this.CallsQueueEnabled--;}else{if(this.CallsQueue.length>0){this.RPCClient.callAsync(qx.lang.Function.bind(this.ProcessQueueResponses,this,qx.lang.Array.copy(this.CallsCallbacks)),"system.multicall",this.CallsQueue);}this.CallsQueue=[];this.CallsCallbacks=[];this.CallsQueueEnabled=false;}}},ProcessQueueResponses:function(C,E,A,D){for(var B=0;B<C.length;B++){if(A||!E||!E[B]||(E[B].faultCode)){fault=(A)?A:((E&&E[B]&&E[B].faultCode)?E[B].faultCode:"undefined");C[B](null,fault,D);}else{C[B](E[B][0],null,D);}}}}});qx.Class.define("kes.webwidgets.InflatableText",{extend:kes.webwidgets.popup,construct:function(F,B,G,D){var C=qx.lang.Object.mergeWith({hidden:true,linkbg:"white"},arguments[3]||{},true);C.duration=this.first_value(C.duration,this.duration,0.5);C.show_duration=this.first_value(C.show_duration,C.duration);C.hide_duration=this.first_value(C.hide_duration,C.duration);C.opacity=this.first_value(C.opacity,this.opacity,0.5);C.show_delay=this.first_value(C.show_delay,this.show_delay,500);C.hide_delay=this.first_value(C.hide_delay,this.hide_delay,2000);C.cursor_margin=this.first_value(C.cursor_margin,this.cursor_margin,5);this.options=C;this.textelement=kes.webwidgets.dombase.DomElementById(F);this.baseheight=B;pos=qx.bom.element.Location.get(this.textelement);width=qx.bom.element.Dimension.getWidth(this.textelement);if(D){refel=kes.webwidgets.dombase.DomElementById(D);refpos=qx.bom.element.Location.get(refel);pos.left-=refpos.left;pos.top-=refpos.top;}var E=kes.webwidgets.dombase.DomElementById(G);qx.bom.element.Style.setCss(E,"display:none; position:absolute; overflow:hidden; top:"+pos.top+"px; left:"+pos.left+"px; width:"+width+"px;");this.popup=E;this.popup.innerHTML='<div style="padding-bottom:5px;zoom:1;">'+this.textelement.innerHTML+"</div>";dims=kes.webwidgets.dombase.DomElementDimensions(this.popup);if(dims.height>this.baseheight){this.overlayheight=dims.height;var A=document.createElement("div");A.setAttribute("class","inflatable_link");A.innerHTML='<a href="javascript:void(0)" class="inflatable_link">alles lesen</a>';lheight=17;qx.bom.element.Style.setCss(A,"position:absolute; top:"+(this.baseheight-lheight)+"px; left:0px; width:"+width+"px; height:"+lheight+"px; background-color:"+this.options.linkbg+";");this.popup.appendChild(A);this.link=A;this.popup.style.height=this.baseheight+"px";this.popup.style.display="";this.textelement.style.visibility="hidden";this.register_events();this.bring_to_front();if(qx.core.Variant.isSet("qx.client","mshtml")){this.ieiframe=this.createIEIFrame(this.popup,F,pos.top,pos.left,width,this.baseheight,this.popup.style.zIndex-1);}}},members:{textelement:null,overlayheight:0,baseheight:0,register_events:function(){qx.bom.Event.addNativeListener(this.link,"click",qx.lang.Function.bind(this.show,this));qx.bom.Event.addNativeListener(this.popup,"mouseover",qx.lang.Function.bind(this.stop_hide_timer,this));qx.bom.Event.addNativeListener(this.popup,"mouseout",qx.lang.Function.bind(this.start_hide_timer,this));},csshide:function(){this.popup.style.height=this.baseheight+"px";this.link.style.display="";if(qx.core.Variant.isSet("qx.client","mshtml")&&this.ieiframe){this.ieiframe.style.height=this.baseheight+"px";}},cssshow:function(){this.popup.style.height=this.overlayheight+"px";this.link.style.display="none";if(qx.core.Variant.isSet("qx.client","mshtml")&&this.ieiframe){this.ieiframe.style.height=this.overlayheight+"px";}},show:function(A){this.stop_show_timer(A);this.stop_hide_timer(A);if(this.is_open){return ;}this.is_open=true;this.cssshow();},hide:function(A){this.is_open=false;this.csshide();}}});