WGA=function(){function v(){if(!f)return 0;var t=/firefox\/(\d+)/g,n=t.exec(e);return n&&n.length&&n.length>1?Number(n[1]):0}function m(){if(r){var t=/msie (\d+)/g,n=t.exec(e);return n&&n.length&&n.length>1?Number(n[1]):0}if(s){var t=/rv:(\d+)/g,n=t.exec(e);return n&&n.length&&n.length>1?Number(n[1]):0}return 0}var e=navigator.userAgent.toLowerCase(),t=e.indexOf("safari")>-1,n=e.indexOf("webkit")>-1,r=e.indexOf("msie")>-1,i=e.indexOf("msie 7")>-1,s=e.indexOf("trident")>-1,o=e.indexOf("trident")>-1&&e.indexOf("rv:11")>-1,u=e.indexOf("trident")>-1&&e.indexOf("rv:12")>-1,a=!n&&e.indexOf("gecko")>-1,f=e.indexOf("firefox")>-1,l=e.indexOf("firefox/3")>-1,c=e.indexOf("firefox/4")>-1,h=e.indexOf("iphone")>-1,p=e.indexOf("ipad")>-1,d=e.indexOf("android")>-1;return{isSafari:t,isWebKit:n,isIE:r,isIE7:i,isIE11:o,isIE12:u,isTrident:s,IEVersion:m,isGecko:a,isFirefox:f,isFirefox3:l,isFirefox4:c,fireFoxVersion:v,isIPhone:h,isIPad:p,isAndroud:d,isMobile:h||p||d}}(),WGA.responsive={breakpoints:{medium:0,large:0},getMediaWidth:function(){if(window.matchMedia)return window.matchMedia("(min-width:"+this.breakpoints.large+"px)").matches?"large":window.matchMedia("(min-width:"+this.breakpoints.medium+"px)").matches?"medium":"small";var e=window.innerWidth||$(window).width();return e<this.breakpoints.medium?"small":e<this.breakpoints.large?"medium":"large"}},WGA.util={showException:function(e,t){e+="\n",t.fileName&&(e+="file: "+t.fileName+"\n"),t.lineNumber&&(e+="line: "+t.lineNumber+"\n"),alert(e+"\n"+t.message)},showReloadMessage:function(e){var t="wga-reload-message",n=document.getElementById(t);if(!n){n=document.createElement("div"),n.id="wga-reload-message",n.style.padding="20px",n.style.position="fixed",n.style.left=n.style.right=n.style.top=0,n.style.backgroundColor="brown",n.style.color="white",n.style.boxShadow="0 0 10px black",n.style.zIndex=1e4;var r=document.createElement("button");r.appendChild(document.createTextNode("x")),r.style.float="right",r.style.color="#efefef",r.style.border="none",r.style.background="transparent",r.onclick=function(){document.getElementById(t).style.display="none"},n.appendChild(r);var i=document.createElement("span");n.appendChild(i);var s=document.createElement("button");s.style.margin="10px 0 0 0",s.appendChild(document.createTextNode(WGA.util.label({de:"Seite neu laden",en:"Reload Page"},"en"))),s.onclick=function(){top.location.reload()},n.appendChild(s);var o=document.createElement("button");o.style.margin="10px 0 0 10px",o.appendChild(document.createTextNode(WGA.util.label({de:"Schließen",en:"Close"},"en"))),o.onclick=function(){document.getElementById(t).style.display="none"},n.appendChild(o);var u=document.body.firstElementChild;u?document.body.insertBefore(n,u):document.body.appendChild(n),s.focus()}n.children[1].innerHTML=e+"<br>",n.style.display="block"}},WGA.util.getURLTypeFromClassName=function(e){var t=e.split(" ");for(var n=0;n<t.length;n++){var r=t[n].split("-");if(r[0]=="wga"&&r[1]=="urltype")return r[2]}return null},WGA.util.getLinkInfo=function(e){var t=e.getAttribute("linktype"),n=e.getAttribute("wgakey");if(!t){t=WGA.util.getURLTypeFromClassName(e.className)||"exturl";var r=WGA.util.decodeURI(e.href).split("/");if(t=="file"){var i=r.pop(),s=r.pop();n=s+"/"+i}else t=="exturl"?n=e.href:n=r.pop()}return n&&(n=n.split("?")[0],n=n.split("#")[0]),{type:t,key:n}},WGA.util.decodeURI=function(e){return decodeURI(e.replace(/\+/g," ").replace(/%2B/g,"+"))},WGA.util.makeScriptlets=function(e,t){function o(e){var t=self.location.hostname,n=self.location.port,r=self.location.protocol,o=e,u=i.split(".");u.pop(),u.push("\\d+");var a=new RegExp(u.join("\\.")+"/","gi");o=o.replace(a,"{%$key%}/");var f=n;return f&&f!=null&&f!=""&&(f=":"+f),a=new RegExp(r+"//"+t+f+WGA.contextpath+"/"+s,"gi"),o=o.replace(a,"../../../{%$db:dbkey%}"),a=new RegExp(WGA.contextpath+"/"+s,"gi"),o=o.replace(a,"../../../{%$db:dbkey%}"),a=new RegExp("/"+s.replace(/\./g,"\\.")+"/","gi"),o=o.replace(a,"/{%$db:dbkey%}/"),o}var t=t||{},n=t.document||window.document,r=t.contentinfo||WGA.contentinfo,i=r?r.contentkey:myContentKey,s=r?r.dbkey:myDbKey,u=n.createElement("div");u.innerHTML=e;var a=u.getElementsByTagName("a");for(var f=0;f<a.length;f++){var l=a.item(f),c=l.getAttribute("linktype");if(c){l.removeAttribute("linktype"),l.removeAttribute("wgakey");var h=l.className;h=h.replace(/wga-urltype-\w+ */,""),l.className=h+(h?" ":"")+"wga-urltype-"+c}else c=WGA.util.getLinkInfo(l).type;var p=WGA.util.decodeURI(l.href).split("/");switch(c){case"int":var d=p.pop();l.setAttribute("wga:href","{%!contenturl:"+d+"%}"),l.removeAttribute("href");break;case"intname":var v=p.pop();l.setAttribute("wga:href","{%!namedcontenturl:"+v+"%}"),l.removeAttribute("href");break;case"file":var m=p.pop(),g=p.pop();l.setAttribute("wga:href","{%!fileurl:"+g+","+m+"%}"),l.removeAttribute("href");break;case"intfile":var m=p.pop();l.setAttribute("wga:href","{%!fileurl:"+m+"%}"),l.removeAttribute("href")}}var y=u.getElementsByTagName("img");for(var f=0;f<y.length;f++){var b=y.item(f),w=WGA.util.getURLTypeFromClassName(b.className),p=WGA.util.decodeURI(b.src).split("/");switch(w){case"file":var m=p.pop(),g=p.pop();b.setAttribute("wga:src","{%!imgurl:"+g+","+m+"%}"),b.removeAttribute("src");break;case"intfile":var m=p.pop();b.setAttribute("wga:src","{%!imgurl:"+m+"%}"),b.removeAttribute("src");break;case null:b.setAttribute("wga:src",o(b.src)),b.removeAttribute("src")}}var e=u.innerHTML;return e=e.replace(/wga:href="([^"]*)"/g,'href="$1"'),e=e.replace(/wga:src="([^"]*)"/g,'src="$1"'),e},WGA.util.maskElement=function(e){function t(e){e.stopPropagation()}try{document.all?(e.style.width=e.offsetWidth,e.style.filter="alpha(opacity:20)",window.opera?(e.style.opacity=.2,e.addEventListener("click",t,!0),e.addEventListener("mouseover",t,!0)):e.setCapture(!0)):(e.style.opacity=.2,e.addEventListener&&(e.addEventListener("click",t,!0),e.addEventListener("mouseover",t,!0)))}catch(n){WGA.util.showException("mask-element",n)}},WGA.util.unmaskElement=function(e){},WGA.util.generateInterval=function(e,t){var n=(Math.pow(2,e)-1)*1e3;return n>t&&(n=t),Math.random()*n},WGA.util.label=function(e,t){if(navigator.languages){for(var n=0;n<navigator.languages.length;n++){var r=e[navigator.languages[n]];if(r)return r}for(var n=0;n<navigator.languages.length;n++){var i=navigator.languages[n],s=i.indexOf("-");if(s!=-1){var o=i.substring(0,s),r=e[o];if(r)return r}}}else if(navigator.language){var r=e[navigator.language];if(r)return r;var s=navigator.language.indexOf("-");if(s!=-1){var o=navigator.language.substring(0,s),r=e[o];if(r)return r}}return t?e[t]:null},WGA.buildContentURL=function(e){return requestType=="statictml"||requestType=="null"?"":mediaKeyMode==1?e!=null?WGPPath+"/"+myLayout+"/"+e+"."+myMedium:WGPPath+"/"+myLayout+"."+myMedium:e!=null?WGPPath+"/"+myMedium+"/"+myLayout+"/"+e:WGPPath+"/"+myMedium+"/"+myLayout},WGA.onload=function(){var e=[];return{register:function(t){return e.push(t),t},reset:function(){e=[]},execute:function(){while(e.length>0)e.shift()();WGA.pageLoaded=!0}}}(),window.addEventListener?window.addEventListener("load",WGA.onload.execute,!0):window.attachEvent&&window.attachEvent("onload",WGA.onload.execute),WGA.b4submit=function(){var e={};return{register:function(t,n){return e[t]||(e[t]=[]),e[t].push(n),n},onsubmit:function(t){if(!t||t.id==""||!e[t.id])return!0;for(var n=0;n<e[t.id].length;n++){var r=e[t.id][n];if(!r(t))return!1}return!0},reset:function(t){e[t]=[]}}}(),WGA.parseActionLink=function(e){var t=e.split("/");for(var n=0;n<t.length;n++)t[n]=="##NULL##"&&(t[n]=null);switch(t.length){case 1:return{versionCompliance:null,formID:null,portletKey:null,actionLink:t[0]};case 2:return{versionCompliance:null,formID:t[0],portletKey:null,actionLink:t[1]};case 3:return{versionCompliance:null,formID:t[0],portletKey:t[1],actionLink:t[2]};case 4:return{versionCompliance:t[0],formID:t[1],portletKey:t[2],actionLink:t[3]};default:alert("Error calling Action. Invalid number of action link parts:  "+t.length)}},WGA.isVersionComplianceSupporting=function(e,t){if(!e)return!1;var n=e.split("."),r=parseInt(n[0]),i=parseInt(n[1]);return t=="encodeUrlParamsDefault"?r>6?!0:r==6&&i>=1?!0:!1:t=="keepUrlParamsDefault"?r>=6:!1},WGA.callAction=function(e,t){return t&&typeof t!="object"&&(t=undefined),WGA.action({action:e,params:t})},WGA.action=function(e){var t=WGA.parseActionLink(e.action),n=e.params!=undefined?e.params:{},r=[];t.portletKey&&(WGA.portlet.collectPortletStates(r,t.portletKey),e.portletEvent&&(e.portletEvent.index?n.$portletEvent=e.portletEvent.index:n.$portletEventName=e.portletEvent.name));var i=e.keepParams==undefined?WGA.isVersionComplianceSupporting(t.versionCompliance,"keepUrlParamsDefault"):e.keepParams,s=e.encodeParams==undefined?WGA.isVersionComplianceSupporting(t.versionCompliance,"encodeUrlParamsDefault"):e.encodeParams;if(t.portletKey&&!t.formID&&r.length>0){var o=document.createElement("form"),u=WGA.toQueryString([],i,s);o.setAttribute("action",location.pathname),o.setAttribute("method","POST"),o.setAttribute("accept-charset","UTF-8"),n.$action=t.actionLink,n.$portletStates=r.join("\n");for(var a in n)if(n.hasOwnProperty(a)){var f=document.createElement("input");f.setAttribute("type","hidden"),f.setAttribute("name",a),f.setAttribute("value",n[a]),o.appendChild(f)}document.body.appendChild(o),o.submit()}else if(t.formID==null){n.$action=t.actionLink;var l=location.pathname+"?"+WGA.toQueryString(n,i,s);location.replace(l)}else{var o=document.forms[t.formID];if(!o||!o.$formaction)return alert('Error while calling action. TMLForm "'+t.formID+'" not found.'),!1;o.$formaction.value=t.actionLink,r.length>0&&(o.$portletstates.value=r.join("\n"));var u=WGA.toQueryString(n,i,s);o.action=location.pathname+(u?"?"+u:""),WGA.b4submit.onsubmit(o)&&o.submit()}return!0},WGA.getQueryString=function(e){function r(e){try{return decodeURIComponent(e).replace(/\r\n|\r|\n/g,"\r\n")}catch(t){return""}}var t=e.location.search,n={};return t.length>1&&(t=t.substr(1),t.replace(/([^&]+)/g,function(e,t){var i=t,s=null,o=t.indexOf("=");o!=-1&&(i=t.substring(0,o),s=t.substring(o+1)),i=r(i),s!=null&&(s=r(s)),i.length>0&&(n[i]=s)})),n},WGA.escapeQueryPart=function(e){return encodeURIComponent(e)},WGA.isObjectType=function(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"},WGA.toQueryString=function(e,t,n,r){var i={};if(t==undefined||t==1){var s=WGA.getQueryString(window);for(var o in s)s[o]!=null?i[String(o)]=String(s[o]):i[String(o)]=null}for(var o in e)i[String(o)]=e[o];var u=[];for(var o in i){if(r&&r.hasOwnProperty(o))continue;var a=i[o];WGA.pushQueryParameter(o,a,u,n)}return u.join("&")},WGA.pushQueryParameter=function(e,t,n,r){if(t===undefined||t===null)r&&(e=WGA.escapeQueryPart(e)),n.push(e);else if(WGA.isObjectType(t,"Array"))for(var i=0;i<t.length;i++)WGA.pushQueryParameter(e,t[i],n,r);else r&&(e=WGA.escapeQueryPart(e)),r&&(t=WGA.escapeQueryPart(t)),n.push(e+"="+t)},WGA.loadScript=function(e){if(e.id&&document.getElementById(e.id)){e.onload&&e.onload();return}var t=document.getElementsByTagName("head")[0],n=document.createElement("script");n.src=e.src,e.id&&(n.id=e.id),n.type="text/javascript",n.onload=e.onload,n.onreadystatechange=function(){this.readyState=="loaded"&&e.onload()},t.appendChild(n)},WGA.ajax={portletFormCallbacks:{},runningPortlets:{},hasRunningPortlets:function(){var e=(new Date).getTime();for(var t in this.runningPortlets){var n=this.runningPortlets[t].getTime();if(e-n>1e4){delete this.runningPortlets[t];continue}return!0}return!1}},WGA.ajax.b4post=function(){var e={};return{register:function(t,n){return e[t]||(e[t]=[]),e[t].push(n),n},execute:function(t){while(e[t]&&e[t].length>0)e[t].shift()()},reset:function(){e={}}}}(),WGA.ajax.buildClientCallbackInformation=function(e){return{callback:e.callback,params:e.params,keepParams:e.keepParams,encodeParams:e.encodeParams,portletEvent:e.portletEvent}},WGA.ajax.action=function(e){var t=WGA.parseActionLink(e.action);(e.id==undefined||e.id==null)&&t.portletKey!=null&&(e.id=t.portletKey);if(WGA.debug&&console&&console.log){var n="";t.actionLink.charAt(0)=="$"?n+="Executing AJAX default action '"+t.actionLink+"'":n+="Executing AJAX action",e.portletEvent&&(n+=" triggered by portlet event '"+e.portletEvent.name+"'"),n+=", portlet: "+e.id,t.formID&&(n+=", form: "+t.formID),console.log(n)}var r=document.getElementById("$ajaxContentDiv_"+e.id);if(!r)return!1;WGA.ajax.runningPortlets[e.id]=new Date;if(t.formID==null)WGA.ajax.post(e);else{WGA.ajax.portletFormCallbacks[e.id]=WGA.ajax.buildClientCallbackInformation(e);var i=document.getElementById(t.formID);if(!i||!i.$formaction)return delete WGA.ajax.runningPortlets[e.id],i?alert('TMLForm "'+t.formID+'" has no $formaction.'):alert('Error while calling action. TMLForm "'+t.formID+'" not found.'),!1;i.$formaction.value=e.action,i.$ajaxcallid.value=e.id,e.graydiv!=undefined?i.$ajaxgraydiv.value=e.graydiv:i.$ajaxgraydiv.value="#null#",e.mode?i.$ajaxmode.value=e.mode:i.$ajaxmode.value="#null";var s="$wga_ajaxIFrame_"+e.id,o=document.getElementById(s);o||(o=document.createElement("iframe"),o.id=s,o.name=s,document.body.appendChild(o),WGA.isIE&&(document.frames[s].name=s)),o.style.position="absolute",o.style.visibility="hidden",o.style.left=-1e4,o.style.top=-1e4,o.style.width=o.style.height=0,i.target=s,i.action=WGA.contextpath+"/ajaxform",WGA.b4submit.onsubmit(i)&&i.submit()}},WGA.ajax.formCallback=function(e){var t=WGA.ajax.portletFormCallbacks[e.id];delete WGA.ajax.portletFormCallbacks[e.id],e.callback=t.callback,e.params=t.params,e.keepParams=t.keepParams,e.encodeParams=t.encodeParams,e.portletEvent=t.portletEvent,WGA.ajax.post(e);var n="$wga_ajaxIFrame_"+e.id,r=document.getElementById(n);r&&document.body.removeChild(r)},WGA.ajax.callAction=function(e,t,n,r,i){WGA.ajax.action({action:e,id:t,graydiv:n,callback:r,params:i})},WGA.ajax.request=function(e,t,n,r,i){var s=!1;window.XMLHttpRequest?s=new XMLHttpRequest:window.ActiveXObject&&(s=new ActiveXObject("Microsoft.XMLHTTP"));if(!s)return alert("unable to get xmlHttpRqeuest Object");s.onreadystatechange=function(){if(s.readyState==4){if(typeof WGA=="undefined")return;r(s),delete s.onreadystatechange,s=null}};var e=e.toUpperCase();s.open(e,t,!0);if(i)for(h in i)s.setRequestHeader(h,i[h]);else e=="POST"&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded");s.send(n)},WGA.ajax.post=function(actionDef,customObj){var link=WGA.parseActionLink(actionDef.action);(actionDef.id==undefined||actionDef.id==null)&&link.portletKey!=null&&(actionDef.id=link.portletKey);var ajaxInfo=eval("$ajaxInfo_"+actionDef.id),strURL=location.pathname+"?$action="+link.actionLink;customObj&&(strURL=strURL+"&"+WGA.toQueryString(customObj,!1)),actionDef.mode!="norefresh"&&WGA.event.removeListeners(actionDef.id),WGA.ajax.b4post.execute(actionDef.id);var divTag=document.getElementById("$ajaxContentDiv_"+actionDef.id);if(divTag==null){delete WGA.ajax.runningPortlets[actionDef.id];return}(actionDef.graydiv==undefined||actionDef.graydiv)&&window.setTimeout(function(){WGA.util.maskElement(divTag)},250);var host=location.host,protocol=location.protocol,absoluteURL=protocol+"//"+host+strURL,urlParams=actionDef.params!=undefined?actionDef.params:{};urlParams.$ajaxInfo=ajaxInfo,actionDef.mode&&(urlParams.$ajaxMode=actionDef.mode),actionDef.tmlformSessionKey&&(urlParams.$ajaxformkey=actionDef.tmlformSessionKey),actionDef.portletEvent&&(actionDef.portletEvent.index?urlParams.$portletEvent=actionDef.portletEvent.index:urlParams.$portletEventName=actionDef.portletEvent.name,JSON&&(urlParams.$portletEventParams=JSON.stringify(actionDef.portletEvent.params)));var keepParams=actionDef.keepParams==undefined?WGA.isVersionComplianceSupporting(link.versionCompliance,"keepUrlParamsDefault"):actionDef.keepParams,encodeParams=actionDef.encodeParams==undefined?WGA.isVersionComplianceSupporting(link.versionCompliance,"encodeUrlParamsDefault"):actionDef.encodeParams,portletStates=[];WGA.portlet.collectPortletStates(portletStates,actionDef.id),portletStates.length>0&&(urlParams.$portletState=portletStates);var queryString=WGA.toQueryString({},keepParams,encodeParams,urlParams);queryString!=""&&(queryString="&"+queryString);var postData=WGA.toQueryString(urlParams,keepParams,encodeParams);WGA.ajax.request("POST",absoluteURL+queryString,postData,function(e){delete WGA.ajax.runningPortlets[actionDef.id],actionDef.mode=="norefresh"?WGA.ajax.callbackNoRefresh(e):actionDef.callback==undefined?WGA.ajax.replaceHTML(e.responseText,actionDef.id):(actionDef.callback(e),WGA.portlet.onload.execute(actionDef.id),WGA.event.fireEvents()),WGA.robotTest&&WGA.robotTest.idle()})},WGA.ajax.replaceHTML=function(e,t){var n=document.getElementById("$ajaxDiv_"+t);if(n==null)return;n.innerHTML="<div id='$ajaxContentDiv_"+t+'\'><span style="display:none">ajax</span>'+e+"</div>";var r="",i=n.getElementsByTagName("script");for(var s=0;s<i.length;s++){var o=i[s].innerHTML;r+="\ntry{"+o+"\n}catch(e){console && console.log('Script Error in AJAX content',e)}"}if(WGA.isIE)WGA.ajax.executeScriptElement(r),WGA.portlet.onload.execute(t),WGA.event.fireEvents();else{var i;do{i=n.getElementsByTagName("script");if(!i.length)break;var u=i[0];u.parentNode.removeChild(u)}while(!0);r+="\nWGA.portlet.onload.execute('"+t+"');",r+="\nWGA.event.fireEvents();",window.setTimeout(r,10)}},WGA.ajax.executeScriptElement=function(e){var t=document.createElement("script");document.getElementsByTagName("head")[0].appendChild(t),t.text=e,document.getElementsByTagName("head")[0].removeChild(t)},WGA.ajax.callbackNoRefresh=function(e){var t=e.responseText;t+="\nWGA.event.fireEvents();",WGA.isIE?WGA.ajax.executeScriptElement(t):window.setTimeout(t,10)},WGA.event=function(){var e=[],t={},n;return{init:function(){e=[],t={},n&&window.clearTimeout(n),n=null},dispatch:function(t){WGA.debug&&console&&console.log&&console.log("Dispatching portlet event '"+t.name+"' from source '"+t.source+"', params: "+JSON.stringify(t.params)),e.push(t)},fireEvent:function(e,t,n){WGA.event.dispatch({name:e,source:t||"WGA",params:n||{}}),WGA.event.fireEvents()},addListener:function(e,n,r){t[e]||(t[e]={}),t[e][n]||(t[e][n]=[]),t[e][n].push(r)},removeListeners:function(e){delete t[e],WGA.portlet.forEachChild(e,WGA.event.removeListeners)},fireEvents:function(){if(WGA.ajax.hasRunningPortlets()){n&&window.clearTimeout(n),n=window.setTimeout(WGA.event.fireEvents,1e3);return}while(e.length>0){var r=e.shift();for(var i in t)if(t[i][r.name]){var s=t[i][r.name];for(var o=0;o<s.length;o++)try{WGA.debug&&console&&console.log&&console.log("Executing portlet event '"+r.name+"' for portlet "+i),s[o](r)}catch(u){WGA.util.showException("Error in WGA event listener for event '"+r.name+"'",u)}}}}}}(),WGA.onload.register(WGA.event.fireEvents),WGA.portlet=function(){function a(e){var t=r[e];if(t)for(var n=0;n<t.length;n++){var i=t[n];i&&i.destroy&&i.destroy(e),delete i}delete r[e]}var e={},t={},n={},r={},i={},s=[],o="de.innovationgate.wga.portletstate.",u="de.innovationgate.wga.childportlets.";return{init:function(){e={},t={},n={},r={},i={},s=[]},onload:function(){var e={};return{register:function(t,n){return t==""?WGA.onload.register(n):(e[t]||(e[t]=[]),e[t].push(n),n)},execute:function(t){try{var n=e[t];while(n&&n.length>0)n.shift()(t);WGA.portlet.forEachChild(t,WGA.portlet.onload.execute)}catch(r){WGA.util.showException("portlet.onload exception",r)}},executeAll:function(){for(pkey in e)WGA.portlet.onload.execute(pkey)}}}(),getObjectReg:function(){return r},register:function(r){var i=r.portletKey;this.forEachChild(i,a),a(i),e[i]={};for(var s=0;s<r.parentKeys.length;s++){var o=r.parentKeys[s];e[o][i]=i}t[i]=r.parentKeys,n[i]=r.parentForm},registerState:function(e,n,r,s,a,f){var l=!1;if(s){var c=this.fetchState(e);c&&c.data!=n&&(l=!0,a=!0)}if(!l){stateObject=JSON.stringify({data:n,defaultState:f&&f==1});if(WGA.hasLocalStorage()){window.sessionStorage.setItem(o+WGA.uriHash+"."+e,stateObject);var h=t[e];if(h){var p=h[0];if(p){var d=[],v=window.sessionStorage.getItem(u+WGA.uriHash+"."+p);v&&(d=v.split(","));var m=!1;for(var g=0;g<d.length;g++){var y=d[g];if(y==e){m=!0;break}}m||d.push(e),window.sessionStorage.setItem(u+WGA.uriHash+"."+p,d.join(","))}}}else i[e]=stateObject}a&&this.registerPortletForReload(e,r)},fetchState:function(e){return WGA.hasLocalStorage()?JSON.parse(window.sessionStorage.getItem(o+WGA.uriHash+"."+e)):i[e]?JSON.parse(i[e]):null},disposeState:function(e){WGA.hasLocalStorage()?window.sessionStorage.removeItem(o+WGA.uriHash+"."+e):delete i[e]},collectPortletStates:function(e,n){var r=t[n];for(var i=0;r&&i<r.length;i++){var s=r[i],o=this.fetchState(s);o&&e.push(s+"//"+o.data)}this.descendCollectPortletStates(e,n,!0)},descendCollectPortletStates:function(e,t,n){var r=this.fetchState(t);r&&e.push(t+"//"+r.data);if(WGA.hasLocalStorage()){var i=window.sessionStorage.getItem(u+WGA.uriHash+"."+t),s=[];i&&(s=i.split(","));for(var o=0;o<s.length;o++)WGA.portlet.descendCollectPortletStates(e,s[o],!0)}else this.forEachChild(t,function(t){WGA.portlet.descendCollectPortletStates(e,t,!0)})},registerPortletForReload:function(e,t){WGA.pageLoaded?(s.push({key:e,processId:t,children:[]}),WGA.portlet.performPortletReloads()):(s.length==0&&WGA.onload.register(function(){WGA.portlet.performPortletReloads()}),s.push({key:e,processId:t,children:[]}))},performPortletReloads:function(){var e=[],r=[],i={};for(var o=0;o<s.length;o++)i[s[o].key]=o;for(var o=0;o<s.length;o++){var u=s[o],a=t[u.key],f=!1;if(a)for(var l=0;l<a.length;l++){var c=a[l],l=i[c];if(l){s[l].children.push(u),f=!0;break}}f||e.push(u)}s=[];for(var h=0;h<e.length;h++){var u=e[h],p=n[u.key];p||(p="##NULL##");var r=[];this.collectProcessIds(r,u),WGA.debug&&console&&console.log&&console.log("Automatic portlet reload, portlet key: "+u.key),WGA.ajax.action({action:p+"/"+u.key+"/$refresh",params:{$portletReloadOf:u.key,$reloadProcessContexts:r},keepParams:!0})}},collectProcessIds:function(e,t){e.push(t.processId);for(var n=0;n<t.children.length;n++)this.collectProcessIds(e,t.children[n])},generateUUID:function(){var e=(new Date).getTime(),t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&7|8).toString(16)});return t},unregister:function(n){var r=t[n];for(var i=0;r&&i<r.length;i++){var s=r[i];e[s]&&e[s][n]&&delete e[s][n]}delete e[n],delete t[n]},forEachChild:function(t,n){var r=e[t];for(var i in r)n(r[i])},registerObject:function(e,t){return r[e]||(r[e]=[]),r[e].push(t),t},unregisterObject:function(e,t){if(!r[e])return;var n=r[e];for(var i=0;i<n.length;i++){var s=n[i];if(s==t){var o=n[i];return o.destroy&&o.destroy(e),delete o,!0}}return!1}}}(),WGA.onload.register(WGA.portlet.onload.executeAll),WGA.hasLocalStorage=function(){var e="test",t=window.sessionStorage;try{return t.setItem(e,"1"),t.removeItem(e),!0}catch(n){return!1}},WGA.websocket={WINDOWID:"de.innovationgate.wga.windowId",reconnectAttempts:1,reloadMessages:{de:'Die aktuelle Seite muss neu geladen werden da die Web-Sitzung auf dem Server abgelaufen ist.<br>Befinden sich ungesicherte Eingaben von ihnen auf dieser Webseite so werden sie diese eventuell nicht speichern können. Sichern sie diese also an einem anderen Ort um sie nicht zu verlieren.<br>Klicken sie danach auf "OK" um neu zu laden oder laden sie die Seite manuell neu über die Reload-Schaltfläche ihres Browsers.',en:'The current page needs to be reloaded because the web session on the server timed out.<br>If the current webpage contains unsaved input from you then it is likely that it cannot be submitted. You should instead store it at another place to avoid losing it.<br>Then click "OK" to reload or perform the reload manually using the reload button of your browser.'},backendLostMessages:{de:'Die Websocket Verbindung zum Server wurde verloren. Eventuell ist ihre Internet-Verbindung abgebrochen oder der Serverdienst hat ein Problem.<br>Befinden sich ungesicherte Eingaben von ihnen auf dieser Webseite so werden sie diese vermutlich nicht speichern können. Sichern sie diese also an einem anderen Ort um sie nicht zu verlieren.<br>Klicken sie danach auf "OK" um zu versuchen, eine neue Verbindung aufzubauen oder laden sie die Seite manuell neu über die Reload-Schaltfläche ihres Browsers.',en:'The Websocket connection to the server is gone. Maybe your internet connection is lost or the server service has problems.<br>If the current webpage contains unsaved input from you then it is very likely that it cannot be submitted. You should instead store it at another place to avoid losing it.<br>Then click "OK" to try to build a new connection or perform the reload manually using the reload button of your browser.'},messageListeners:[],callbacks:{},errorCallbacks:{},start:function(e,t,n,r){this.url=e,this.pageId=t,this.sessionId=n,this.noCloseHandler=r,this.startService()||this.noSupport()},startService:function(){if(!WGA.hasLocalStorage())return!1;var e=window.sessionStorage.getItem(this.WINDOWID);e||(e=this.pageId,window.sessionStorage.setItem(this.WINDOWID,e)),this.windowId=e;var t={windowId:this.windowId,pageId:this.pageId,sessionId:this.sessionId},n=this.url+(this.url.indexOf("?")!=-1?"&":"?")+WGA.toQueryString(t);this.socket&&this.socket.close();if("WebSocket"in window)WGA.debug&&console&&console.log&&console.log("Building socket connection, pageId: "+this.pageId),this.socket=new WebSocket(n);else{if(!("MozWebSocket"in window))return!1;WGA.debug&&console&&console.log&&console.log("Building mozilla compatible socket connection, pageId: "+this.pageId),this.socket=new MozWebSocket(n)}return this.socket.onmessage=this.onMessage,this.socket.onopen=this.onOpen,this.noCloseHandler||(this.socket.onclose=this.onClose),!0},onMessage:function(e){var t=JSON.parse(e.data);if(t.type=="firePortletEvent")WGA.debug&&console&&console.log&&console.log("Execute portlet event from websocket, pageId: "+WGA.websocket.pageId,e.data),WGA.event.fireEvent(t.event.name,"*",t.event.params);else if(t.type=="handshake")WGA.websocket.reconnectAttempts=1,WGA.debug&&console&&console.log&&console.log("Connected WebSocket, pageId: "+WGA.websocket.pageId);else if(t.type=="response"){WGA.debug&&console&&console.log&&console.log("Receiving response from websocket, pageId: "+WGA.websocket.pageId,e.data),t.status!="SUCCESS"&&WGA.debug&&console&&console.log&&console.log("WebSocket response returned with non-success status",JSON.stringify(t));if(!t.callId)return;var n;t.status=="SUCCESS"?n=WGA.websocket.callbacks[t.callId]:n=WGA.websocket.errorCallbacks[t.callId],delete WGA.websocket.callbacks[t.callId],delete WGA.websocket.errorCallbacks[t.callId],n&&typeof n=="function"&&(WGA.debug&&console&&console.log&&console.log("Executing callback for response: "+n),n(t))}else if(t.type=="custom")for(var r=0;r<WGA.websocket.messageListeners.length;r++)WGA.debug&&console&&console.log&&console.log("Execute custom message from websocket, pageId: "+WGA.websocket.pageId,e.data),WGA.websocket.messageListeners[r](t.data)},onClose:function(e){WGA.debug&&console&&console.log&&console.log("Socket connection closed, pageId: "+WGA.websocket.pageId,e,"event.code",e.code),WGA.websocket.socket.onmessage=null,WGA.websocket.socket.onopen=null,WGA.websocket.socket.onclose=null,this.socket=null;if(e.code<=1001)return;if(e.code==-9825)return;if(e.code==1008){WGA.debug&&console&&console.log&&console.log("Lost connection to WebSocket bc. of violated policy. Will need to reload page to restart WebSocket",e.reason);return}if(WGA.websocket.reconnectAttempts>=5){WGA.debug&&console&&console.log&&console.log("Lost connection to WebSocket. Reason code: "+e.code+", reason: '"+e.reason+"'. Cancelling service after 5 reconnect attempts.");return}var t=WGA.util.generateInterval(WGA.websocket.reconnectAttempts,5e3);WGA.debug&&console&&console.log&&console.log("Lost connection to WebSocket. Reason code: "+e.code+", reason: '"+e.reason+"'. Will try to reconnect in "+parseInt(t)+" milliseconds."),setTimeout(function(){WGA.websocket.reconnectAttempts=WGA.websocket.reconnectAttempts+1,WGA.debug&&console&&console.log&&console.log("Trying reconnect to WebSocket. Attempt: "+WGA.websocket.reconnectAttempts),WGA.websocket.startService()},t)},callGlobal:function(e,t,n){if(!e||!t)return;var r="pending",i=WGA.portlet.generateUUID(),s,o,u;WGA.websocket.callbacks[i]=function(e){r="success",u=e,s&&s(e)},WGA.websocket.errorCallbacks[i]=function(e){r="error",u=e,o&&o(e)};var a={type:"callGlobal",callId:i,global:e,method:t,params:n||{}};return WGA.websocket.socket.send(JSON.stringify(a)),{then:function(e,t){s=e,o=t,r=="success"?s(u):r=="error"&&o(u)}}},noSupport:function(){}},callAction=WGA.callAction,callAjaxAction=WGA.ajax.callAction,ajaxFormCallback=WGA.ajax.formCallback,WGA.event.register=WGA.event.addListener