(function(d){var i=function(a){var c=this.superclass&&this.superclass.prototype,b=d.keys(a);d.keys({toString:!0}).length||b.push("toString","valueOf");for(var e=0,i=b.length;e<i;e++){var g=b[e],f=a[g];if(c&&d.isFunction(f)&&d.argumentNames(f)[0]=="$super")var h=f,f=d.extend(d.wrap(function(a){return function(){return c[a].apply(this,arguments)}}(g),h),{valueOf:function(){return h},toString:function(){return h.toString()}});this.prototype[g]=f}return this};d.extend({keys:function(a){var c=[],b;for(b in a)c.push(b);
return c},argumentNames:function(a){a=a.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(/, ?/);return a.length==1&&!a[0]?[]:a},bind:function(a,c){return function(){return a.apply(c,d.makeArray(arguments))}},wrap:function(a,c){return function(){return c.apply(this,[d.bind(a,this)].concat(d.makeArray(arguments)))}},klass:function(){var a=null,c=d.makeArray(arguments);d.isFunction(c[0])&&(a=c.shift());var b=function(){this.initialize.apply(this,arguments)};b.superclass=a;b.subclasses=[];
b.addMethods=i;if(a){var e=function(){};e.prototype=a.prototype;b.prototype=new e;a.subclasses.push(b)}for(a=0;a<c.length;a++)b.addMethods(c[a]);if(!b.prototype.initialize)b.prototype.initialize=function(){};return b.prototype.constructor=b}})})(jQuery);
(function(c){function h(b){return typeof b=="object"?b:{top:b,left:b}}var l=c.scrollTo=function(b,d,a){c(window).scrollTo(b,d,a)};l.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};l.window=function(){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){if(this.nodeName&&c.inArray(this.nodeName.toLowerCase(),["iframe","#document","html","body"])==-1)return this;var b=(this.contentWindow||this).document||this.ownerDocument||this;return c.browser.safari||
b.compatMode=="BackCompat"?b.body:b.documentElement})};c.fn.scrollTo=function(b,d,a){typeof d=="object"&&(a=d,d=0);typeof a=="function"&&(a={onAfter:a});b=="max"&&(b=9E9);a=c.extend({},l.defaults,a);d=d||a.speed||a.duration;a.queue=a.queue&&a.axis.length>1;a.queue&&(d/=2);a.offset=h(a.offset);a.over=h(a.over);return this._scrollable().each(function(){function n(c){i.animate(f,d,a.easing,c&&function(){c.call(this,b,a)})}var j=this,i=c(j),e=b,m,f={},p=i.is("html,body");switch(typeof e){case "number":case "string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(e)){e=
h(e);break}e=c(e,this);case "object":if(e.is||e.style)m=(e=c(e)).offset()}c.each(a.axis.split(""),function(b,c){var d=c=="x"?"Left":"Top",k=d.toLowerCase(),g="scroll"+d,h=j[g],o=l.max(j,c);m?(f[g]=m[k]+(p?0:h-i.offset()[k]),a.margin&&(f[g]-=parseInt(e.css("margin"+d))||0,f[g]-=parseInt(e.css("border"+d+"Width"))||0),f[g]+=a.offset[k]||0,a.over[k]&&(f[g]+=e[c=="x"?"width":"height"]()*a.over[k])):(d=e[k],f[g]=d.slice&&d.slice(-1)=="%"?parseFloat(d)/100*o:d);/^\d+$/.test(f[g])&&(f[g]=f[g]<=0?0:Math.min(f[g],
o));!b&&a.queue&&(h!=f[g]&&n(a.onAfterFirst),delete f[g])});n(a.onAfter)}).end()};l.max=function(b,d){var a=d=="x"?"Width":"Height",h="scroll"+a;if(!c(b).is("html,body"))return b[h]-c(b)[a.toLowerCase()]();var a="client"+a,j=b.ownerDocument.documentElement,i=b.ownerDocument.body;return Math.max(j[h],i[h])-Math.min(j[a],i[a])}})(jQuery);
(function(d){var e,i,l=1,f,g=this,j,k=g.postMessage&&!d.browser.opera;d.postMessage=function(b,a,c){if(a)if(b=typeof b==="string"?b:d.param(b),c=c||parent,k)c.postMessage(b,a.replace(/([^:]+:\/\/[^\/]+).*/,"$1"));else if(a)c.location=a.replace(/#.*$/,"")+"#"+ +new Date+l++ +"&"+b};d.receiveMessage=j=function(b,a,c){if(k)if(b&&(f&&j(),f=function(h){if(typeof a==="string"&&h.origin!==a||d.isFunction(a)&&a(h.origin)===!1)return!1;b(h)}),g.addEventListener)g[b?"addEventListener":"removeEventListener"]("message",
f,!1);else g[b?"attachEvent":"detachEvent"]("onmessage",f);else e&&clearInterval(e),e=null,b&&(e=setInterval(function(){var a=document.location.hash,c=/^#?\d+&/;a!==i&&c.test(a)&&(i=a,b({data:a.replace(c,"")}))},typeof a==="number"?a:typeof c==="number"?c:100))}})(jQuery);
(function(c){c.extend(c.fn,{swapClass:function(b,a){var c=this.filter("."+b);this.filter("."+a).removeClass(a).addClass(b);c.removeClass(b).addClass(a);return this},replaceClass:function(b,a){return this.filter("."+b).removeClass(b).addClass(a).end()},hoverClass:function(b){b=b||"hover";return this.hover(function(){c(this).addClass(b)},function(){c(this).removeClass(b)})},heightToggle:function(b,a){b?this.animate({height:"toggle"},b,a):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?
"show":"hide"]();a&&a.apply(this,arguments)})},heightHide:function(b,a){b?this.animate({height:"hide"},b,a):(this.hide(),a&&this.each(a))},prepareBranches:function(b){b.prerendered||(this.filter(":last-child:not(ul)").addClass(a.last),this.filter((b.collapsed?"":"."+a.closed)+":not(."+a.open+")").find(">ul").hide());return this.filter(":has(>ul)")},applyClasses:function(b,e){this.filter(":has(>ul):not(:has(>a))").find(">span").click(function(){e.apply(c(this).next())}).add(c("a",this)).hoverClass();
b.prerendered||(this.filter(":has(>ul:hidden)").addClass(a.expandable).replaceClass(a.last,a.lastExpandable),this.not(":has(>ul:hidden)").addClass(a.collapsable).replaceClass(a.last,a.lastCollapsable),this.prepend('<div class="'+a.hitarea+'"/>').find("div."+a.hitarea).each(function(){var a="";c.each(c(this).parent().attr("class").split(" "),function(){a+=this+"-hitarea "});c(this).addClass(a)}));this.find("div."+a.hitarea).click(e)},treeview:function(b){function e(b,d){function f(d){return function(){g.apply(c("div."+
a.hitarea,b).filter(function(){return d?c(this).parent("."+d).length:!0}));return!1}}c("a:eq(0)",d).click(f(a.collapsable));c("a:eq(1)",d).click(f(a.expandable));c("a:eq(2)",d).click(f())}function g(){c(this).parent().find(">.hitarea").swapClass(a.collapsableHitarea,a.expandableHitarea).swapClass(a.lastCollapsableHitarea,a.lastExpandableHitarea).end().swapClass(a.collapsable,a.expandable).swapClass(a.lastCollapsable,a.lastExpandable).find(">ul").heightToggle(b.animated,b.toggle);b.unique&&c(this).parent().siblings().find(">.hitarea").replaceClass(a.collapsableHitarea,
a.expandableHitarea).replaceClass(a.lastCollapsableHitarea,a.lastExpandableHitarea).end().replaceClass(a.collapsable,a.expandable).replaceClass(a.lastCollapsable,a.lastExpandable).find(">ul").heightHide(b.animated,b.toggle)}function k(){var a=[];h.each(function(b,f){a[b]=c(f).is(":has(>ul:visible)")?1:0});c.cookie(b.cookieId,a.join(""))}function l(){var a=c.cookie(b.cookieId);if(a){var d=a.split("");h.each(function(a,b){c(b).find(">ul")[parseInt(d[a])?"show":"hide"]()})}}b=c.extend({cookieId:"treeview"},
b);if(b.add)return this.trigger("add",[b.add]);if(b.toggle){var m=b.toggle;b.toggle=function(){return m.apply(c(this).parent()[0],arguments)}}this.addClass("treeview");var h=this.find("li").prepareBranches(b);switch(b.persist){case "cookie":var j=b.toggle;b.toggle=function(){k();j&&j.apply(this,arguments)};l();break;case "location":var i=this.find("a").filter(function(){return this.href.toLowerCase()==location.href.toLowerCase()});i.length&&i.addClass("selected").parents("ul, li").add(i.next()).show()}h.applyClasses(b,
g);b.control&&(e(this,b.control),c(b.control).show());return this.bind("add",function(e,d){c(d).prev().removeClass(a.last).removeClass(a.lastCollapsable).removeClass(a.lastExpandable).find(">.hitarea").removeClass(a.lastCollapsableHitarea).removeClass(a.lastExpandableHitarea);c(d).find("li").andSelf().prepareBranches(b).applyClasses(b,g)})}});var a=c.fn.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",
collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"};c.fn.Treeview=c.fn.treeview})(jQuery);
jQuery.noConflict();jQuery.ajaxSetup({beforeSend:function(a){a.setRequestHeader("X-Script-Agent","jQuery")}});
Date.allowedDelimiters=[".",":","-"];Date.prototype.toGermanDateString=function(){var a="";this.getDate()<10&&(a+="0");a+=parseInt(this.getDate(),10);a+=Date.allowedDelimiters[0];this.getMonth()+1<10&&(a+="0");a+=parseInt(this.getMonth()+1,10);a+=Date.allowedDelimiters[0];a+=parseInt(this.getFullYear(),10);return a};
Date.prototype.toGermanTimeString=function(){var a=this.getHours(),b=this.getMinutes(),c="";a<10&&(c+="0");c+=parseInt(a,10);c+=Date.allowedDelimiters[0];b<10&&(c+="0");c+=parseInt(b,10);return c};Date.prototype.addDay=function(a){this.setDate(this.getDate()+a)};Date.prototype.addMonth=function(a){this.setMonth(this.getMonth()+a)};Date.prototype.addMinutes=function(a){this.setMinutes(this.getMinutes()+a)};Date.prototype.addHours=function(a){this.setHours(this.getHours()+a)};
Date.prototype.addTimeString=function(a){for(var b=null,c=0;c<Date.allowedDelimiters.length;c++)if(b=a.split(Date.allowedDelimiters[c]),b.length===2)return this.setHours(b[0]),this.setMinutes(b[1]),!0;return!1};
Date.prototype.getWeekNr=function(){var a=this.getFullYear();this.getMonth();var b=new Date(a,0,1),c=b.getDay();c===0&&(c=7);for(c>1&&c<5&&b.setDate(b.getDate()-7);b.getDay()!=1;)b.setDate(b.getDate()+1);for(var c=b,b=this,d=0;b>=c;)d++,b.setDate(b.getDate()-7);d===0&&(b=new Date(a-1,11,31),d=b.getWeekNr());return d};String.prototype.trim=function(){for(var a=this;a.substr(0,1)==" ";)a=a.substr(1);for(;a.substr(a.length-1,1)==" ";)a=a.substr(0,a.length-2);return a};
String.prototype.toDate=function(){for(var a=null,b=null,b=0;b<Date.allowedDelimiters.length;b++)if((a=this.split(Date.allowedDelimiters[b]))&&a.length==3)return parseInt(a[2],10)<100&&(a[2]=parseInt(a[2],10)+2E3),new Date(a[2],a[1]-1,a[0]);return null};String.prototype.clearLeadingZeros=function(){for(var a=this;a.length>0&&a[0]=="0";)a=a.substr(1);return a};String.prototype.fillWithZeros=function(a){for(var b=this;b.length<a;)b="0"+b;return b};
String.prototype.isEmpty=function(){return this.length===0};String.prototype.hasJustNums=function(){for(var a=null,a=0;a<this.length;a++)if(parseInt(this[a],10)!=this[a])break;return!0};
var html_chars=["&","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ý","þ","ÿ","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","Ø","Ù","Ú","Û","Ü","Ý","Þ","€",'"',"ß","<",">","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾"],html_entities=["amp","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute",
"ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","oslash","ugrave","uacute","ucirc","uuml","yacute","thorn","yuml","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","euro","quot","szlig","lt","gt","cent","pound","curren","yen","brvbar","sect","uml",
"copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1","ordm","raquo","frac14","frac12","frac34"];String.prototype.clearHTMLEntities=function(){for(var a=this,b=0;b<html_entities.length;b++)a=a.replace("&"+html_entities[b]+";",html_chars[b]);return a};String.prototype.createHTMLEntities=function(){for(var a=this,b=0;b<html_entities.length;b++)a=a.replace(html_chars[b],"&"+html_entities[b]+";");return a};function OlibDom(){}
var dom=new OlibDom;dom.dragElements={};dom.dragElementsProperty={};dom.dragElementCurrent=null;dom.dragElementOffsetX=null;dom.dragElementOffsetY=null;dom.dragElementCoordX=null;dom.dragElementCoordY=null;
OlibDom.prototype.attachAttributes=function(a,b){var c=null,d=c=null,e=null,f=null,g=null;if(a&&a.attributes)for(f in b)if(c=b[f],browserIE())switch(f){case "style":c=c.split(";");for(g in c)typeof c[g]=="string"&&(d=c[g].split(":"),d.length===2&&(e=d[0].split("-"),e=e.length===2?e[0]+e[1].substr(0,1).toUpperCase()+e[1].substr(1):e[0],a.style[e]=d[1].trim()));break;case "class":a.className=c;break;case "colspan":a.colSpan=c;break;case "cellspacing":a.cellSpacing=c;break;case "cellpadding":a.cellPadding=
c;break;default:a.setAttribute(f,c)}else typeof c==="function"?a[f]=c:a.setAttribute(f,c)};OlibDom.prototype.getLocationHashes=function(){var a=document.location.hash;a.length>0&&(a=a.substr(1));return a.split("-")};OlibDom.prototype.hashExists=function(a){var b=this.getLocationHashes();return inArray(b,a)};OlibDom.prototype.clearLocationHash=function(){document.location.hash="#"};
OlibDom.prototype.setLocationHash=function(a,b){if(!this.hashExists(a)){var c="#";if(b)c=document.location.hash,c.length>0&&(c+="-");c+=a;document.location.hash=c}};OlibDom.prototype.replaceLocationHash=function(a,b){var c=this.getLocationHashes();this.setLocationHash("");var d=null;b||(b="");for(d=0;d<c.length;d++)c[d]==a&&(c[d]=b),c[d].length>0&&this.setLocationHash(c[d],!0)};
OlibDom.prototype.stopPropagation=function(a){if(!a)a=window.event;if(a)a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation();return!1};OlibDom.prototype.buildUrl=function(a,b){var c=null,d=0,e={};if(b!=null)for(c in b)for(innerkey in e=dom.buildUrlValue(c,b[c]),e)a+=d==0&&a.indexOf("?")==-1?"?":"&",a+=innerkey+"="+e[innerkey],d++;return a};
OlibDom.prototype.buildUrlValue=function(a,b){var c={},d=null,e={};if(b instanceof Array)for(d=0;d<b.length;d++)for(x in e=dom.buildUrlValue(a+"__"+d,b[d]),e)c[x]=e[x];else if(b instanceof Object)for(d in b)for(x in e=dom.buildUrlValue(a+"__"+d,b[d]),e)c[x]=e[x];else c[a]=b;return c};OlibDom.prototype.attachEventListener=function(a,b,c){var d="on"+b,e=null;c&&(a&&a.olibDomElement?a.olibDomElement.addEventListener(b,c):a&&(inArray(a,d)?(e=a[d],a[d]=function(){e();c()}):a[d]=c))};
OlibDom.prototype.detachEventListener=function(a,b){a["on"+b]=null};OlibDom.prototype.addClassName=function(a,b){var c,d,e={},f="";if(a.className){d=a.className.split(" ");for(c=0;c<d.length;c++)e[d[c]]=d[c];e[b]=b;for(c in e)f+=" "+c;a.className=f}else a.className=b};OlibDom.prototype.removeClassName=function(a,b){var c,d,e="";if(a.className){d=a.className.split(" ");for(c=0;c<d.length;c++)d[c]!=b&&(c>0&&(e+=" "),e+=d[c]);a.className=e}};
OlibDom.prototype.setClassNames=function(a,b){var c="",d=null;if(a){if(!a.className)a.className="";for(d in b)b[d]===!0&&(a.className!==""&&(c+=" "),c+=d);a.className=c}};
OlibDom.prototype.centerMe=function(a){var b=null,c=null,d=null,e=null,f=null,c=null;if(!a&&dom.centerElement)dom.centerTimeout&&window.clearTimeout(dom.centerTimeout),a=dom.centerElement;if(a&&a.style){b=a.offsetWidth;c=a.offsetHeight;if(window&&window.innerHeight)d=window.innerWidth,e=window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)d=document.documentElement.clientWidth,e=document.documentElement.clientHeight;else if(document.body)d=document.body.clientWidth,
e=document.body.clientHeight;f=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;c=parseInt((e-c)/2+f,10);c<f&&(c=f);a.style.top=c+"px";a.style.left=parseInt((d-b)/2,10)+"px";dom.centerElement?dom.centerElement=null:(dom.centerElement=a,dom.centerTimeout=window.setTimeout(dom.centerMe,20))}};OlibDom.prototype.removeElement=function(a){a&&a.parentNode&&a.parentNode.removeChild(a)};
OlibDom.prototype.init=function(){document.onmousedown=function(a){return dom.startDrag(a)};document.onmouseup=function(a){return dom.stopDrag(a)};document.onmousemove=dom.dragMove};OlibDom.prototype.registerDragElement=function(a,b,c){if(a&&a.id){dom.dragElements[a.id]||(dom.dragElements[a.id]=a,dom.dragElementsProperty[a.id]={});if(b)dom.dragElementsProperty[a.id].range=b;if(c)dom.dragElementsProperty[a.id].onMove=c}};
OlibDom.prototype.startDrag=function(a){if(!a)a=window.event;for(var b=a.target?a.target:a.srcElement;b!==null&&!dom.dragElements[b.id];)b=b.parentNode;if(b&&b.id&&dom.dragElements[b.id]){dom.dragElementOffsetX=a.clientX;dom.dragElementOffsetY=a.clientY;if(!b.style.left)b.style.left="0px";if(!b.style.top)b.style.top="0px";dom.dragElementCoordX=parseInt(b.style.left,10);dom.dragElementCoordY=parseInt(b.style.top,10);dom.dragElementCurrent=b.id;dom.stopPropagation(a)}};
OlibDom.prototype.dragMove=function(a){var b=null,c=null,d=!0,e=!0,f;if(dom.dragElementCurrent){if(!a)a=window.event;if((f=dom.dragElements[dom.dragElementCurrent])&&f.id==dom.dragElementCurrent){b=dom.dragElementCoordX+a.clientX-dom.dragElementOffsetX;c=dom.dragElementCoordY+a.clientY-dom.dragElementOffsetY;dom.dragElementsProperty[f.id]&&dom.dragElementsProperty[f.id].range&&(d=dom.dragElementsProperty[f.id].range.x1<=b&&dom.dragElementsProperty[f.id].range.x2>=b,e=dom.dragElementsProperty[f.id].range.y1<=
c&&dom.dragElementsProperty[f.id].range.y2>=c);if(d)f.style.left=b+"px";if(e)f.style.top=c+"px"}if(dom.dragElementsProperty[f.id].onMove)dom.dragElementsProperty[f.id].onMove();return!1}};OlibDom.prototype.stopDrag=function(a){dom.dragElementCurrent=null;dom.stopPropagation(a)};
OlibDom.prototype.showElementInGroup=function(a,b){if(a){if(!dom.shElement)dom.shElement={};if(dom.shElement[b]){if(dom.shElement[b]===a)return;dom.shElement[b].style.display="none";dom.shElement[b]=null}a.style.display="block";dom.shElement[b]=a;okap&&okap.resizeContent&&okap.resizeContent()}};
function OlibUpload(a){this.path=a.path;this.sessionIdFieldName=a.sessionIdFieldName;this.sessionId=a.sessionId;this.requestIdFieldName=a.requestIdFieldName;this.boxJElement=jQuery(a.boxSelector);this.iframeBoxJElement=jQuery(a.iframeBoxSelector);this.progressBoxJElement=jQuery(a.progressBoxSelector);this.progressTrackingIntervalId=null;this.stopProgressTracking=!1;this.callbackAfterUpload=this.jIFrame=this.jUploadForm=null;a.iframeAutoLoad&&this.loadSelector(jQuery(a.addFileButtonSelector))}
OlibUpload.prototype.loadSelector=function(a,b){var c={},d=this,e=jQuery(a);e.addClass("loading");b&&(c=b);c.upload_action="iframe";c[this.sessionIdFieldName]=this.sessionId;this.iframeBoxJElement.load(this.path,c,function(){d.iframe_loaded();e.remove()})};OlibUpload.prototype.iframe_loaded=function(){var a=this;this.jIFrame=jQuery("iframe",this.iframeBoxJElement);this.jIFrame.load(function(){a.resizeIFrame()})};
OlibUpload.prototype.uploadUnUploadedData=function(a){return this.hasUnUploadedData()&&this.jUploadForm?(this.callbackAfterUpload=a,this.jUploadForm.submit(),!0):!1};OlibUpload.prototype.hasUnUploadedData=function(a){var b=!1,c=this;this.jUploadForm&&jQuery("input[type=file]",this.jUploadForm).each(function(){var d=jQuery(this);d.val().length>0?b=!0:jQuery("input[type=file]",c.jUploadForm).length>1&&a===!0&&(d.remove(),c.resizeIFrame())});return b};
OlibUpload.prototype.resizeIFrame=function(){var a=this.jIFrame[0];a.height=a.contentDocument?a.contentDocument.body.offsetHeight:a.contentWindow.document.body.scrollHeight};OlibUpload.prototype.onSelectorReady=function(a,b){var c=this;this.iframeBoxJElement.show();this.defaultArgs=b;this.jUploadForm=a;this.jUploadForm.submit(function(){if(c.hasUnUploadedData(!0)){var a=c.jUploadForm.find('[name="'+c.requestIdFieldName+'"]').val();c.startTracking(a);return!0}return!1})};
OlibUpload.prototype.startRequest=function(a){this.hasUnUploadedData()&&(jQuery(a).addClass("loading"),this.jUploadForm.submit())};OlibUpload.prototype.uploadCompleted=function(a,b){this.stopTracking();a&&(this.reset(),b&&b(this));this.callbackAfterUpload&&this.callbackAfterUpload(a)};
OlibUpload.prototype.reset=function(a){if(!a||confirm(t("are_you_sure"))){this.stopTracking();a=this.iframeBoxJElement.find("iframe");if(!this.iframeSrc)this.iFrameSrc=a.attr("src");a.attr("src",this.iFrameSrc+"&r="+Math.random())}};OlibUpload.prototype.resetTracking=function(a,b){this.reset(b===!0?a:null);jQuery(a).addClass("hidden")};
OlibUpload.prototype.startTracking=function(a){var b=this,c=this.defaultArgs;c.upload_action="progress";c[this.sessionIdFieldName]=this.sessionId;c[this.requestIdFieldName]=a;b.progressBoxJElement.load(b.path,c,function(){b.iframeBoxJElement.hide();b.jUploadForm=null;jQuery(".olib-upload-progress",b.boxJElement).removeClass("hidden").show()});this.progressTrackingIntervalId=setInterval(function(){b.progressBoxJElement.load(b.path,c);if(b.stopProgressTracking)b.stopProgressTracking=!1,clearInterval(b.progressTrackingIntervalId),
b.onTrackingStopped()},1E3)};OlibUpload.prototype.stopTracking=function(){this.stopProgressTracking=!0};OlibUpload.prototype.onTrackingStopped=function(){jQuery(".olib-upload-progress",this.boxJElement).addClass("hidden").hide()};
OlibUpload.prototype.addMore=function(a){var a=jQuery("input[type=file].uploadfile",jQuery(a).parents()),b=jQuery("<input>"),c=jQuery("<div>");a.length>0&&(b.attr("type","file"),b.attr("class",a.attr("class")),b.attr("name","files__"+a.length),c.append(b),jQuery(a[a.length-1]).after(c));this.resizeIFrame()};
function olmero_expandable_element_register(a){a=new olmeroXElements.expandableElement(a);a.init();return a}var open_expandable_element=null,olmeroXElements={};
olmeroXElements.expandableElement=jQuery.klass({initialize:function(a){this.name=a.name;this.effect_window=this.object_info=this.object_title=this.object_closebutton=this.object_img=this.object_exp=this.timer=null;this.callback=a.callback},init:function(){var a=this;if(document.getElementById)this.object_exp=document.getElementById(this.name+"_exp"),this.object_img=document.getElementById(this.name+"_exp_openclose_img"),this.object_closebutton=document.getElementById(this.name+"_close_button"),this.object_title=
document.getElementById(this.name+"_title_object"),this.object_info=document.getElementById(this.name+"_info_object");else if(document.layers)this.object_exp=document.layers[this.name+"_exp"],this.object_img=document.layers(this.name+"_exp_openclose_img"),this.object_closebutton=document.layers(this.name+"_close_button"),this.object_title=document.layers(this.name+"_title_object"),this.object_info=document.layers(this.name+"_info_object");if(this.object_title)this.object_title.onclick=function(){a.clickTitle()};
if(this.object_closebutton)this.object_closebutton.onclick=function(){a.clickTitle()};this.callback!=null&&this.callback&&this.callback()},clickTitle:function(){open_expandable_element!==null&&open_expandable_element!=this&&open_expandable_element.clickTitle();if(this.object_exp.style.display=="block")this.callback!=null&&this.callback&&this.callback(),this.object_exp.style.display="none",this.object_img.src=this.object_img.src.replace("minus","plus"),open_expandable_element=null;else if(this.object_exp.style.display==
"none")this.object_exp.style.display="block",this.object_img.src=this.object_img.src.replace("plus","minus"),open_expandable_element=this},setInfoText:function(a){if(this.object_info)this.object_info.innerHTML=a}});
function OapSequenceEditorElement(a,c){var b=this;this.isTopElement=c.isTopElement===!0;this.next=this.prev=this.domId=this.id=null;this.parent=a;this.originalText=c.text;this.jElement=jQuery("<li>").data("OapSequenceEditorElement",this).addClass("fixed");this.isTopElement!==!0?(this.id=c.id,this.domId=a.domPrefix+"__"+this.id,this.jCheckbox=jQuery("<input>").attr("type","checkbox").attr("id",this.domId).attr("value",this.id).change(function(){b.redraw()}).click(function(a){a.stopPropagation()}),
this.jElement.mousemove(function(){b.parent.mouseDown===!0&&b.toggleSelection(b.parent.mouseDownValue)}).mousedown(function(){b.parent.mouseDown=!0;b.parent.mouseDownValue=!b.jCheckbox.is(":checked")}).click(function(){b.toggleSelection()}),this.jLabelEditor=jQuery("<input>").hide().click(function(a){a.stopPropagation()}).mousedown(function(a){a.stopPropagation()}).mousemove(function(a){a.stopPropagation()}).blur(function(){var a=b.jLabelEditor.val();b.jLabelEditor.hide();b.jLabel.show();b.jEditLabel.show();
a!=b.jLabel.html()&&(b.jLabel.html(a),b.parent&&b.parent.triggerChanged())}),this.jLabel=jQuery("<label>").attr("for",this.domId).attr("title",this.id).html(c.text),this.jEditLabel=OapSequenceEditor.createButtonLink("edit").attr("title","Edit: "+this.originalText).click(function(){if(b.jLabelEditor&&b.isSelected===!0)return b.jLabel.hide(),b.jEditLabel.hide(),b.jLabelEditor.val(b.jLabel.html()).show().css("display","inline").focus(),!1}),this.jSingleActionLink=OapSequenceEditor.createButtonLink("add").attr("href",
"#").addClass("action").click(function(){b.clickSingleAction();return!1}),this.jText=jQuery("<div>").addClass("text").append(this.jCheckbox).append(this.jLabel).append(this.jEditLabel).append(this.jLabelEditor).click(function(a){b.toggleSelection();a.stopPropagation();return!1})):(this.jElement.addClass("top"),this.id=-2);this.jElement.append(this.jText);this.parent.enableCursor===!0?(this.jCursorSelector=jQuery("<a>").attr("href","#").addClass("selector").click(function(a){b.cursorSelected();a.stopPropagation();
return!1}).mousedown(function(){b.parent.cursorDown=!0;return!1}).mouseup(function(){return b.parent.cursorDown=!1}).html("&nbsp;"),this.jCursorActionsAddHere=jQuery("<a>").attr("href","#").click(function(){b.clickAddHere();return!1}).html(a.labels.action_add_here),this.jCursorActions=jQuery("<div>").addClass("actions").append(this.jCursorActionsAddHere),this.jCursorPlaceholder=jQuery("<span>").addClass("placeholder").html("&nbsp;"),this.jCursor=jQuery("<div>").addClass("cursor").append(this.jCursorSelector).append(this.jCursorActions).append(this.jCursorPlaceholder),
jQuery.browser.msie&&this.jCursorSelector.width("300px"),this.jElement.append(this.jCursor)):this.jElement.append(jQuery("<div>").addClass("noncursor_placeholder").html("&nbsp;"))}OapSequenceEditorElement.prototype.setCustomLabel=function(a){if(a===null)a=this.originalText;this.jLabel&&this.jLabel.html(a)};OapSequenceEditorElement.prototype.removed=function(){if(this.parent.cursoredElement===this)this.parent.cursoredElement=null;this.isSelected=!1;this.moved()};
OapSequenceEditorElement.prototype.toggleSelection=function(a){a||(a=!this.jCheckbox.is(":checked"));a?this.jCheckbox.attr("checked","checked"):this.jCheckbox.removeAttr("checked");this.jCheckbox.trigger("change")};OapSequenceEditorElement.prototype.selected=function(){this.isSelected=!0;this.moved()};OapSequenceEditorElement.prototype.moved=function(){this.isTopElement!==!0&&(this.jCheckbox.attr("name",this.parent.prefix+"__"+(this.isSelected===!0?"selected__":"")+this.id),this.redraw())};
OapSequenceEditorElement.prototype.cursorSelected=function(){this.parent.cursorSelected(this)};OapSequenceEditorElement.prototype.selectCursor=function(){this.parent.cursoredElement=this;this.redraw()};
OapSequenceEditorElement.prototype.redraw=function(){this.parent.enableCursor===!0&&(this.parent.cursoredElement===this?this.jCursor.addClass("selected"):this.jCursor.removeClass("selected"));this.isTopElement!==!0&&this.parent.enableRowSelection===!0&&(this.jCheckbox.is(":checked")?(this.jElement.addClass("marked"),this.jText.addClass("marked")):(this.jElement.removeClass("marked"),this.jText.removeClass("marked")),this.isSelected?this.jSingleActionLink.data("jBtn").attr("class","btn remove"):this.jSingleActionLink.data("jBtn").attr("class",
"btn add"))};OapSequenceEditorElement.prototype.clickAddHere=function(){this.parent.moveSelectedTo(this)};OapSequenceEditorElement.prototype.clickSingleAction=function(){this.isSelected?this.parent.removeElement(this.id):this.parent.selectElement(this.id)};
function OapSequenceEditor(a,c){var b=this;this.jElement=jQuery("#"+a);this.jListSelected=jQuery("div.selected ul",this.jElement);this.jListSelected.sortable({axis:"y",cancel:".fixed",update:function(){b.triggerChanged()}});this.jListAvailable=jQuery("div.available ul",this.jElement);this.jSelectedHeader=jQuery(".oap-sequenceditor-header-selected:first",this.jElement);this.jSelectedHeader.data("label",this.jSelectedHeader.attr("title"));this.jAvailableHeader=jQuery(".oap-sequenceditor-header-available:first",
this.jElement);this.jAvailableHeader.data("label",this.jAvailableHeader.attr("title"));this.labels=c.labels;this.listAvailableMarkedCount=this.listSelectedMarkedCount=0;this.enableCursor=c.enableCursor&&c.enableCursor===!0;this.enableRowSelection=c.enableRowSelection&&c.enableRowSelection===!0;this.collectionElements={};jQuery(".oap-sequenceditor-remove-marked",this.jElement).click(function(){b.markedRemove();return!1});jQuery(".oap-sequenceditor-add-marked",this.jElement).click(function(){b.markedRemove(!0);
return!1});jQuery(".oap-sequenceditor-move-up",this.jElement).click(function(){b.markedSort(!0);return!1});jQuery(".oap-sequenceditor-move-down",this.jElement).click(function(){b.markedSort(!1);return!1});this.jButtonRemoveAll=jQuery(".oap-sequenceditor-remove-all:first",this.jElement).click(function(){b.allRemove();return!1});this.jButtonSelectAll=jQuery(".oap-sequenceditor-select-all:first",this.jElement).click(function(){b.allSelect();return!1});jQuery(".oap-sequenceditor-mark-all",this.jElement).click(function(){b.markAll(jQuery(this).hasClass("selected"));
return!1});jQuery(".oap-sequenceditor-remove-mark",this.jElement).click(function(){b.markAll(jQuery(this).hasClass("selected"),!0);return!1});this.enableAnimations=c.enableAnimations&&c.enableAnimations===!0;this.prefix="xxx";this.latestInsertedElement=this.cursoredElement=null;this.mouseDown=!1;this.mouseDownValue=null;this.jElement.mouseup(function(){b.mouseDown=!1});this.reset()}
OapSequenceEditor.createButtonLink=function(a){a=jQuery('<a><span class="btn '+a+'">&nbsp;</span></a>');return a.data("jBtn",a.find("span:first")).attr("href","#")};OapSequenceEditor.prototype.changed=function(a){this.callbackChanged=a};OapSequenceEditor.prototype.addElements=function(a){var c=null,b=this.enableAnimations;this.enableAnimations=!1;for(c=0;c<a.length;c++)this.addElement(a[c],!0);this.enableAnimations=b;this.triggerChanged()};
OapSequenceEditor.prototype.reset=function(){this.collectionElements={};this.jListSelected.children().remove();this.jListAvailable.children().remove();this.latestInsertedElement=this.cursoredElement=null;this.mouseDown=!1;this.addElement({isTopElement:!0,selected:!0},!0)};
OapSequenceEditor.prototype.addElement=function(a,c){var b=new OapSequenceEditorElement(this,a);this.collectionElements[b.id]=b;if(this.latestInsertedElement!==null)this.collectionElements[b.id].prev=this.latestInsertedElement,this.latestInsertedElement.next=this.collectionElements[b.id];this.latestInsertedElement=this.collectionElements[b.id];a.selected&&a.selected===!0?this.selectElement(b.id,c):this.removeElement(b.id,c)};
OapSequenceEditor.prototype.getCheckedElements=function(a){return jQuery("input[type=checkbox]:checked",a===!0?this.jListSelected:this.jListAvailable)};OapSequenceEditor.prototype.getCheckedElementIds=function(a){var c=[];this.getCheckedElements(a).each(function(){c.push(jQuery(this).attr("value"))});return c};
OapSequenceEditor.prototype.getSortedElementIds=function(a){var c=[];jQuery("input[type=checkbox]",a!==!0?this.jListSelected:this.jListAvailable).each(function(){c.push(jQuery(this).attr("value"))});return c};OapSequenceEditor.prototype.getSortedElementWithLabels=function(a){var c={};jQuery("label",a!==!0?this.jListSelected:this.jListAvailable).each(function(){var a=jQuery(this);c[a.attr("title")]=a.html()});return c};
OapSequenceEditor.prototype.markAll=function(a,c){var b=jQuery("input[type=checkbox]",a===!0?this.jListSelected:this.jListAvailable);c===!0?b.removeAttr("checked"):b.attr("checked",!0);b.trigger("change");this.redraw()};OapSequenceEditor.prototype.allRemove=function(a){var c=null,b=this.enableAnimations;this.enableAnimations=!1;for(c in this.collectionElements)c&&(this.removeElement(c,!0),a===!0&&this.setElementCustomLabel(c,null));this.enableAnimations=b;this.triggerChanged()};
OapSequenceEditor.prototype.allSelect=function(){var a=null,c=!1;for(a in this.collectionElements)a&&(this.selectElement(a,!0),c=!0);c===!0&&this.triggerChanged()};OapSequenceEditor.prototype.markedRemove=function(a){for(var c=this.getCheckedElementIds(a?!1:!0),b=null,d=!1,b=0;b<c.length;b++)a?this.selectElement(c[b],!0):this.removeElement(c[b],!0),d=!0;d===!0&&this.triggerChanged()};
OapSequenceEditor.prototype.markedSort=function(a){var c=this.getCheckedElements(!0),b=this.cursoredElement,d=null,e=null,f=null,g=null,h=0;if(c.length>0){d=a?0:c.length;e=a?c.length:0;for(f=a?1:-1;e!=d;){var i=jQuery(c[d+(a?0:-1)]),g=i.parents("li:first"),g=a?g.prev().prev():g.next();if(g.length===0&&h===0)break;g&&g.data("OapSequenceEditorElement")&&this.moveSelectedTo(g.data("OapSequenceEditorElement"),[i.val()],!0);d+=f;h++}}this.cursoredElement=b};
OapSequenceEditor.prototype.moveSelectedTo=function(a,c,b){var d=null,e=!1,f=this.enableAnimations;this.cursoredElement=a;c||(c=this.getCheckedElementIds(!1).concat(this.getCheckedElementIds(!0)));if(c.length>5||b===!0)this.enableAnimations=!1;for(d=0;d<c.length;d++)this.selectElement(c[d],!0),e=!0;this.enableAnimations=f;e===!0&&this.triggerChanged()};
OapSequenceEditor.prototype.removeElement=function(a,c){var b=this.collectionElements[a],d=null,e=null,f=null,g=!1,h=null;if(b&&b.isTopElement!==!0){g=b==this.cursoredElement;if(b.prev!==null){for(e=d=b.prev;d!==null&&d.isSelected===!0;)d=d.prev;for(;e!==null&&e.isSelected===!1;)e=e.prev}if(b.next!==null&&d===null)for(f=b.next;f!==null&&f.isSelected===!0;)f=f.next;d!==null?this.moveElementAfter(b.jElement,d.jElement):f!==null?this.moveElementBefore(b.jElement,f.jElement):this.moveElementInto(b.jElement,
this.jListAvailable);b.removed();if(g)if(e)e.cursorSelected();else for(h in this.collectionElements)if(this.collectionElements[h]&&this.collectionElements[h].isSelected===!0){this.collectionElements[h].cursorSelected();break}c!==!0&&this.triggerChanged()}};OapSequenceEditor.prototype.moveElementAfter=function(a,c){jQuery.browser.msie||this.enableAnimations!==!0?c.after(a):a.fadeOut("fast",function(){c.after(a);a.fadeIn("fast")})};
OapSequenceEditor.prototype.moveElementBefore=function(a,c){jQuery.browser.msie||this.enableAnimations!==!0?c.before(a):a.fadeOut("fast",function(){c.before(a);a.fadeIn("fast")})};OapSequenceEditor.prototype.moveElementInto=function(a,c){jQuery.browser.msie||this.enableAnimations!==!0?c.append(a):a.fadeOut("fast",function(){c.append(a);a.fadeIn("fast")})};OapSequenceEditor.prototype.setElementCustomLabel=function(a,c){var b=this.collectionElements[a];b&&b.setCustomLabel(c)};
OapSequenceEditor.prototype.selectElement=function(a,c,b){var a=this.collectionElements[a],d=this.enableAnimations;if(b===!0)this.animationMoving=!1;a&&(this.cursoredElement?this.cursoredElement!=a&&this.moveElementAfter(a.jElement,this.cursoredElement.jElement):this.moveElementInto(a.jElement,this.jListSelected),a.selected(),a.cursorSelected(),c!==!0&&this.triggerChanged());this.enableAnimations=d};OapSequenceEditor.prototype.triggerChanged=function(){this.redraw();this.callbackChanged&&this.callbackChanged(this)};
OapSequenceEditor.prototype.cursorSelected=function(a){var c=this.cursoredElement;this.cursoredElement=a;c&&c.redraw();this.cursoredElement.redraw()};
OapSequenceEditor.prototype.redraw=function(){var a=null,c=a=0;if(!this.cursoredElement&&(a=this.getSortedElementIds(!1),a.length>0))this.cursoredElement=this.collectionElements[a[a.length-1]],this.cursoredElement.redraw();a=this.jListSelected.find("li").length-1;c=this.jListAvailable.find("li").length;this.jSelectedHeader.html(a+" "+this.jSelectedHeader.data("label"));this.jAvailableHeader.html(c+" "+this.jAvailableHeader.data("label"));this.listSelectedMarkedCount=jQuery("input[type=checkbox]:checked",
this.jListSelected).length;this.listAvailableMarkedCount=jQuery("input[type=checkbox]:checked",this.jListAvailable).length};
var olmero_ajax_requests=[];function create_olmero_ajax_request(d,b,a,c,e,g){var f=olmero_ajax_requests.length;olmero_ajax_requests[f]=new Olmero_ajax_request(f,create_http_request(),d,b,a,c,e,g)}
function Olmero_ajax_request(d,b,a,c,e,g,f,h){this._http_request=b;this._content_object=c;this.callbackFunction=f;this.callbackObject=h;e===!0&&objLoading&&objLoading.showLoading();var i=this;this._http_request.onreadystatechange=function(){i.do_request()};this._http_request.open("post",a,!0);this._http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");this._http_request.send(g)}
Olmero_ajax_request.prototype.do_request=function(){var d,b,a,c,e=[];if(this._http_request.readyState==4){d=this._http_request.responseText;if(b=document.getElementById(this._content_object)){a=document.createElement("div");a.innerHTML=d;d=a.getElementsByTagName("script");for(c=0;c<d.length;c++)e.push(d[c].innerHTML);b.innerHTML=a.innerHTML;for(c=0;c<e.length;c++)eval(e[c])}if(this.callbackFunction)b=this.callbackFunction,this.callbackObject?(a=this.callbackObject,a[b]()):b();objLoading&&objLoading.hideLoading()}};
function oap_ajax_get_form_values_jquery(d){var b={};jQuery("input[type=text], input[type=hidden], input[type=checkbox]:checked, input[type=radio]:checked, textarea, select",d).each(function(){var a=jQuery(this);a.attr("name").length>0&&(b[a.attr("name")]=a.val())});return b}function oap_ajax_get_form_values(d){return oap_ajax_get_form_values_jquery(jQuery("#"+d))}function oap_ajax_encode_post_body(d){var b,a=0,c="";for(b in d)a>0&&(c+="&"),c+=b+"="+d[b],a++;return c};
olmeroXElements.loadingObject=jQuery.klass({initialize:function(){},getPlaceholder:function(){return this.current_progress_placeholder},showLoading:function(){this.progress_div_position=document.createElement("div");this.hideLoading();this.progress_div_position.className="raised";this.progress_div_position.style.zIndex=101;this.progress_div_position.style.left="50%";this.progress_div_position.style.marginLeft="-175px";var a=window.pageYOffset?window.pageYOffset:document[document.compatMode=="CSS1Compat"?
"documentElement":"body"].scrollTop;this.progress_div_position.style.top=getWindowHeight()/2-75+a+"px";this.progress_div_position.style.width="350px";a=document.createElement("b");a.className="top";a.innerHTML='<b class="b1"></b><b class="b2" style="background-color: #eee;"></b><b class="b3" style="background-color: #eee;"></b><b class="b4" style="background-color: #eee;"></b>';this.progress_div_position.appendChild(a);this.current_progress_placeholder=document.createElement("div");this.current_progress_placeholder.name=
"progress_div";this.current_progress_placeholder.id="progress_div";this.current_progress_placeholder.style.borderLeft="1px solid #fff";this.current_progress_placeholder.style.borderRight="1px solid #999";this.current_progress_placeholder.style.display="block";this.current_progress_placeholder.style.backgroundColor="#eee";this.current_progress_placeholder.style.width="348px";this.current_progress_placeholder.style.height="150px";this.current_progress_placeholder.style.textAlign="center";this.current_progress_placeholder.innerHTML=
'<br /><br /><img src="/images/spinner.gif" border="0" alt="" /><span style="font-size: 18px;"><br /><br />loading...</span>';this.progress_div_position.appendChild(this.current_progress_placeholder);a=document.createElement("b");a.className="bottom";a.innerHTML='<b class="b4b" style="background-color: #eee;"></b><b class="b3b" style="background-color: #eee;"></b><b class="b2b" style="background-color: #eee;"></b><b class="b1b"></b>';this.progress_div_position.appendChild(a);document.body.appendChild(this.progress_div_position);
jQuery(this.progress_div_position).fadeTo("slow",0.8)},hideLoading:function(){this.progress_div_position&&jQuery(this.progress_div_position).hide()}});
function olmero_markup_list_handler(a,d,b,c,e,f){this._name=a;this._report_object=document.getElementById(this._name);this._cls_out_1=d;this._cls_out_2=b;this._cls_ovr=c;this._cls_sel=e;this._old_class_name="";this._prop_multiselect=f;this._lee_row_in_click=!1;this._selected_id=-1;this._report_handling="";this._tr_class=[];this._active_buttons=[];this._from_checkbox=this._click_changer=!1;this._button_cell=1;this._button_cell_object=this._button_div_outer=this._button_div=null;if(this._selected_id==
-1&&(a=find_element(this._name+"_selected_ids"))&&a.value)this._selected_id=a.value}olmero_markup_list_handler.prototype.get_list_click_type=function(){if(this._report_handling==="")this._report_handling=document.getElementById("mn_"+this._name)?"menu":this._prop_multiselect===!0?"checkbox":"default";return this._report_handling};
olmero_markup_list_handler.prototype.sig_navigate=function(a,d,b,c){if(!c||confirm(c)){c=[];if(this.get_list_click_type()=="checkbox")for(var e=find_element(this._name+"_selected_ids").value.split(";"),f=0;f<e.length;f++)e[f]!==""&&(c[f]=this._name+"_"+e[f]+"_sig_"+a);else c[0]=this._selected_id+"_sig_"+a;for(a=0;a<c.length;a++)if(e=find_element(c[a]))d?window.open(e.value,d,b):(objLoading.showLoading(),document.location=e.value)}return!1};
olmero_markup_list_handler.prototype.olmero_markup_list_menu_button=function(a,d,b){d=!0;if(this._button_cell_object)this._button_div_outer.style.visibility="hidden";if(this.get_list_click_type()=="default"&&b){a&&parseInt(a.offsetWidth,10);if(this._button_div_outer===null){this._button_div_outer=document.createElement("div");this._button_div_outer.id="btn_div";this._button_div_outer.style.position="relative";this._button_div_outer.style.visibility="hidden";this._button_div_outer.style.zIndex=97;
var c=document.createElement("div");c.className="raised";var e=document.createElement("b");e.className="top";e.innerHTML='<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>';c.appendChild(e);e=document.createElement("div");e.className="boxcontent";c.appendChild(e);e=document.createElement("b");e.className="bottom";e.innerHTML='<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>';c.appendChild(e);this._button_div_outer.appendChild(c)}for(c=this._button_div_outer.firstChild.childNodes.length;c>
0;c--)if(this._button_div_outer.firstChild.childNodes[c-1].tagName=="DIV")for(e=this._button_div_outer.firstChild.childNodes[c-1].childNodes.length;e>0;e--)(this._button_div_outer.firstChild.childNodes[c-1].childNodes[e-1].tagName=="A"||this._button_div_outer.firstChild.childNodes[c-1].childNodes[e-1].tagName=="INPUT")&&this._button_div_outer.firstChild.childNodes[c-1].removeChild(this._button_div_outer.firstChild.childNodes[c-1].childNodes[e-1]);if(a){e=1;for(c=0;c<a.childNodes.length;c++)if(a.childNodes[c].tagName&&
a.childNodes[c].tagName=="TD")this._button_cell_object=a.childNodes[c],e++;this._button_cell_object.insertBefore(this._button_div_outer,this._button_cell_object.firstChild);if(a){if(b){for(var a=b.split(";"),f=b=0,e=0;e<a.length;e++)if((c=document.getElementById(a[e]))&&c.name!="no_copy"){var d=!1,h=c.cloneNode(!0);h.onclick=c.onclick;h.href=c.href;h.id+="_copy";h.style.display="inline";is_ie()?h.attachEvent("onclick",list_element_click):h.addEventListener("click",list_element_click,!1);for(c=this._button_div_outer.firstChild.childNodes.length;c>
0;c--)this._button_div_outer.firstChild.childNodes[c-1].tagName=="DIV"&&(actual_button=this._button_div_outer.firstChild.childNodes[c-1].appendChild(h),b++,f+=actual_button.offsetWidth)}f+=b*15}this._button_div_outer.firstChild.style.right="2px";this._button_div_outer.firstChild.style.height="34px";this._button_div_outer.firstChild.style.top=this._button_cell_object.offsetHeight-44+"px";this._button_div_outer.firstChild.style.opacity="0.8";this._button_div_outer.firstChild.style.filter="Alpha(opacity=80)";
this._button_div_outer.firstChild.style.width=f+"px";if(!d)this._button_div_outer.style.visibility="visible"}}else this._button_div_outer&&this._selected_id==-1&&this._button_cell_object.removeChild(this._button_div_outer)}};
olmero_markup_list_handler.prototype.olmero_markup_list_row_over=function(a,d,b){if(a.className!=this._cls_sel)this._tr_class[a.id]=a.className;if(this._lee_row_in_click===!0)this._click_changer!=document.getElementById("chk_"+a.id).checked&&this.olmero_markup_list_row_down(a,d,b);else if(a.className!=this._cls_sel)a.className=this._cls_ovr;return!1};olmero_markup_list_handler.prototype.olmero_markup_list_row_out=function(a){if(a.className!=this._cls_sel)a.className=this._tr_class[a.id]};
olmero_markup_list_handler.prototype.olmero_markup_list_row_up=function(){this._lee_row_in_click=!1};olmero_markup_list_handler.prototype.is_selected=function(a){for(var d=this.get_selected_items(!1),b=0;b<d.length;b++)if(d==a)return!0;return!1};
olmero_markup_list_handler.prototype.olmero_markup_list_row_down=function(a,d,b){if(input_in_list_click===!0&&this._from_checkbox===!1)input_in_list_click=!1;else{input_in_list_click=!1;var c=this._cls_sel;switch(this.get_list_click_type()){case "menu":break;case "checkbox":var e=document.getElementById("chk_"+a.id);a.className==this._cls_sel&&(c=this._tr_class[a.id]);if(this._lee_row_in_click===!1)this._click_changer=!e.checked;if(!this._from_checkbox)e.checked=c==this._cls_sel;this.olmero_markup_list_update_state(e.value,
c==this._cls_sel);this._from_checkbox=!1;break;default:var e=this._name+"_selected_ids",f=this._name+"_selected_count",h=!0;if(this._selected_id!=-1){if(a.id==this._selected_id)find_element(this._name+"_selected_count").value=0,find_element(this._name+"_selected_ids").value=-1,h=!1;if(document.getElementById(this._selected_id))document.getElementById(this._selected_id).className=this._tr_class[this._selected_id]}if(h===!0)find_element(f).value=1,find_element(e).value=a.id}if(a){this.get_list_click_type()==
"default"&&a.id==this._selected_id?(this._selected_id=-1,a=null):(this._selected_id=a.id,a.className=c);if(d)if(c=find_element(this._name+"_selected_count").value,c>0)if(this.get_list_click_type()=="default")d.enable_buttons(b);else{e=0;if(a.className!=this._cls_sel){var f=[],g;for(g in this._active_buttons)typeof this._active_buttons[g]!="function"&&g!=a.id&&(f[g]=this._active_buttons[g]);this._active_buttons=f}else this._active_buttons[a.id]=b.split(";");f=[];for(g in this._active_buttons)if(typeof this._active_buttons[g]!=
"function"){e++;for(var i in this._active_buttons[g])typeof this._active_buttons[i]!="function"&&(f[this._active_buttons[g][i]]||(f[this._active_buttons[g][i]]=0),f[this._active_buttons[g][i]]++)}i="";for(g in f)f[g]==e&&(i+=";"+g);d.enable_buttons(i,c>1)}else d.disable_multiselects(),this._active_buttons=[];if(a)this._selected_id=a.id}this.olmero_markup_list_menu_button(a,d,b)}};
olmero_markup_list_handler.prototype.change_column=function(a){for(var d="",b=0;b<a.length;b++)if(a[b].selected||a[b].checked)d!==""&&(d+=","),d+=a[b].value;find_element(a.name+"_values").value=d};
olmero_markup_list_handler.prototype.olmero_markup_list_update_state=function(a,d){var b=this._name+"_selected_ids",c=this._name+"_selected_count";if(find_element(b)){var e=find_element(c).value,f=find_element(b).value,f=f.replace(";"+a+";",";");e--;d===!0&&(e+=2,f=f+";"+a+";");f=f.replace(";;",";");find_element(c).value=e;find_element(b).value=f;this.update_status_bar()}};
olmero_markup_list_handler.prototype.update_status_bar=function(){var a=this._name+"_list_info",d=this._name+"_selected_count";if(document.getElementById(a)){var d=parseInt(find_element(d).value,10),b=parseInt(find_element(this._name+"_total_records").value,10);d>b&&(d=b);document.getElementById(a).innerHTML=d+"/"+b}};olmero_markup_list_handler.prototype.selectall=function(){this.changeallstate(!0)};olmero_markup_list_handler.prototype.deselectall=function(){this.changeallstate(!1)};
olmero_markup_list_handler.prototype.changeallstate=function(a){for(var d=this._report_object.getElementsByTagName("input"),b=0,c="chk_"+this._name,e=find_element(this._name+"_all_ids").value,f=null,b=0;b<d.length;b++)if(d[b]&&d[b].type=="checkbox"&&d[b].name.substr(0,c.length)===c&&d[b].checked!=a&&(f=document.getElementById(this._name+d[b].name.substr(c.length))))f.onclick();find_element(this._name+"_selected_ids").value=a==!0?e:";";find_element(this._name+"_selected_count").value=a==!0?e.split(";").length:
0};olmero_markup_list_handler.prototype.get_selected_items=function(a){var d=this._name+"_selected_ids",b=[];if(find_element(d)&&(b=find_element(d).value.split(";"),this.get_list_click_type()=="default"&&a===!0))for(a=0;a<b.length;a++)b[a]=b[a].substr(this._name.length+1);return b};function register_list(a){olmero_markup_lists[olmero_markup_lists.length]=a}function reinit_all_lists(){for(var a=0;a<olmero_markup_lists.length;a++)olmero_markup_lists[a].reinit()}
function list_element_click(){input_in_list_click=!0}function list_tags_overwrite_click_event(a,d){if(a)for(var b=0;b<a.childNodes.length;b++)if(a.childNodes[b].nodeType==1){for(var c=!1,e=0;e<d.length;e++)a.childNodes[b].tagName==d[e]&&(a.childNodes[b].addEventListener?a.childNodes[b].addEventListener("click",list_element_click,!1):a.childNodes[b].attachEvent("onclick",list_element_click),c=!0);c===!1&&list_tags_overwrite_click_event(a.childNodes[b],d)}}
olmero_markup_list_handler.prototype.reinit=function(){list_tags_overwrite_click_event(this._report_object,["INPUT","A","TEXTAREA","SELECT"]);if(this.get_list_click_type()=="default")for(var a=this.get_selected_items(!1),d=0;d<a.length;d++){if(a[d].length>0){var b=document.getElementById(a[d]);if(b){var c=b.attributes.onclick.value.split(",");c.length==3?this.olmero_markup_list_row_down(b,eval(c[1]),c[2].substr(2,c[2].length-5)):c.length==1&&this.olmero_markup_list_row_down(b)}}}else if(this.get_list_click_type()==
"checkbox"){a=this.get_selected_items(!1);for(d=0;d<a.length;d++)if(b=find_element("chk_"+this._name+"_"+a[d]))b.checked=!0}this.update_status_bar()};olmero_markup_list_handler.prototype.olmero_markup_list_sort_by=function(a){find_element(this._name+"_current_page").value="0";find_element(this._name+"_sorting_type").value=find_element(this._name+"_sorting").value==a&&find_element(this._name+"_sorting_type").value=="ASC"?"DESC":"ASC";sas(this._name+"_sorting",a)};
function init_navigator(){if(document.getElementById("olmero_list_navigator")&&window.opener){var a=find_element("olmero_list_navigator_list_name"),d=find_element("olmero_list_navigator_list_btn");if(a&&(a=a.value,d=d.value,a)){var b=window.opener.find_element(a+"_selected_ids");if(b&&(b=window.opener.document.getElementById(b.value))){for(var c=b.parentNode,e=null,f=null,h=null,g=null,i=!1,j=0;j<c.childNodes.length;j++){var k=c.childNodes[j].id;k&&k.substr(0,a.length+1)==a+"_"&&k!=a+"_title_row"&&
(i===!0&&(h===null&&(h=c.childNodes[j]),g=c.childNodes[j]),b==c.childNodes[j]&&(i=!0),i===!1&&(f=c.childNodes[j],e===null&&(e=c.childNodes[j])))}init_navigator_button("navigate_first",e,d,a);init_navigator_button("navigate_prev",f,d,a);init_navigator_button("navigate_next",h,d,a);init_navigator_button("navigate_last",g,d,a)}}}}
function init_navigator_button(a,d,b,c){if((a=document.getElementById(a))&&d)d="olmero_navigate('"+d.id+"','"+b+"','"+c+"')",is_ie()?a.href="javascript:"+d:a.setAttribute("onclick",d)}function olmero_navigate(a,d,b){window.opener&&(document.getElementById("olmero_list_navigator"),objLoading.showLoading(),window.opener.olmero_navigate_parent(this,a,d,b))}
function olmero_navigate_parent(a,d,b,c){if(a){a=document.getElementById(d);c=find_element(c+"_selected_ids");if(a&&a.id!=c)a.onclick();(b=document.getElementById(b))&&(is_ie()?b.click():b.attributes.onclick?setTimeout(b.attributes.onclick.value,0):b.attributes.onmousedown&&setTimeout(b.attributes.onmousedown.value,0))}};
function olmero_button_handler(){this.disable_btn=disable_btn;this.enable_btn=enable_btn;this.add_button=add_button;this.enable_buttons=enable_buttons;this.disable_buttons=disable_buttons;this.enable_multiselects=enable_multiselects;this.disable_multiselects=disable_multiselects;this._arr_buttons=[];this._arr_buttons_href=[];this._arr_buttons_onclick=[]}
function enable_btn(a){var b=document.getElementById(a);if(b){var d=this._arr_buttons_onclick[a],a=this._arr_buttons_href[a],e=/(_[^.]+)\.sig_navigate\(\'([^']+)\'(?:\s*,\s*\'([^']*)\'(?:\s*,\s*\'([^']*)\')?)?/.exec(d);if(e){var g=e[1],f=e[2];if(!e[4]&&(e=eval(g))&&e.get_list_click_type()!="checkbox")if((f=find_element(e._selected_id+"_sig_"+f))&&f.value)a=f.value,d+=";return false;"}if(is_ie()||is_khtml()){if(d)b.onclick=d;if(a)b.href=a}else d&&b.setAttribute("onclick",d),a&&b.setAttribute("href",
a);b.className="button"}}
function disable_btn(a){var b=document.getElementById(a);if(b){b.className="olmero_button_disabled";if(!this._arr_buttons_href[a])this._arr_buttons_href[a]=b.href;if(is_ie()||is_khtml()){if(!this._arr_buttons_onclick[a])this._arr_buttons_onclick[a]=b.onclick;b.onclick=""}else{if((!this._arr_buttons_onclick[a]||this._arr_buttons_onclick[a]=="undefined")&&b.attributes.onclick)this._arr_buttons_onclick[a]=b.attributes.onclick.value;b.setAttribute("onclick","return false;")}b.href="javascript:void(0);"}}
function disable_buttons(a){en_buttons=a.split(";");for(c in en_buttons)this.disable_btn(en_buttons[c])}function enable_buttons(a,b){for(i in this._arr_buttons)typeof this._arr_buttons[i]!="function"&&this.disable_btn(i);var d=a.split(";");for(c in d)(b===!1||this._arr_buttons[d[c]]&&this._arr_buttons[d[c]]===!0)&&this.enable_btn(d[c])}function add_button(a,b){b||(b=!1);this._arr_buttons[a]=b}
function disable_multiselects(){for(i in this._arr_buttons)typeof this._arr_buttons[i]!="function"&&this.disable_btn(i)}function enable_multiselects(){for(i in this._arr_buttons)typeof this._arr_buttons[i]!="function"&&(this._arr_buttons[i]?this.enable_btn(i):this.disable_btn(i))};
function tricheck_checking(a,d,e,b){arr_strings=a.src.split("/");scr_string=arr_strings.pop();cur_pos=0;new_value="";document.getElementById(a.id.replace("_image",""))?hidden_object=document.getElementById(a.id.replace("_image","")):document.getElementByName(a.id.replace("_image",""))&&(hidden_object=document.getElementByName(a.id.replace("_image","")));for(c=0;c<tricheck_states.length;c++)if(scr_string=="chk_"+tricheck_states[c]+".gif"){cur_pos=c+1;break}cur_pos>tricheck_states.length-1&&(cur_pos=
0);cur_pos==2&&!b&&(cur_pos=0);switch(cur_pos){case 0:new_value=d;break;case 1:new_value=e;break;default:new_value=b}a.src=arr_strings.join("/")+"/chk_"+tricheck_states[cur_pos]+".gif";if(hidden_object)hidden_object.value=new_value};
function showhide_arbeitsgattung(a){var b=document.getElementById("gattung_"+a),c=document.getElementById("image_"+a);if(b){b.parentNode.style.display=b.parentNode.style.display=="none"?"inline":"none";if(c)c.src="/images/"+(b.parentNode.style.display=="none"?"plus":"minus")+".gif";b.innerHTML.substring(5,8).toUpperCase()==loading_placeholder&&create_olmero_ajax_request("/element/gattung.php","gattung_"+a,!1,"group_id="+a)}}
function register_arbeitsgattung_element(){for(var a=document.getElementsByTagName("ul"),b=0;b<a.length;b++)if(a[b].className=="arbeitsgattung")a[b].onclick=arbeitsgattung_element_click}function arbeitsgattung_element_click(a){a=olmero_get_cross_event_target(a);if(a.tagName=="TD"&&(a=a.parentNode.getElementsByTagName("input"),a.length==1&&a[0].attributes.name.value=="Arbeitsgattung_ID[]"))a[0].checked=!a[0].checked};
function olmero_histoslider_register(a){a=new olmeroXElements.histogramElement(a);global_register_init_object(a);return a}
olmeroXElements.histogramElement=jQuery.klass({initialize:function(a){var b=this;this.options=a;this.name=this.options.name;this.slider_object=document.getElementById(this.name);this.block_placeholder_object=document.getElementById(this.name+"_block_placeholder");this.range_object_left=document.getElementById(this.name+"_range_left");this.range_object=document.getElementById(this.name+"_range");this.range_object_right=document.getElementById(this.name+"_range_right");if(is_ie()||is_khtml()||is_opera())this.range_object_right.style.marginLeft=
"1px";this.text_object=find_element(this.name+"_from_to_text");this.text_object_popout=find_element(this.name+"_from_to_text_popout");this.changed_object=find_element(this.name+"_changed");this.status_object=find_element(this.name+"_status");this.max_object=document.getElementById(this.name+"_min");this.min_object=document.getElementById(this.name+"_max");this.popup_object=document.getElementById(this.name+"_exp");this.min_index_object=find_element(this.name+"_value_min_index");this.min_value=find_element(this.name+
"_value_min").value;this.max_index_object=find_element(this.name+"_value_max_index");this.max_value=find_element(this.name+"_value_max").value;this.arrow_container=document.getElementById(this.name+"_arrows");this.max_value_orig=this.min_value_orig=0;this.offsetleft=get_offset_left(document.getElementById(this.name));this.histo_blocks=[];this.min_in_slide=this.max_in_slide=!1;this.histo_block_max_height=40;this.pixel_value=1;this.block_width=0;this.arrow_width=-1;if(this.slider_object&&this.min_object&&
this.max_object&&(this.min_object.onmousedown=function(){b.mouseDown(!0);return!1},this.min_object.onmousemove=function(a){b.mouseMove(a);return!1},this.min_object.onmouseout=function(a){b.mouseOut(a);return!1},this.min_object.onmouseup=function(){b.sliderUp()},this.max_object.onmousedown=function(){b.mouseDown(!1);return!1},this.max_object.onmousemove=function(a){b.mouseMove(a);return!1},this.max_object.onmouseout=function(a){b.mouseOut(a);return!1},this.max_object.onmouseup=function(){b.sliderUp()},
this.popup_object?(this.popup_object.onmousemove=function(a){b.sliderMouseMove(a)},this.popup_object.onmouseup=function(){b.sliderUp()}):this.slider_object.onmousemove=function(a){b.sliderMouseMove(a)},this.arrow_container))this.arrow_container.style.height="13px",this.arrow_container.onmousedown=function(a){b.downOutside(a);return!1}},registerBlock:function(a,b){this.histo_blocks[this.histo_blocks.length]=[a,b]},mouseMove:function(a){a=olmero_get_cross_event_target(a);a==this.max_object&&this.min_in_slide||
a==this.min_object&&this.max_in_slide||this.changeArrow(a,!0)},changeArrow:function(a,b){if(a)a.src="/images/gui/middle_arrow_up"+(b===!0?"_selected":"")+".gif"},mouseOut:function(a){!this.min_in_slide&&!this.max_in_slide&&this.changeArrow(olmero_get_cross_event_target(a),!1)},init:function(){this.options.isExpandable&&(new olmeroXElements.expandableElement({name:this.name})).init();this.slider_object.style.width=Math.round(this.slider_object.offsetWidth/this.histo_blocks.length)*this.histo_blocks.length+
"px";if(this.popup_object)this.popup_object.firstChild.style.width=this.slider_object.offsetWidth+"px";if(this.histo_blocks.length<2)this.slider_object.style.display="none";else{if(this.max_value>=this.histo_blocks.length)this.max_value=this.histo_blocks.length;if(this.min_value==="")this.min_value=0;if(this.max_value==="")this.max_value=this.histo_blocks.length;this.min_value_orig=this.min_value;this.max_value_orig=this.max_value;this.offsetleft=get_offset_left(this.slider_object);this.block_width=
this.slider_object.offsetWidth/this.histo_blocks.length;for(var a=0,b=0;b<this.histo_blocks.length;b++)this.histo_blocks[b][0]>a&&(a=this.histo_blocks[b][0]);this.pixel_value=this.histo_block_max_height/a;for(b=0;b<this.histo_blocks.length;b++){var c=document.createElement("div");jQuery(c).addClass("block");var d=(a-this.histo_blocks[b][0])*this.pixel_value;d===0&&(d=1);c.style.height=d+"px";c.style.width=this.block_width+"px";c.style.overflow="hidden";c.innerHTML="";this.block_placeholder_object.appendChild(c)}this.range_object.style.height=
this.histo_block_max_height+"px";this.range_object_left.style.height=this.range_object.style.height;this.range_object_right.style.height=this.range_object.style.height;this.block_placeholder_object.style.height=this.histo_block_max_height+"px";this.arrow_width=this.min_object.offsetWidth;if(this.popup_object)this.arrow_width=13;this.repaintObject()}},repaintObject:function(){var a=this.max_value*this.block_width,b=this.min_value*this.block_width;this.max_object.parentNode.parentNode.style.left=a-
this.arrow_width/2+"px";this.min_object.parentNode.parentNode.style.left=b-this.arrow_width/2+"px";this.range_object_left.style.width=b+"px";if(is_ie()||is_khtml()||is_opera())this.range_object_left.style.display=b<1?"none":"inline";this.range_object.style.width=a-b+"px";if(is_ie()||is_khtml()||is_opera())this.range_object.style.width=a-b-1+"px";this.range_object_right.style.width=this.histo_blocks.length*this.block_width-a+"px";if(is_ie()||is_khtml()||is_opera())this.range_object_right.style.display=
this.histo_blocks.length*this.block_width-a<1?"none":"inline";document.getElementsByName(this.name+"_value_min")[0].value=this.min_value;this.min_index_object.value=this.histo_blocks[this.min_value][1];document.getElementsByName(this.name+"_value_max")[0].value=this.max_value;this.max_index_object.value=this.histo_blocks[this.max_value-1][1];a=this.histo_blocks[this.min_value][1];this.max_value-1>this.min_value&&(a+=" - "+this.histo_blocks[this.max_value-1][1]);this.text_object.value=a;if(this.text_object_popout)this.text_object_popout.value=
a.clearHTMLEntities();if(this.min_value_orig!=this.min_value||this.max_value_orig!=this.max_value)this.changed_object.value=1;this.status_object.value=this.min_value===0&&this.max_value==this.histo_blocks.length?"all":""},downOutside:function(a){if(!this.min_in_slide&&!this.max_in_slide){if(is_ie())a=window.event;var b=a.clientX-this.offsetleft,c=parseFloat(this.max_object.parentNode.parentNode.style.left.substr(0,this.max_object.parentNode.parentNode.style.left.length-2)),d=parseFloat(this.min_object.parentNode.parentNode.style.left.substr(0,
this.min_object.parentNode.parentNode.style.left.length-2));c+=this.arrow_width/2;d+=this.arrow_width/2;c=b-c;c>0||-1*c<b-d?this.mouseDown(!1):this.mouseDown(!0);this.sliderMouseMove(a)}},mouseDown:function(a){a?(this.min_in_slide=!0,this.changeArrow(this.min_object,!0)):(this.max_in_slide=!0,this.changeArrow(this.max_object,!0))},sliderUp:function(){if(this.min_in_slide)this.min_in_slide=!1,this.changeArrow(this.min_object,!1);else if(this.max_in_slide)this.max_in_slide=!1,this.changeArrow(this.max_object,
!1)},sliderMouseMove:function(a){var b=!1;if(is_ie())a=window.event;a=a.clientX-this.offsetleft;this.popup_object&&(a-=10);var c=!0,d=parseFloat(this.max_object.parentNode.parentNode.style.left.substr(0,this.max_object.parentNode.parentNode.style.left.length-2)),e=parseFloat(this.min_object.parentNode.parentNode.style.left.substr(0,this.min_object.parentNode.parentNode.style.left.length-2));d+=this.arrow_width/2;e+=this.arrow_width/2;this.min_in_slide?a>=parseInt(d,10)-parseInt(this.block_width,10)?
a=parseInt(d,10)-parseInt(this.block_width,10):a<=-5&&(c=!1):this.max_in_slide&&(a<=parseInt(e,10)+parseInt(this.block_width,10)?a=parseInt(e,10)+parseInt(this.block_width,10):a>=this.slider_object.offsetWidth&&(c=!1));if(c===!0){if(this.min_in_slide)this.min_object.parentNode.parentNode.style.left=a+"px",b=!0;else if(this.max_in_slide)this.max_object.parentNode.parentNode.style.left=a+"px",b=!0;if(b){d=this.max_object.parentNode.parentNode.style.left.substr(0,this.max_object.parentNode.parentNode.style.left.length-
2);e=this.min_object.parentNode.parentNode.style.left.substr(0,this.min_object.parentNode.parentNode.style.left.length-2);if(this.max_in_slide)this.max_value=Math.round(d/this.block_width);else if(this.min_in_slide)this.min_value=Math.round(e/this.block_width);if(this.min_value<0)this.min_value=0;this.repaintObject()}}}});
function price_format(a){var a=Math.round(a*100),b=0;a<0&&(a*=-1,b=1);a=a<100?"0"+a:a;a=a<10?"0"+a:a;a="000"+(b?"-"+a:a);res="";for(i=start=0;i<a.length;i++){if(a.charAt(i)=="-")res+="-";else if(a.charAt(i)!="0"||a.length-1-i<=2)start=1;start&&(res+=a.charAt(i),a.length-1-i==2?res+=".":(a.length-1-i-2)%3===0&&(res+="'"))}return res}function devis_addelement(a){posname=a.substr(0,11);devis_elementnames[posname]||(devis_elementnames[posname]=[]);devis_elementnames[posname].push(a)}
function devis_update(a){var b=find_element("price_"+a),g=find_element("adapt"),h=find_element("adapt_"+a.substr(0,11)),b=b.value.replace(/'/g,"");b!==""&&(b=price_format(b));var a=a.substr(0,11),e=devis_elementnames[a];if(e)for(a=0;a<e.length;a++){var c=find_element("price_"+e[a]);if(c){var d=c.name.substr(6),f=find_element("total_"+d);if(g.checked||h)c.value=b;if(f)d=find_element("quant_"+d),f.value=price_format(c.value.replace(/'/g,"")*d.value)}}return!0}function npk_input_check(){return!0};
var bidder_tender_list_all_expanded=null,bidder_tender_list_expanded_row=[];
function init_bidder_tender_list(){function a(a){jQuery.each([c,d,e,f],function(){this.toggleClass("disabled",!a)})}var b=jQuery("#button-select-all"),c=jQuery("#button-deselect-selected"),d=jQuery("#button-export-selected"),e=jQuery("#button-show-selected"),f=jQuery("#button-hide-selected");jQuery("input.tender-list-markable:checkbox").click(function(){var b=jQuery("input.tender-list-markable:checkbox:checked").length>0;a(b)});b.click(function(){a(!0)});c.click(function(){a(!1)});b=jQuery("input.tender-list-markable:checkbox:checked").length>
0;a(b)}function bidder_tender_list_add_class(a,b){jQuery(a).addClass(b);var c=document.getElementById(a.id+"_detail");jQuery(c).addClass(b)}function bidder_tender_list_remove_class(a,b){jQuery(a).removeClass(b);var c=document.getElementById(a.id+"_detail");jQuery(c).removeClass(b)}function bidder_tender_list_row_over(a){bidder_tender_list_add_class(a,"bidder_tender_list_active_row")}function bidder_tender_list_row_out(a){bidder_tender_list_remove_class(a,"bidder_tender_list_active_row")}
var bidderTenderListCellClicked=!1;function bidder_tender_list_cell_click(){bidderTenderListCellClicked=!0}function bidder_tender_list_all_rows_click(){}
function bidder_tender_list_row_click(a,b){if(bidderTenderListCellClicked)bidderTenderListCellClicked=!1;else{var c=!0;bidder_tender_list_expanded_row[b]&&(c=!1);var d=document.getElementById(a.id+"_detail");d.firstChild.offsetHeight>1?(jQuery(a).removeClass("bidder_tender_list_row_expanded"),jQuery(a).addClass("bidder_tender_list_row_collapsed"),d.firstChild.style.borderBottom="none",d.firstChild.style.borderRight="1px solid #eeeeee",d.firstChild.style.borderLeft="1px solid #eeeeee"):(jQuery(a).removeClass("bidder_tender_list_row_collapsed"),
jQuery(a).addClass("bidder_tender_list_row_expanded"),d.firstChild.style.borderBottom="1px solid #888888",d.firstChild.style.borderRight="1px solid #888888",d.firstChild.style.borderLeft="1px solid #888888");jQuery(d).toggle();bidder_tender_list_expanded_row[b]=c}}function bidder_tender_list_detail_click(a,b){var c=a.id.replace(RegExp("_detail$","g"),"");bidder_tender_list_row_click(document.getElementById(c),b)}
function bidder_tender_list_link_click(a,b){bidder_tender_list_cell_click();b===!0?window.open(a):(objLoading.showLoading(),document.location=a)}function bidder_tender_list_select_all(a){jQuery("input.tender-list-markable:checkbox").attr("checked",!a)}function bidder_tender_list_export_selected(){var a=jQuery("input.tender-list-markable:checkbox:checked").serialize();a.length>0&&document.location.replace("/Ausschreibungsliste.csv?action=selected&"+a)}
function bidder_tender_list_export_all(){document.location.replace("/Ausschreibungsliste.csv?action=all")}
function bidder_tender_expanded_view(a,b){var c=create_http_request(),d="extended="+(a==!0?"1":"0"),e=0;b||(c.open("POST","/ajax/bidder_extended_view.php",!0),c.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset:UTF-8"),c.setRequestHeader("Content-length",d.length),c.send(d));jQuery(".tender-list-markable").each(function(){var b=jQuery(this).val();if(bidder_tender_list_expanded_row[b]!=a||bidder_tender_list_expanded_row[b]=="undefined")setTimeout("bidder_tender_list_detail_click(document.getElementById('bidder_tender_list_row_"+
b+"_detail'), "+b+");",e),e+=10})};
function olmero_zip_completer_register(a){global_register_init_object(new olmeroXElements.zipCompleterElement(a))}
olmeroXElements.zipCompleterElement=jQuery.klass({initialize:function(a){this.setOptions(a);this.auto_changed=!1;this.obj_zip=null;this.obj_zip_val="";this.obj_city=null;this.obj_city_val="";this.obj_country=this.obj_state=null;this.in_request=!1;this.ajax_request=create_http_request();var b=this.getOption("countryElement"),c=find_element(b);this.isEnabled=function(){return b?(c||(c=find_element(b)),c?c.value=="ch":!1):!0};olmero_auto_complete_register({name:this.getOption("name"),ajaxUrl:"/element/autocomplete_plz.php",
charToComplete:2,isEnabledCallback:this.isEnabled,argumentName:"autocomplete_text"});this.getOption("cityElement")&&olmero_auto_complete_register({name:this.getOption("cityElement"),ajaxUrl:"/element/autocomplete_ort.php",charToComplete:2,isEnabledCallback:this.isEnabled,argumentName:"autocomplete_text"})},init:function(){this.obj_zip=find_element(this.getOption("name"));this.obj_city=find_element(this.getOption("cityElement"));this.obj_state=find_element(this.getOption("stateElement"));var a=this;
if(this.obj_zip)this.obj_zip.onchange=function(){if(!a.isEnabled())return!0;a.obj_zip.value.length>2&&a.changeInput("zip")};if(this.obj_city)this.obj_city.onchange=function(){if(!a.isEnabled())return!0;a.obj_city.value.length>0&&a.changeInput("city")};set_loading_inputs([this.obj_zip,this.obj_city,this.obj_state],!0,!0)},changeInput:function(a){var b=this;this.ajax_request&&this.ajax_request.abort();this.ajax_request.onreadystatechange=function(){b.incomingRequest()};var c="",d=[],e="";switch(a){case "zip":c=
"/element/zip_completer.php";if(this.obj_zip.olmeroMoreData){this.obj_city.value=this.obj_zip.olmeroMoreData;return}e="zip="+this.obj_zip.value;d[0]=this.obj_city;d[1]=this.obj_state;this.obj_state_auto_changed=this.obj_city_auto_changed=!0;break;case "city":c="/element/zip_completer.php";if(this.obj_city.olmeroMoreData){this.obj_zip.value=this.obj_city.olmeroMoreData;return}e="city="+this.obj_city.value;d[0]=this.obj_zip;d[1]=this.obj_state;this.obj_state_auto_changed=this.obj_zip_auto_changed=!0}set_loading_inputs(d,
!0);this.ajax_request.open("POST",c,!0);this.ajax_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset:ISO-8859-1");this.ajax_request.send(e)},updateField:function(a,b,c){if(a){if((a.value.length===0||c===!0)&&b.length>0)a.type=="select"?a.selectedIndex=b:a.value=b;set_loading_inputs([a],!1)}},incomingRequest:function(){try{if(this.ajax_request.readyState>=3&&this.ajax_request.status==200&&this.ajax_request.responseXML){var a=this.ajax_request.responseXML,b=olmero_xml_get_value(a,
"zip"),c=olmero_xml_get_value(a,"city"),d=olmero_xml_get_value(a,"state"),e=olmero_xml_get_value(a,"state_id");this.updateField(this.obj_zip,b,!0);this.obj_zip_val=b;if(this.obj_city)this.updateField(this.obj_city,c,!0),this.obj_city_val=c;this.obj_state&&(this.obj_state.type=="select"?this.updateField(this.obj_state,e,!0):this.updateField(this.obj_state,d,!0))}}catch(f){}},setOptions:function(a){this.objOptions=a},getOptions:function(){return this.objOptions},setOption:function(a,b){this.objOptions[a]=
b},getOption:function(a){var b=null;this.objOptions&&this.objOptions[a]&&(b=this.objOptions[a]);return b}});
olmeroXElements.absoluteDiv=jQuery.klass({initialize:function(a){this.options=a;this.placeholder=document.createElement("div");this.content=document.createElement("div");this.loading=document.createElement("div");this.loading.style.paddingTop="12px";this.loading.appendChild(get_loading_images(!0));this.effect=null;this.top=this.left=0;this.isopen=!1;this.placeholder.style.position="absolute";this.placeholder.style.display="inline";this.content.style.position="absolute";this.content.style.display=
"block";if(this.options&&this.options.fixedHeight)this.content.style.height=this.options.fixedHeight+"px",this.loading.style.paddingTop=this.options.fixedHeight/2-18+"px";this.placeholder.appendChild(this.content)},getElement:function(){return this.placeholder},clearContent:function(){if(this.content)for(var a=0;a<this.content.childNodes.length;a++)this.content.removeChild(this.content.childNodes[a])},scrollToElement:function(a){if(a&&this.options&&this.options.fixedHeight>0){var b=0;a.offsetTop>
this.content.offsetHeight-2*a.offsetHeight&&(b=a.offsetTop-(this.content.offsetHeight-2*a.offsetHeight));this.content.scrollTop=b}},appendChild:function(a){this.content.appendChild(a)},appendHTML:function(a){this.content.innerHTML=a},showElement:function(){if(this.placeholder){if(this.options&&this.options.fixedHeight>0){for(var a=0,b=0;b<this.content.childNodes.length;b++)this.content.childNodes[b].offsetHeight&&(a+=this.content.childNodes[b].offsetHeight);this.content.style.overflow=a>this.content.offsetHeight-
4?"scroll":""}if(this.options&&this.options.fixedWidth)this.content.style.width=this.options.fixedWidth+"px",this.options("fixedWidth",null);for(b=a=0;b<this.content.childNodes.length;b++)if(this.content.childNodes[b]&&this.content.childNodes[b].offsetWidth&&this.content.childNodes[b].offsetWidth>a)a=this.content.childNodes[b].offsetWidth;if(this.content.offsetWidth<a)this.options[this.fixedWidth]=this.content.offsetWidth,this.content.style.width=a+(is_ie()?40:20)+"px";if(this.isopen===!1){this.content.style.zIndex=
"100";if(this.content.firstChild)this.options&&this.options.withEffect===!0&&jQuery(this.content).hide(),this.placeholder.style.visibility="",this.options&&this.options.withEffect===!0&&jQuery(this.content).fadeIn();this.isopen=!0}}},hideElement:function(){if(this.placeholder){if(this.isopen===!0&&this.options&&this.options.withEffect===!0){var a=this;jQuery(a).fadeOut(400,function(){a.placeholder.style.visibility="hidden"})}else this.placeholder.style.visibility="hidden";this.isopen=!1}},elementActive:function(){return this.placeholder.style.visibility!=
"hidden"},content:function(){return this.content},showLoading:function(){this.clearContent();this.appendChild(this.loading);this.showElement()},setPosition:function(a){if(a=="center"&&document.body.firstChild)document.body.insertBefore(this.getElement(),document.body.firstChild),this.showElement(),this.getElement().style.left="50%",this.getElement().style.marginLeft=0-this.content.offsetWidth/2+"px",a=window.pageYOffset?window.pageYOffset:document[document.compatMode=="CSS1Compat"?"documentElement":
"body"].scrollTop,this.getElement().style.top=getWindowHeight()/2-75+a+"px"}});
function olmero_auto_complete_register(a){global_register_init_object(new olmeroXElements.autocompleteElement(a))}
olmeroXElements.autocompleteElement=jQuery.klass({initialize:function(a){this.options=a;this.name=this.options.name;this.ajax_url=this.options.ajaxUrl;this.argumentName=this.options.argumentName;this.isEnabledCallback=this.options.isEnabledCallback;if(this.options.additional_parameter!=0)this.additional_parameter=this.options.additional_parameter;this.obj_input=null;this.obj_popup=new olmeroXElements.absoluteDiv({fixedHeight:180});this.obj_popup.hideElement();this.obj_popup.content.className="chooser";
this.completeSelectionId=this.completeDataMore=this.completeData=this.ajax_request=this.value=null;this.inFocus=!0;this.inMouseEvent=!1},updateValue:function(){this.value=this.obj_input?this.obj_input.value:""},init:function(){var a=this;this.obj_input=find_element(this.name);if(this.obj_input.offsetHeight>0)this.obj_popup.content.style.marginTop=this.obj_input.offsetHeight+"px";if(this.obj_input.offsetWidth>0)this.obj_popup.content.style.width=this.obj_input.offsetWidth-2+"px";this.obj_input.parentNode.insertBefore(this.obj_popup.getElement(),
this.obj_input);this.obj_input.setAttribute("AUTOCOMPLETE","off");this.obj_input.onkeypress=function(b){if(a.isEnabledCallback&&!a.isEnabledCallback())return!0;a.inFocus=!0;a.inMouseEvent=!1;a.keyPress(b)};this.obj_input.onkeyup=function(b){if(a.isEnabledCallback&&!a.isEnabledCallback())return!0;a.inFocus=!0;a.inMouseEvent=!1;a.keyUp(b);(is_ie()||is_khtml())&&a.keyPress(b)};this.obj_input.onblur=function(){if(a.isEnabledCallback&&!a.isEnabledCallback())return!0;a.inFocus=!1;a.obj_popup.hideElement()};
this.obj_input.onfocus=function(){if(a.isEnabledCallback&&!a.isEnabledCallback())return!0;a.inFocus=!0};this.updateValue()},updateCompleter:function(){for(var a=this.obj_popup.content.getElementsByTagName("TR"),b=0;b<a.length;b++)if(a[b].className="",b==this.completeSelectionId)this.inMouseEvent||this.obj_popup.scrollToElement(a[b]),a[b].className="selected"},selectCompleter:function(){if(this.completeData&&this.completeData[this.completeSelectionId]&&(this.obj_input.value=this.completeData[this.completeSelectionId],
this.completeDataMore[this.completeSelectionId]))this.obj_input.olmeroMoreData=this.completeDataMore[this.completeSelectionId]},keyPress:function(a){a=olmero_helper_pressed_key(a);if(this.completeData&&(a==KEY_DOWN||a==KEY_UP)){this.completeSelectionId===null?this.completeSelectionId=0:this.completeSelectionId+=a==KEY_UP?-1:1;if(this.completeSelectionId>this.completeData.length-1)this.completeSelectionId=0;else if(this.completeSelectionId<0)this.completeSelectionId=this.completeData.length-1;this.updateCompleter();
return!0}else if(KEY_ENTER==a){this.selectCompleter();this.updateValue();try{if(this.obj_input&&this.obj_input.onchange)this.obj_input.onchange()}catch(b){}return!1}else if(KEY_ESC==a)return this.completeData=null,this.obj_popup.hideElement(),!1},keyUp:function(a){olmero_helper_pressed_key(a);this.loadData()},loadData:function(){var a=this,b=this.value;this.updateValue();if(this.value.length>=this.options.charToComplete){if(this.value!=b){if(this.ajax_request)this.ajax_request.abort(),this.ajax_request=
null;this.ajax_request=create_http_request();this.ajax_request.onreadystatechange=function(){a.incomingRequest()};this.ajax_request.open("POST",this.ajax_url,!0);this.ajax_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset:ISO-8859-1");request=this.additional_parameter!=void 0?this.argumentName+"="+this.value+"&additional_parameter="+this.additional_parameter:this.argumentName+"="+this.value;this.ajax_request.send(request)}}else this.obj_popup.hideElement()},incomingRequest:function(){try{if(this.ajax_request.readyState>=
4&&this.ajax_request.status==200)if(this.ajax_request.responseXML&&this.inFocus===!0){var a=[];this.completeData=[];this.completeDataMore=[];for(var b=this.ajax_request.responseXML.getElementsByTagName("olmerorecord"),c=0;c<b.length;c++){var e=b[c].childNodes[0].firstChild.nodeValue.urlDecode();if(e&&e.length>0&&(this.completeData[c]=e,b[c].childNodes.length>1)){for(var f=[],h=1;h<b[c].childNodes.length;h++)f[f.length]=b[c].childNodes[h].firstChild.nodeValue.urlDecode();a[c]=f}}var g=this,d=new olmeroXElements.htmlTable,
b="100%";is_ie()&&(b="90%");d.tableObject.setAttribute("width",b);d.tableObject.setAttribute("cellpadding","0");d.tableObject.cellPadding="0";d.tableObject.setAttribute("cellspacing","0");d.tableObject.cellSpacing="0";b=null;for(c=0;c<this.completeData.length;c++)if(d.newRow(),d.currentRow().onmousemove=function(){g.inMouseEvent=!0;g.completeSelectionId=this.id.substr((g.name+"_complete_").length);g.updateCompleter()},d.currentRow().onmousedown=function(){g.selectCompleter();try{g.obj_input.onchange()}catch(a){}},
d.currentRow().id=this.name+"_complete_"+c,b=d.newColumn(this.completeData[c]),a[c])for(e=0;e<a[c].length;e++)is_ie()?d.newColumn('<span class="info_cell" style="padding: 2px">'+a[c][e]+"</div>",[]):(f=[],f["class"]="info_cell",d.newColumn(a[c][e],f)),b.olmeroData=a[c],this.completeDataMore[c]=a[c];if(this.obj_popup)if(this.obj_popup.clearContent(),this.completeData.length>0){var i=document.createElement("div");i.setAttribute("class","header");i.innerHTML="Vorschläge";var j=document.createElement("div");
j.setAttribute("class","header");j.innerHTML="Anzahl Einträge:"+this.completeData.length;this.obj_popup.appendChild(d.getTable());this.obj_popup.showElement();this.completeSelectionId=null}else this.obj_popup.hideElement()}else this.obj_popup&&this.obj_popup.hideElement()}catch(k){}}});
olmeroXElements.htmlTable=jQuery.klass({initialize:function(a){this.hiddenRows=[];this.isLabeled=!1;this.tableObject=document.createElement("table");this.tableObject.appendChild(document.createElement("tbody"));a&&a.fromObject&&this.fromObject(a.fromObject)},fromObject:function(a){if(isA(a,"table"))this.tableObject=a;else if(isA(a,"tbody")&&isA(a.parentNode,"table"))this.tableObject=a.parentNode},gerNodeIndexByRowIndex:function(a){var b=0;for(arrayIndexByRowIndex in this.tableObject.firstChild.childNodes)if(isA(this.tableObject.firstChild.childNodes[arrayIndexByRowIndex],
"tr")&&this.tableObject.firstChild.childNodes[arrayIndexByRowIndex].getAttribute("rowIndex")==a){b=arrayIndexByRowIndex;break}return b},getRowByRowIndex:function(a){return this.tableObject.firstChild.childNodes[this.gerNodeIndexByRowIndex(a)]},showRowByArrayIndex:function(a){if(this.hiddenRows&&this.hiddenRows.length>a&&this.hiddenRows[a]){var b=this.hiddenRows[a].attributes.rowIndex.nodeValue;b--;if(this.tableObject.firstChild.childNodes.length>b){var c=null,b=this.gerNodeIndexByRowIndex(b);for(b++;b<
this.tableObject.firstChild.childNodes.length;b++)if(isA(this.tableObject.firstChild.childNodes[b],"tr")){c=this.tableObject.firstChild.childNodes[b];break}c&&this.tableObject.firstChild.insertBefore(this.hiddenRows[a],c)}}},showRow:function(a){for(var b=0;b<this.hiddenRows.length;b++)this.hiddenRows[b]&&this.hiddenRows[b].getAttribute("rowIndex")==a&&this.showRowByArrayIndex(b)},showAllRows:function(){for(var a=0;a<this.hiddenRows.length;a++)this.showRowByArrayIndex(a)},hideRow:function(a){if(!this.isLabeled){for(var b=
0,c=0;c<this.tableObject.firstChild.childNodes.length;c++)isA(this.tableObject.firstChild.childNodes[c],"tr")&&this.tableObject.firstChild.childNodes[c].setAttribute("rowIndex",b++);this.isLabeled=!0}isA(this.tableObject,"table")&&isA(a,"tr")&&isA(a.parentNode,"tbody")&&a.parentNode.parentNode==this.tableObject&&(this.hiddenRows[this.hiddenRows.length]=a,this.tableObject.firstChild.removeChild(a));return a.getAttribute("rowIndex")},setAttribute:function(a,b){this.tableObject.setAttribute(a,b)},newRow:function(a){var b=
document.createElement("tr");if(a)for(var c=0;c<a.length;c++)b.setAttribute(c,a[c]);this.tableObject.firstChild.appendChild(b)},currentRow:function(){return this.tableObject.firstChild.childNodes[this.currentRowIndex()]},currentRowIndex:function(){return this.tableObject.firstChild.childNodes.length-1},newColumn:function(a,b){this.currentRowIndex()<0&&this.newRow([]);var c=document.createElement("td");if(b)for(index in b)b[index]&&typeof b[index]=="string"&&c.setAttribute(index,b[index]);c.innerHTML=
a;this.currentRow().appendChild(c);return c},getTable:function(){return this.tableObject}});
olmeroXElements.browseInput=jQuery.klass({initialize:function(a){this.text_object=a;this.button_object=document.createElement("button");this.button_object.className="browse_button";this.closeStatus()},init:function(){if(this.text_object&&(this.text_object.parentNode.insertBefore(this.button_object,this.text_object.nextSibling),this.text_object.offsetWidth>0))this.text_object.style.width=this.text_object.offsetWidth-this.button_object.offsetWidth-5+"px"},getValue:function(){return this.getTextObject().value},
setValue:function(a){this.getTextObject().value=a},getTextObject:function(){return this.text_object},getButtonObject:function(){return this.button_object},setButtonContent:function(a){this.button_object.firstChild&&this.button_object.removeChild(this.button_object.firstChild);this.button_object.appendChild(a)},openStatus:function(){this.button_object.style.color="black";this.button_object.innerHTML="&#9662;"},closeStatus:function(){this.button_object.style.color="";this.button_object.innerHTML="&#9662;"}});
function olmero_checkbox_group_register(a){a=new olmeroXElements.checkboxGroup(a);a.init();return a}
olmeroXElements.checkboxGroup=jQuery.klass({initialize:function(a){this.id=a.id;this.name=a.name;this.jElement=jQuery("#"+this.name);this.jElementLabels=null;this.expandable=a.isExpandable===!0;this.single_select=a.isSingleSelect===!0;this.title_as_checkbox=a.titleAsCheckbox===!0;this.last_selected_box=null;this.checkboxes=[];this.info_text_object=this.title_checkbox=null;this.all_selected_text=a.textAllSelected;this.nothing_selected_text=a.textNothingSelected;this.textCallback=a.textCallback;this.text=
"";this.jElementAllCheckboxesWithoutTitle=this.jElementAllCheckboxes=null},loadCheckboxes:function(a){var b=this;if(a)this.jElementAllCheckboxes=jQuery("input[type=checkbox][name^="+this.name+"]",a),this.jElementAllCheckboxesWithoutTitle=this.title_as_checkbox==!0?this.jElementAllCheckboxes.slice(1):this.jElementAllCheckboxes,this.jElementAllCheckboxes.each(function(){b.checkboxes.push(this);jQuery(this).click(function(){b.changeCheckbox(this)})}),this.customSelectors=jQuery("input[type=checkbox].custom_selector",
a),this.customSelectors.each(function(){var c=jQuery(this),d=this.value,e=jQuery("input[type=checkbox]"+d,a);e.length===0&&c.parents("tr:first").hide();c.change(function(){d&&(e.attr("checked",jQuery(this).is(":checked")),b.stateChange());return!1})})},callback:function(){if(this.textCallback)this.text=this.textCallback()},init:function(){var a=this;this.expandable&&(new olmeroXElements.expandableElement({name:this.name,callback:function(){a.callback()}})).init();this.info_text_object=document.getElementById(this.name+
"_title_text");(this.domObject=document.getElementById(this.name))&&this.loadCheckboxes(this.domObject);if(this.title_as_checkbox===!0&&this.checkboxes[0])this.title_checkbox=this.checkboxes[0];this.stateChange();if(this.single_select){var b=this.getSelected();if(b.length>0)this.last_selected_box=b[0]}},changeCheckbox:function(a){if(this.last_selected_box!==null&&this.single_select)if(this.last_selected_box==a){a.checked=!0;return}else this.last_selected_box.checked=!1;this.last_selected_box=a;if(this.title_as_checkbox&&
a==this.title_checkbox)for(a=0;a<this.checkboxes.length;a++)if(this.checkboxes[a]!=this.title_checkbox)this.checkboxes[a].checked=this.title_checkbox.checked;this.stateChange()},getSelected:function(){for(var a=[],b=0;b<this.checkboxes.length;b++)this.checkboxes[b]!=this.title_checkbox&&this.checkboxes[b].checked===!0&&(a[a.length]=this.checkboxes[b]);return a},allSelected:function(){return this.jElementAllCheckboxesWithoutTitle.length==this.jElementAllCheckboxesWithoutTitle.filter(":checked").length},
selectAll:function(a){for(var a=document.getElementById(a).getElementsByTagName("input"),b=!0,c=0;c<a.length;c++)if(a[c].type=="checkbox"&&a[c].checked!==!0){b=!1;break}this.setChecks(a,!b)},setChecks:function(a,b){for(var c=0;c<a.length;c++)if(a[c].type=="checkbox")a[c].checked=b;this.stateChange()},setInfoText:function(a){if(this.info_text_object)this.info_text_object.innerHTML=a},stateChange:function(){var a=this.allSelected(),b=this,c=null;if(this.expandable){this.domObject&&this.customSelectors&&
this.customSelectors.each(function(){var a=this.value,c=jQuery(this);jQuery("input[type=checkbox]"+a,b.domObject).length==jQuery("input[type=checkbox]"+a+":checked",b.domObject).length?c.attr("checked",!0):c.attr("checked",!1)});var d="";if(this.textCallback)d=this.textCallback();else if(a===!1){for(var e=this.getSelected(),f=0;f<e.length;f++){d.length>0&&(d+=", ");d+=e[f].parentNode.getAttribute("title");if(!e[f].additinalJElements)e[f].additinalJElements=jQuery("input[type=text]",jQuery(".additional",
e[f].parentNode.parentNode.parentNode)),e[f].additinalJElements.change(function(){b.stateChange()});c="";e[f].additinalJElements.each(function(){var a=jQuery(this);if(a.val().length>0){var b=jQuery("label[for="+a.attr("id")+"]",a.parent.parent);c+=c.length>0?" ":"";b.length>=1&&(c+=b.html()+" ");c+=a.val();a.attr("title").length>0&&(c+=" "+a.attr("title"))}});c.length>0&&(d+=" ("+c+")")}d.length===0&&(d="<font style='font-weight: bold; color: red'>"+this.nothing_selected_text+"</font>")}else d=this.all_selected_text;
if(this.text.length>0)d=this.text;this.setInfoText(d);if(this.title_as_checkbox&&this.title_checkbox)this.title_checkbox.checked=a;this.updateHeaders();this.callback&&this.callback()}},updateHeaders:function(){var a=this;this.tmrHeaderUpdate&&clearTimeout(this.tmrHeaderUpdate);this.tmrHeaderUpdate=setTimeout(function(){a.updateHeadersTimeout()},400)},updateHeadersTimeout:function(){var a=this;if(this.jElementLabels===null)this.jElementLabels=[],jQuery("a label",this.jElement).each(function(){var b=
jQuery(this),c=b.attr("for").replace("chk","childrow");this.jInputs=jQuery("#"+c+" input[type=checkbox]");b.addClass("label");a.jElementLabels.push(this)});jQuery(this.jElementLabels).each(function(){this.className=this.jInputs.filter(":checked").length>0?"label oap_bold":"label"})}});
function OlmeroDate(a,b){this.day=this.month=this.year=null;b||(b="dd.mm.yyyy");if(a){if(b=="dd.mm.yyyy"){var c=a.split(".");this.year=parseInt(c[2].clearLeadingZeros(),10);this.month=parseInt(c[1].clearLeadingZeros(),10);this.day=parseInt(c[0].clearLeadingZeros(),10)}this.rebuildDate()}else this.dateObject=new Date,this.rebuildDate(!0)}
OlmeroDate.prototype.rebuildDate=function(a){if(!a)this.dateObject=new Date(this.year,this.month-1,this.day);this.year=this.dateObject.getFullYear();this.month=this.dateObject.getMonth()+1;this.day=this.dateObject.getDate();return!1};OlmeroDate.prototype.addYear=function(a){this.setYear(this.year+a)};OlmeroDate.prototype.addMonth=function(a){var b=this.month;for(this.setMonth(this.month+a);this.month-b>a;)this.addDay(-1)};OlmeroDate.prototype.addDay=function(a){this.setDay(this.day+a)};
OlmeroDate.prototype.setYear=function(a){this.year=a;this.rebuildDate()};OlmeroDate.prototype.setMonth=function(a){this.month=a;this.rebuildDate()};OlmeroDate.prototype.setDay=function(a){this.day=a;this.rebuildDate()};OlmeroDate.prototype.getYear=function(){return this.year};OlmeroDate.prototype.getMonth=function(a){var b=this.month;if(a)for(b="0"+this.month;b.length>2;)b=b.substr(1);return b};
OlmeroDate.prototype.getDay=function(a){var b=this.day;if(a)for(b="0"+this.day;b.length>2;)b=b.substr(1);return b};OlmeroDate.prototype.getDate=function(a){return a&&typeof a=="string"?this.getDay(!0)+"."+this.getMonth(!0)+"."+this.getYear(!0):Date.parse(this.dateObject)};
var olmeroBanners=[],spinner=new Image;spinner.src="/images/spinner.gif";
var objLoading=new olmeroXElements.loadingObject,element_form=null,firstsubmit=!0,windowopen=[],devis_elementnames=[],tricheck_states=["unchecked","checked","state"],current_gattung_detail=null,olmero_debugger=null,loading_placeholder="IMG",olmero_markup_lists=[],input_in_list_click=!1,globalTagHolder={},standard_init_objects=[],KEY_ENTER=13,KEY_ESC=27,KEY_UP=38,KEY_DOWN=40,html_chars=["&","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û",
"ü","ý","þ","ÿ","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","Ø","Ù","Ú","Û","Ü","Ý","Þ","€",'"',"ß","<",">","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾"],html_entities=["amp","agrave","aacute","acirc","atilde","auml","aring","aelig","ccedil","egrave","eacute","ecirc","euml","igrave","iacute","icirc","iuml","eth","ntilde","ograve","oacute","ocirc","otilde","ouml","oslash","ugrave",
"uacute","ucirc","uuml","yacute","thorn","yuml","Agrave","Aacute","Acirc","Atilde","Auml","Aring","AElig","Ccedil","Egrave","Eacute","Ecirc","Euml","Igrave","Iacute","Icirc","Iuml","ETH","Ntilde","Ograve","Oacute","Ocirc","Otilde","Ouml","Oslash","Ugrave","Uacute","Ucirc","Uuml","Yacute","THORN","euro","quot","szlig","lt","gt","cent","pound","curren","yen","brvbar","sect","uml","copy","ordf","laquo","not","shy","reg","macr","deg","plusmn","sup2","sup3","acute","micro","para","middot","cedil","sup1",
"ordm","raquo","frac14","frac12","frac34"],language=readCookie("LANGUAGE");language==null&&(language="de");String.prototype.clearHTMLEntities=function(){for(var a=this,b=0;b<html_entities.length;b++)a=a.replace("&"+html_entities[b]+";",html_chars[b]);return a};String.prototype.createHTMLEntities=function(){for(var a=this,b=0;b<html_entities.length;b++)a=a.replace(html_chars[b],"&"+html_entities[b]+";");return a};
String.prototype.clearLeadingZeros=function(){for(var a=this;a.length>0&&a[0]=="0";)a=a.substr(1);return a};String.prototype.urlDecode=function(){for(var a="",b=0;b<this.length;){var c=this.charAt(b);c=="+"?(a+=" ",b++):c=="%"?b<this.length-2&&"0123456789ABCDEFabcdef".indexOf(this.charAt(b+1))!=-1&&"0123456789ABCDEFabcdef".indexOf(this.charAt(b+2))!=-1?(a+=unescape(this.substr(b,3)),b+=3):(alert("Bad escape combination near ..."+this.substr(b)),a+="%[ERROR]",b++):(a+=c,b++)}return a};
String.prototype.urlEncode=function(){for(var a="",b=0;b<this.length;b++){var c=this.charAt(b);if(c==" ")a+="+";else if("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()".indexOf(c)!=-1)a+=c;else{var d=c.charCodeAt(0);d>255?(alert("Unicode Character '"+c+"' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted."),a+="+"):(a+="%",a+="0123456789ABCDEF".charAt(d>>4&15),a+="0123456789ABCDEF".charAt(d&15))}}return a};
window.onload=function(){for(var a=0;a<standard_init_objects.length;a++)standard_init_objects[a].init();if(is_ie()){fixPngIe();for(var b=document.getElementsByTagName("input"),a=0;a<b.length;a++)if(!b[a].className&&b[a].type=="text")b[a].className="input_ie";b=document.getElementsByTagName("textarea");for(a=0;a<b.length;a++)if(!b[a].className)b[a].className="input_ie"}for(a=0;a<olmeroBanners.length;a++){if(b=document.getElementById("bimg"+olmeroBanners[a].imgNum))b.src="/banner.html?id="+olmeroBanners[a].banner,
b.title=olmeroBanners[a].title;if(b=document.getElementById("bhref"+olmeroBanners[a].imgNum))b.href="/banner.html?click=1&id="+olmeroBanners[a].banner,b.target="_blank"}reinit_all_lists();initLogs();jQuery("body").click(function(){selectorBoxToggle()})};function initLogs(){jQuery("pre.log").each(function(){this.scrollTop=this.scrollHeight})}function global_register_init_object(a){var b=standard_init_objects.length;standard_init_objects[b]=a;return b}
function olmero_wait(a){date=new Date;var b=null;do b=new Date;while(b-date<a)}function olmero_get_cross_event_target(a){var b=null;return b=is_ie()?window.event.srcElement:a.target}
function olmero_debug(a){switch(1){case 1:if(!olmero_debugger){olmero_debugger=document.createElement("div");olmero_debugger.setAttribute("id","olmero_js_debugger");olmero_debugger.style.display="inline";if(is_ie())olmero_debugger.style.width="50%";var b=document.createElement("div");b.setAttribute("id","title");b.innerHTML="OLMeRO Script debugger (<a href=\"#\" onclick=\"document.getElementById('olmero_js_debugger').style.display='none';\">X</a>)";olmero_debugger.appendChild(b);document.getElementsByTagName("body")[0].appendChild(olmero_debugger)}olmero_debugger.innerHTML.length>
0&&(a="<br />"+a);olmero_debugger.innerHTML+=a;break;case 2:alert("Fehler im JS:\n"+a)}}function textCounter(a,b,c){a.value.length>c?a.value=a.value.substring(0,c):b.value=c-a.value.length}function getWindowWidth(){var a=0;if(self.innerWidth)a=self.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)a=document.documentElement.clientWidth;else if(document.body)a=document.body.clientWidth;return a}
function getWindowHeight(){var a=0;if(self.innerHeight)a=self.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)a=document.documentElement.clientHeight;else if(document.body)a=document.body.clientHeight;return a}function getWindowLeft(){if(self.screenLeft)return self.screenLeft;else if(self.screenX)return self.screenX}function getWindowTop(){if(self.screenTop)return self.screenTop;else if(self.screenY)return self.screenY}
function resize_to_content(){getWindowWidth();var a=getWindowHeight(),b=0,b=is_ie()?a+31:a+51;a>screen.height?b=screen.height-30:document.body.offsetHeight>a&&a<screen.height-30&&(b=screen.height-30);window.resizeTo(800,b);a=getWindowLeft();getWindowTop();is_ie()&&(a-=4);window.moveTo(a,0);olmero_list_init()}function is_ie(){var a=0;navigator.appName=="Microsoft Internet Explorer"&&/MSIE ([0-9]{1,}[.0-9]{0,})/.exec(navigator.userAgent)!==null&&(a=parseFloat(RegExp.$1));return a}
function is_opera(){return navigator.userAgent.toLowerCase().indexOf("opera")!=-1}function is_khtml(){return navigator.vendor=="KDE"||document.childNodes&&!document.all&&!navigator.taintEnabled}function find_element(a,b){b||(b=window);var c=b.document.getElementsByName(a)[0];if(c)element_form=c.form;return c}
function tcb(a){for(var b=0;b<document.forms.length;b++)for(var c=document.forms[b],d=0;d<c.elements.length;d++){var e=c.elements[d];if(e.type=="checkbox"&&e.value==a)e.checked=!e.checked}return!1}function sas(a,b,c,d){if(a=find_element(a,c)){a.value=b;b=!0;for(a=0;a<element_form.elements.length;a++)if(element_form.elements[a].type=="file"){b=!1;break}(!d||d!==!0)&&objLoading&&objLoading.showLoading();b?element_form.submit():submit_once(element_form)}return!1}
function stt(a,b,c,d,e){e?owonce(a,c,e):c||(c="_blank");d||(d="form");var f=document.forms[d].target,g=document.forms[d].action,h=document.forms[d].elements.fac.value;document.forms[d].target=c;document.forms[d].action=a;document.forms[d].elements.fac.value=b;document.forms[d].submit();document.forms[d].target=f;document.forms[d].action=g;document.forms[d].elements.fac.value=h;if(!e)return!1}
function clearform(a){for(i=0;i<a.elements.length;i++){var b=a.elements[i];if(b.type=="text"||b.type=="password")b.value="";else if(b.type=="checkbox"&&b.name!="mark[]")b.checked=!0;else if(b.type=="radio")b.checked=!1;else if(b.type=="select-one"&&b.selectedIndex!==0)b.selectedIndex=0}}
function copyaddress(){var a;if(!window.opener||!window.opener.document)window.close();else{if((a=document.servicesform.Firmen_ID)||(a=document.servicesform["Firmen_ID[]"])||find_element("services_selected_ids")){var b=find_element("services_selection_type").value,c="",d=window.opener.document.servicesform,e=window.opener.document.addressform;if(find_element("services_selected_ids")){var f=find_element("services_selected_ids").value.split(";");a=[];if(b=="multi")for(i=0;i<f.length;i++)find_element("chk_services_"+
f[i])&&(a[a.length]=find_element("chk_services_"+f[i]));else a[0]=f[0].substr(9)}else a=a.length?a:[a];for(i=0;i<a.length;i++)if(b=="multi"&&a[i].checked||b=="single"&&a[i])if(id=b=="multi"?a[i].value:a[i],d)c!==""&&(c+=","),c+=id;else if(e){b=firma[id];e["KontaktFirma_"+addressid].value=b.Firma;e["KontaktName_"+addressid].value=b.Name;e["KontaktStrasse_"+addressid].value=b.Strasse;e["KontaktPLZ_"+addressid].value=b.PLZ;e["KontaktOrt_"+addressid].value=b.Ort;e["KontaktTelefon_"+addressid].value=b.Tel;
e["KontaktFax_"+addressid].value=b.Fax;e["KontaktEmail_"+addressid].value=b.Email;window.close();return}if(d&&c!==""){d.Branchenbuch_Auswahl.value=c;d.submit();window.close();return}}alert("Bitte eine Firma auswählen")}}function reloadclose(){window.opener&&window.opener.location&&window.opener.location.reload();window.close();return!1}function gotoclose(a,b){if(b)window.opener.sas(b,"1");else if(window.opener&&window.opener.location)window.opener.location.href=a;window.close();return!1}
function clickinwindow(a,b){var c;a&&a.document&&(c=a.document.getElementsByName(b)[0])&&c.click();return!1}function setinwindow(a,b,c){var d;if(a&&a.document&&(d=a.document.getElementsByName(b)))for(a=0;a<d.length;a++)d[a].value=c;return!1}function copy_value(a,b){var c=find_element(a),d=find_element(b);if(c&&d)d.value=c.value}
function login_switch(){var a=find_element("session_login_name"),b="";a&&a.value.match(/([a-z_])/i)?b=a.value.match(/R\d{6}/)?"repro":a.value.match(/D\d{6}/)?"demo":"projektraum":a&&a.value.match(/\d{3}-\d{3}/i)&&(b="projektraum");switch(b){case "repro":element_form.action="https://repro.olmero.ch/session";break;case "projektraum":element_form.action="https://www.olmero.ch/pc/cs/webapp/thinkproject/index.asp",element_form.enctype="multipart/form-data",element_form.encoding="multipart/form-data",copy_value("session_login_name",
"credential_0"),copy_value("session_password","credential_1")}return!0}function check_parent(){(!window.opener||window.opener.firstsubmit)&&window.close()}function owonce(a,b,c){var d=a+b+c,e;(e=windowopen[d])&&!e.closed?e.focus():windowopen[d]=window.open(a,b,c);return!1}function cleardisable(a,b){var c=find_element(a),d=find_element(b);if(c&&d)(d.disabled=c.value!==0)?d.value="":d.focus();return!0}
function showhide(a,b,c){if(!b||b=="table-row"&&is_ie())b="block";var d;document.getElementById?d=document.getElementById(a):document.layers&&(d=document.layers[a]);d.style.display=="none"?(d.style.display=b,a=!0):(d.style.display="none",a=!1);if(c&&(c=document.getElementById(c))&&isA(c,"img"))c.src=a?"/images/minus.gif":"/images/plus.gif"}function tenderSummaryNotificationClick(a,b){var c=document.getElementsByName(a);for(i=0;i<c.length;i++)if(c[i].value==b){c[i].checked=!1;break}}
function bookingCheck(a){var b=find_element("BookingAcceptTermsAndConditions[]");return b&&b.checked?(b.form.submit(),!0):(alert(a),!1)}function bookingSearch(){var a=prompt("Buchungsnummer:");return a?sas("searchBookingNo",a):!1}function leadingZero(a){return a<10?"0"+a:a}
function updateExtensionDate(a,b,c){var b=find_element(b),d=parseInt(b.value,10);if(c=document.getElementById(c)){d>0?a+=d*86400:d=0;b.value=d;b=new Date;b.setTime(1E3*a);var a=leadingZero(b.getDate()),d=leadingZero(b.getMonth()+1),e=b.getFullYear(),f=leadingZero(b.getHours()),b=leadingZero(b.getMinutes());c.innerHTML=a+"."+d+"."+e+" "+f+":"+b}}
function customSelectShowOptions(a){document.getElementById(a+"_selected");a=document.getElementById(a+"_options");a.style.display=a.style.display=="block"?"none":"block";return!1}function customSelectChange(a,b,c,d){var e=document.getElementById(a);e.value=b;document.getElementById(a+"_selected").firstChild.data=c;document.getElementById(a+"_options").style.display="none";d&&e.form.submit();return!1}
function this_in_center(a){var b=document.layers?!0:!1;winW=b?window.innerWidth-16:document.body.offsetWidth-20;winH=b?window.innerHeight-16:document.body.offsetHeight-20;a.style.left=winW/2-50+"px";a.style.top=winH/2-50+"px"}
function create_http_request(){var a=!1;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;for(var b=["Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++)try{window.ActiveXObject&&(a=new ActiveXObject(b[c]))}catch(d){a=null}a||alert("Could not create connection object.");return a}
function submit_once(a){var b=firstsubmit,c=find_element("progress_session"),d=find_element("allowedsuffices"),e=find_element("allowedsufficestext");firstsubmit=!1;if(b)if(c){var f,g=!1;for(f=0;f<a.elements.length;f++)if(a.elements[f].type=="file"&&a.elements[f].value!==""){if(d&&!a.elements[f].value.match(RegExp(d.value,"i"))&&!confirm(e.value))return firstsubmit=!0,!1;a.action=a.action.match(/\?/)?a.action+"&progress_session="+c.value:a.action+"?progress_session="+c.value;a.submit();g=!0;if(is_ie())readCookie("LANGUAGE"),
objLoading.getPlaceholder().innerHTML="Datei wird hochgeladen...";else{objLoading.getPlaceholder().innerHTML="";var h=document.createElement("iframe");h.frameBorder="0";h.style.border="0px";h.allowTransparency="true";h.style.backgroundColor="#eee";h.height="140px";h.width="100%";h.scrolling="no";objLoading.getPlaceholder().appendChild(h);h.src="/popup/progress.html?session="+c.value}}g===!1&&a.submit()}else a.submit();return b}
function readCookie(a){a+="=";for(var b=document.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)==0)return d.substring(a.length,d.length)}return null}function progress_update(a){if(a.readyState>=3&&a.status==200)request=a.responseText,document.getElementById("progress_div").innerHTML=request}
function uncheck_list(a,b){if(b)for(var c=b.split(","),d=document.getElementsByName(a),e=0;e<c.length;e++)for(var f=0;f<d.length;f++)if(d[f].value==c[e])d[f].checked=!1}var olmero_ajax_bar=null,olmero_ajax_bar_session=null,olmero_ajax_bar_object=null;
function olmero_bar_init(a){olmero_ajax_bar_object===null&&(olmero_ajax_bar_object=document.getElementById("progress_bar_meter"));if(olmero_ajax_bar_object&&(olmero_ajax_bar_session=a,olmero_bar_deinit(),olmero_ajax_bar=create_http_request()))olmero_ajax_bar.onreadystatechange=olmero_bar_request,olmero_ajax_bar.open("GET","/popup/progress.html?session="+a+"&dataload=true",!0),olmero_ajax_bar.send(null)}
function olmero_bar_deinit(){olmero_ajax_bar!==null&&(olmero_ajax_bar.abort(),delete olmero_ajax_bar)}
function olmero_bar_request(){if(olmero_ajax_bar)try{if(olmero_ajax_bar.readyState==4&&olmero_ajax_bar.status==200){var a=olmero_ajax_bar.responseXML,b=parseInt(olmero_xml_get_value(a,"read"),10),c=parseInt(olmero_xml_get_value(a,"length"),10),d=c*b==0?1:parseInt(100/c*b,10);jQuery(olmero_ajax_bar_object).css("width",d+"%");document.getElementById("progress_text_up").innerHTML=olmero_xml_get_value(a,"text_up");document.getElementById("progress_text_down").innerHTML=olmero_xml_get_value(a,"text_down");
document.getElementById("progress_bar_label").innerHTML=d+"%";olmero_ajax_bar=null;olmero_bar_init(a.getElementsByTagName("session")[0].firstChild.nodeValue)}}catch(e){}}function olmero_xml_get_value(a,b){var c="";try{if(a){var d=a.getElementsByTagName(b);if(d[0].firstChild)c=d[0].firstChild.nodeValue}}catch(e){}return c}function newsletter_exclude(){var a=document.getElementById("exclude_obj");if(a)a.style.display=a.style.display=="block"?"none":"block"}
function fixPngIe(){var a=navigator.appVersion.split("MSIE"),a=parseFloat(a[1]);if(a>=5.5&&a<7)for(a=0;a<document.images.length;a++){var b=document.images[a],c=b.src.toUpperCase();if(c.substring(c.length-3,c.length)=="PNG"){var c=b.id?"id='"+b.id+"' ":"",d=b.className?"class='"+b.className+"' ":"",e=b.title?"title='"+b.title+"' ":"title='"+b.alt+"' ",f="display:inline-block;"+b.style.cssText;b.align=="left"&&(f="float:left;"+f);b.align=="right"&&(f="float:right;"+f);b.parentElement.href&&(f="cursor:hand;"+
f);b.outerHTML="<span "+c+d+e+' style="width:'+b.width+"px; height:"+b.height+"px;"+f+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b.src+"', sizingMethod='scale');\"></span>";a-=1}}}function add_event_listener(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}function get_offset_left(a){var b=a.offsetLeft;a.offsetParent&&(b+=get_offset_left(a.offsetParent));return b}
function get_loading_images(a){var b=document.createElement("img");if(a===!0)b.src="/images/loading_small.gif";b.alt="loading";b.border="0";return b}
function set_loading_inputs(a,b,c){for(var d=0;d<a.length;d++)if(a[d]){var e=a[d].name+"_loader";if(document.getElementById(e))b?document.getElementById(e).style.visibility="":document.getElementById(e).style.visibility="hidden";else if(b){var f=document.createElement("div");f.id=e;f.style.position="relative";f.style.display="inline";e=document.createElement("div");jQuery(e).hide();e.style.position="absolute";if(a[d].offsetWidth>0)e.style.width=a[d].offsetWidth-4+"px";if(a[d].offsetHeight>0)e.style.height=
a[d].offsetHeight-4+"px";e.style.marginLeft="2px";e.style.marginTop="2px";e.style.backgroundColor="white";jQuery(this.inner_div).fadeTo(2E3,0.5);e.style.display="inline";e.appendChild(get_loading_images(!0));f.appendChild(e);if(c===!0)f.style.visibility="hidden";a[d].parentNode.insertBefore(f,a[d])}}}function olmero_helper_pressed_key(a){var b=null;if(is_ie())b=window.event.keyCode;else if(a.keyCode)b=a.keyCode;return b}function registerNewBanner(a){olmeroBanners[olmeroBanners.length]=a}
function isA(a,b){return a&&a.tagName&&a.tagName.toUpperCase()==b.toUpperCase()}
function recalcTerminateDate(){var a=find_element("Kuendigung_Rhytmus_Monate"),b=find_element("Kuendigung_Rhytmus_Datum"),c=find_element("Kuendigungsfrist_Abo_Monate"),d=find_element("Sperrung_Abo_am"),e=find_element("gekuendigt");if(a&&b&&c&&e&&e.checked===!1&&!(e.type==="hidden"&&e.value=="1")&&a.value&&b.value&&c.value&&(globalTagHolder.periodObjMonths!=a.value||globalTagHolder.periodObjDate!=b.value||globalTagHolder.periodObjTerm!=c.value)){var e=parseInt(a.value.clearLeadingZeros(),10),f=new OlmeroDate(b.value),
g=new OlmeroDate;for(c.value>0&&g.addMonth(parseInt(c.value.clearLeadingZeros(),10));f.getDate()<g.getDate();)f.addMonth(e);if(d)d.value=f.getDate("dd.mm.yyyy");globalTagHolder.periodObjMonths=a.value;globalTagHolder.periodObjDate=b.value;globalTagHolder.periodObjTerm=c.value}}function set_language(a){language=a;jQuery(document).ready(function(){var a="de";switch(language){case "fr":a="fr-CH"}jQuery.datepicker.setDefaults(jQuery.datepicker.regional[a])})}
function T(a){value={};switch(a){case "are_you_sure":value.de="Sind Sie sicher?";value.fr="Êtes-vous sûr ?";break;case "filter_name":value.de="Name der gespeicherten Suche";value.fr="Name der gespeicherten Suche";break;default:value.de=a,value.fr=a}return value[readCookie("LANGUAGE")]}function are_you_sure(){return confirm(T("are_you_sure"))}function inArray(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return!0;return!1}
var updateStrength=function(a){a=getStrength(a);document.getElementById("passCheckStrength").className="strength"+a},getStrength=function(a){var b=0;a.match(/[a-z]/)&&a.match(/[A-Z]/)&&b++;a.match(/\d+/)&&b++;a.match(/^\d+$/)&&b>0&&b--;a.match(/.[!,@,#,$,%,^,&,*,?,_,~,-,(,)]/)&&b++;a.length>6&&b++;a.length>=12&&b++;return b};
function selectorBoxToggle(a){if(a){open_expandable_element!==null&&open_expandable_element!=this&&open_expandable_element.clickTitle();var b=jQuery("#"+a+" .selector-box-body:first"),a=jQuery("#"+a+" .selector-box-icon:first");b.is(":visible")?(b.hide(),a.attr("src","/images/plus.gif")):(jQuery(".selector-box-body:visible").hide(),b.show(),a.attr("src","/images/minus.gif"))}else jQuery(".selector-box-body:visible").hide()}function toggleWithIcon(a,b){toggleWithIconJ(jQuery(a),jQuery(b))}
function toggleWithIconJ(a,b){a.css("display")!=="none"?(a.hide(),b.attr("src","/images/plus.gif")):(a.show(),b.attr("src","/images/minus.gif"))}
function headerOfCheckboxSection(a,b){var c=jQuery("#"+b),d=jQuery("input[type=checkbox]",c),e=jQuery(".selector-box-icon",a),f=function(){d.filter(":checked").length===d.length?a.addClass("oap_bold"):a.removeClass("oap_bold")};e.click(function(a){toggleWithIconJ(c,e);a.stopPropagation()}).click();d.change(function(){f()});a.click(function(){a.hasClass("oap_bold")?d.filter(":checked").click().change():d.filter(":not(:checked)").click().change();return!1});f()}
var selectorBoxUpdateCache={},selectorBoxUpdateUpdateTimer={};function clearSelectorBoxUpdateCache(){selectorBoxUpdateCache={};selectorBoxUpdateUpdateTimer={}}function selectorBoxUpdate(a,b){var c=function(){selectorBoxUpdateCache[a].html(b(a))};selectorBoxUpdateCache[a]?(selectorBoxUpdateUpdateTimer[a]&&clearTimeout(selectorBoxUpdateUpdateTimer[a]),selectorBoxUpdateUpdateTimer[a]=setTimeout(c,50)):(selectorBoxUpdateCache[a]=jQuery("#"+a+" .selector-box-summary:first"),c())}
var checkboxGroupSummaryCache={};function clearCheckboxGroupSummaryCache(){checkboxGroupSummaryCache={}}function getTextboxSummary(a,b){var c="";checkboxGroupSummaryCache[a]||(checkboxGroupSummaryCache[a]=jQuery("#"+a+" textarea"));checkboxGroupSummaryCache[a].each(function(){c+=jQuery(this).val()});c.length==0&&b&&(c=b);return c}
function getCheckboxGroupSummary(a,b,c,d){var e="",f=!0,g;c||(c=b);checkboxGroupSummaryCache[a]||(checkboxGroupSummaryCache[a]=jQuery("#"+a+" :checkbox:not(.select-all):not(.not-in-summary)"));checkboxGroupSummaryCache[a].each(function(){g=jQuery(this);g.data("title")||g.data("title",jQuery('label[for="'+g.attr("id")+'"]',g.parent()).text());g.is(":checked")?(e+=g.data("title"),d&&(e+=d(g)),e+=", "):f=!1});if(b&&f===!0)return b;e.length==0&&(e=c+", ");return e.substring(0,e.length-2)}
function getProjectDetailSummary(a){var b="";jQuery("#"+a).find("td.subject").each(function(){var a=jQuery(this),d=a.parent().next();subject=!1;d.find("input[type=text]").each(function(){var e=jQuery(this);e.val().length>0&&(!1===subject?(b.length>0&&(b+=", "),b+=a.find("b:first").html()+": ",subject=!0):b+=" ",b+=d.find("label[for="+e.attr("id")+"]").html()+" "+e.val())})});return b.length===0?"-":b}
function getDevelopmentTypeAdditionalSummary(a){var b="",c=jQuery("#development_type__values__"+a.val()+"__min"),a=jQuery("#development_type__values__"+a.val()+"__max");c.val().length>0&&(b+=jQuery("label[for="+c.attr("id")+"]:first").html().toLowerCase()+" "+c.val()+" mio");a.val().length>0&&(b.length>0&&(b+=" "),b+=jQuery("label[for="+a.attr("id")+"]:first").html().toLowerCase()+" "+a.val()+" mio");b.length>0&&(b=" ("+b+")");return b}
function initAdvancedFilter(a){var b=jQuery("#"+a);jQuery("input[type=checkbox].jselector",b).each(function(){var a=jQuery(this),d=jQuery("input[type=checkbox]."+a.val(),b);d.length===0&&a.parents(".checkbox-box").hide();var e=function(){a[0].checked=d.filter(":checked").length===d.length};a.change(function(){var b=!1,e=":checked";a.is(":checked")&&(e=":not("+e+")",b=!0);d.filter(e).attr("checked",b).trigger("change")});d.change(e);e()})}
function getRadioGroupSummary(a){return jQuery("#"+a+" :radio:checked:first ~ label:first").text()}function getSortingSummary(a){return'<div class="sorting '+jQuery("#"+a+" option:selected:first").val()+'">'+jQuery("#"+a+" option:selected:last").text()+"</div>"}
function getRangeSummary(a,b,c,d){var e="",f,g,h=[];jQuery("#"+a+" :input").each(function(a,d){g=jQuery(d);f=g.is("select")&&g.val()?jQuery(":selected",g).text():g.val();a%2===0&&h.push("");f&&(h[h.length-1]+=a%2===0?b+" "+f:c+" "+f)});if(h.length==0)e=d;else{e="";for(a=0;a<h.length;a++)a>0&&(e+=" / "),e+=h[a].length>0?h[a]:d}return e}
function resize_my_iframe(a){var b=null,c=20,a=jQuery(a,window.parent.document);if(a.length>0){b=is_ie()?jQuery(a[0].contentWindow.document.body):jQuery("body",a[0].contentDocument);b.children().each(function(){c+=parseInt(jQuery(this).outerHeight())});if(isNaN(c)||c<100)c=100;a.height(c)}return a}function allCheckboxInit(a,b,c,d,e){allCheckboxUpdate(a,b,c,d);b.click(function(){jQuery(this).change()});e&&a.attr("checked")&&b.attr("checked",!0)}
function allCheckboxUpdate(a,b,c,d){var e=b.filter(":checked").length,f=a.attr("checked");d&&c?f=e==0||e==b.length:c?f=e==0:d&&(f=e==b.length);a.attr("checked",f)}function allCheckboxClick(a,b){var c=b.filter(":checked").length==b.length;b.attr("checked",!c).trigger("change")}
function resend_fax(a,b){jQuery.get("/element/valid_company_fax.php",{number:a},function(a){if(a>0)a='<div id="'+b+'" title="Regul&auml;r Einladen?">Achtung: Die angegebene Faxnummer ist einem bei OLMeRO registrierten Unternehmer zugewiesen. Wenn Sie auf &quot;Weiter&quot; klicken, wird dieser Unternehmer nicht per Fax sondern regul&auml;r eingeladen und erscheint in der Auflistung der bei OLMeRO registrierten Bieter.</div>',jQuery("form[name=form]").append(a),jQuery("#"+b).dialog({modal:!0,buttons:{Weiter:function(){return sas(b+
"_x","1")},Abbrechen:function(){jQuery(this).dialog("close")}},close:function(){jQuery("#".fieldname_to_submit).remove()}});else return sas(b+"_x","1")})}function jPostElement(a){a.parent(":first").hasClass("oap-ajax-post-element")||a.wrap('<div class="oap-ajax-post-element" />');return a.parents(":first")}function jPostElementLoad(a,b,c,d){var e=jQuery(a).addClass("loading");d||(d={});jPostElement(b).load(c,d,function(){e.removeClass("loading")})}init_navigator();
function tenderProjectLeaderChanged(b,c){var d,a;if(b&&(d=b.options[b.selectedIndex].value))for(var e in c)if(a=document.getElementById(c[e]))e==d?(a.disabled=!0,a.checked=!0):(a.disabled=!1,a.checked=!1)};
function OapOiObjectBrowser(a){this.jElement=jQuery(a.formJSelector);this.jCurrentTabHeader=jQuery(".olmero_button_tab_active:first");this.jObjectList=this.jElement.find(".object_list_box:first");this.allExpanded=!1;this.justFollowups=a.justFollowups;this.globalPath=a.globalPath;this.objectListPath=a.pathObjects;this.objectDetailPath=a.pathObjectDetail;this.followupPath=a.pathFollowup;this.exportPath=a.pathExport;this.assignPath=a.pathAssign;this.exportValidator=a.exportValidator;this.formName="oap_oi_object_browser";
this.currentLoadingElement=null;this.selectedObjectCount=this.pageSize=this.currentPage=0;this.jCheckboxes=null;this.displayedCount=this.recordCount=0;this.expandedObjectIds={};this.expandedObjectCount=0;this.expandDisplayedButton=jQuery("#oap_oi_button_expand_displayed");this.collapseDisplayedButton=jQuery("#oap_oi_button_collapse_displayed");this.buttonsAffectingAll=[jQuery("#oap_oi_button_selectall"),jQuery("#oap_oi_button_exportall_pdf"),jQuery("#oap_oi_button_exportall_xls"),this.expandDisplayedButton];
this.buttonsAffectingDetails=[this.collapseDisplayedButton];this.selectionButtons=[jQuery("#oap_oi_button_clearselection"),jQuery("#oap_oi_button_export_selected_pdf"),jQuery("#oap_oi_button_export_selected_xls"),jQuery("#oap_oi_button_export_selected_csv")];this.assignUserSelector=document.getElementById("oap_oi_assign_user_selector");this.exportMarked=document.getElementById("oi_select_export_marked");this.listButtonsBoxJElement=jQuery("#oap_oi_list_buttons");this.jCache={}}
OapOiObjectBrowser.prototype.init=function(){var a=this;if(oapFilters)oapFilters.onexecute(function(){a.loadObjectList({caller:oapFilters.getCurrentFilter().jButtonSearch});return!1})};OapOiObjectBrowser.prototype.startLoading=function(a){a=jQuery(a);a.length>0?(a[0].tagName&&a[0].tagName.toLowerCase()=="select"&&(a=jQuery("label[for="+a.attr("id")+"]")),this.currentLoadingElement=a.addClass("loading")):this.jCurrentTabHeader!==null?this.startLoading(this.jCurrentTabHeader):jQuery("#oap_oi_loading").show()};
OapOiObjectBrowser.prototype.stopLoading=function(){this.currentLoadingElement&&this.currentLoadingElement.length>0?(this.currentLoadingElement.removeClass("loading"),this.currentLoadingElement=null):jQuery("#oap_oi_loading").hide()};OapOiObjectBrowser.prototype.removeFollowup=function(a,b){b&&are_you_sure()&&(jQuery(a).addClass("loading"),this.loadObjectList({caller:a,object_id:b,op:"remove"},this.followupPath));return!1};
OapOiObjectBrowser.prototype.loadObjectList=function(a,b){var c,d,e=this,f=d=null;d=null;a||(a={});if(a.caller&&(d=jQuery(a.caller),d.hasClass("disabled")||d.hasClass("olmero_button_disabled")))return;if(a.pageSize)this.pageSize=a.pageSize,delete a.pageSize;this.ajaxLoadList&&(this.stopLoading(),this.ajaxLoadList.abort());this.startLoading(a.caller);d=oapFilters.getCurrentFilter().getFilterValues(!0);if(this.justFollowups===!0)d.just_followups=1;if(a){if(a.expand_all!==void 0||a.op=="assign_marked")for(c in f=
oap_ajax_get_form_values_jquery(this.jObjectList),f)d[c]=f[c];for(c in a)d[c]=a[c]}d.page_size=this.pageSize;d=oap_ajax_encode_post_body(d);if(!b)b=this.objectListPath;this.ajaxLoadList=jQuery.post(b+"?op=search&r="+Math.random(),d,function(a){e.pageChanged();e.jObjectList.html(a)},"html")};OapOiObjectBrowser.prototype.changePage=function(a,b,c){this.currentPage=a;a={};c&&(a=c);a.pgp=this.currentPage;a.pgn=this.recordCount;a.caller=b;this.loadObjectList(a)};
OapOiObjectBrowser.prototype.pageChanged=function(){this.updatejCheckboxes();this.selectedObjectCount=this.jCheckboxes.filter(":checked").length;this.detailTabs={};this.updateSelectionButtons();this.stopLoading()};OapOiObjectBrowser.prototype.updatejCheckboxes=function(){var a=this,b="overview";this.allExpanded===!0&&(b="detail");this.jCheckboxes=this.jObjectList.find("input."+b);this.jCheckboxes.click(function(){var b=jQuery(this);a.initWithOther(b);a.updateWithOther(b,!0)})};
OapOiObjectBrowser.prototype.initWithOther=function(a){var b=a.data("jOtherCheckbox"),c=null,d=this;b||(c=d.allExpanded===!0?a.parents("tr:first").prev():a.parents("tr:first").next(),b=c.find("input."+(a.hasClass("detail")?"overview":"detail")+"[value="+a.val()+"]:first"),a.data("jOtherCheckbox",b),b.data("jOtherCheckbox",a),b.click(function(){d.updateWithOther(b,!0)}))};
OapOiObjectBrowser.prototype.updateWithOther=function(a,b){var c=a.data("jOtherCheckbox");if(c&&c.length==1)c[0].checked=a[0].checked;b===!0&&this.updateView()};OapOiObjectBrowser.prototype.updateFollowup=function(a,b){var c=jQuery(a),d=null,e=this;this.startLoading(b);c.length===1&&(d=c.parents(".oap_oi_object_detail_tabs_body:first"),d.length>0&&d.load(c.attr("action"),c.serializeArray(),function(){e.stopLoading()}));return!1};
OapOiObjectBrowser.prototype.getJCache=function(a){var b=null,c=null;this.jCache[a]||(b=jQuery("#oap-oi-"+a+"-detail"),c=jQuery("#oap-oi-"+a+"-data"),this.jCache[a]={listrow_chk:c.find("input.overview:first"),detailrow:b,listrow:c,detailbox:jQuery("#oap-oi-"+a+"-detailbox")});return this.jCache[a]};
OapOiObjectBrowser.prototype.showDetail=function(a){var b=this.getJCache(a);this.initWithOther(b.listrow_chk);b.detailrow.show().addClass("expanded");b.listrow.hide();this.expandedObjectIds[a]||(this.expandedObjectIds[a]=1,this.expandedObjectCount++);this.stopLoading();this.updateButtonsAffectingDetails()};
OapOiObjectBrowser.prototype.hideDetail=function(a){var b=this.getJCache(a);b.listrow.show();b.detailrow.hide().removeClass("expanded");this.expandedObjectIds[a]&&(delete this.expandedObjectIds[a],this.expandedObjectCount--);this.updateButtonsAffectingDetails()};OapOiObjectBrowser.prototype.loadDetail=function(a){var b=this;this.startLoading(a.caller);delete a.caller;this.getJCache(a.id).detailbox.load(this.objectDetailPath,a,function(){b.stopLoading()})};
OapOiObjectBrowser.prototype.toggleDetail=function(a,b){this.getJCache(a).detailrow.is(":visible")?this.hideDetail(a):this.loadDetail({id:a,caller:b});return!1};OapOiObjectBrowser.prototype.expandDisplayed=function(a){this.changePage(this.currentPage,a,{expand_all:1,pgs:this.displayedCount})};OapOiObjectBrowser.prototype.collapseDisplayed=function(a){this.changePage(this.currentPage,a,{expand_all:0,pgs:this.displayedCount})};
OapOiObjectBrowser.prototype.registerDetailTabs=function(a,b){var c=new OapOiDetailTabs(b);this.showDetail(a);return c};OapOiObjectBrowser.prototype.setResultInfo=function(a,b,c){this.recordCount=a;this.displayedCount=b;this.jCache={};this.allExpanded=c===!0;c?(this.expandDisplayedButton.addClass("disabled"),this.collapseDisplayedButton.removeClass("disabled")):(this.expandDisplayedButton.removeClass("disabled"),this.collapseDisplayedButton.addClass("disabled"));this.updateButtonsAffectingAll();this.pageChanged()};
OapOiObjectBrowser.prototype.selectAll=function(a){var b=this,c=":checked";a!==!0&&(c=":not("+c+")");this.jCheckboxes.filter(c).each(function(){var c=jQuery(this);b.initWithOther(c);c[0].checked=!a;b.updateWithOther(c,!1)});this.updateView(!0)};
OapOiObjectBrowser.prototype.updateView=function(a){var b=this;a?(this.selectedObjectCount=this.jCheckboxes.filter(":checked").length,this.updateSelectionButtons()):(this.updateViewTimer&&clearTimeout(this.updateViewTimer),this.updateViewTimer=setTimeout(function(){b.updateView(!0)},100))};
OapOiObjectBrowser.prototype.updateButtonsAffectingAll=function(){this.recordCount>0?this.listButtonsBoxJElement.show():this.listButtonsBoxJElement.hide();var a;for(a=0;a<this.buttonsAffectingAll.length;a++)this.buttonsAffectingAll[a]&&(this.recordCount>0?this.buttonsAffectingAll[a].removeClass("olmero_button_disabled"):this.buttonsAffectingAll[a].addClass("olmero_button_disabled"))};
OapOiObjectBrowser.prototype.updateButtonsAffectingDetails=function(){var a;for(a=0;a<this.buttonsAffectingDetails.length;a++)this.buttonsAffectingDetails[a]&&(this.expandedObjectCount>0?this.buttonsAffectingDetails[a].removeClass("olmero_button_disabled"):this.buttonsAffectingDetails[a].addClass("olmero_button_disabled"));this.displayedCount>0&&this.expandedObjectCount<this.displayedCount?this.expandDisplayedButton.removeClass("olmero_button_disabled"):this.expandDisplayedButton.addClass("olmero_button_disabled")};
OapOiObjectBrowser.prototype.updateSelectionButtons=function(){var a;this.assignUserSelector.disabled=this.selectedObjectCount<=0;this.exportMarked.disabled=this.selectedObjectCount<=0;for(a=0;a<this.selectionButtons.length;a++)this.selectionButtons[a]&&(this.selectedObjectCount>0?this.selectionButtons[a].removeClass("olmero_button_disabled"):this.selectionButtons[a].addClass("olmero_button_disabled"))};
OapOiObjectBrowser.prototype.assignMarkedToSelectedUser=function(){var a=this.assignUserSelector[this.assignUserSelector.selectedIndex].value;this.selectedObjectCount>0&&a&&this.loadObjectList({caller:this.assignUserSelector,tag_id:a,op:"assign_marked"},this.assignPath);this.assignUserSelector.selectedIndex=0};OapOiObjectBrowser.prototype.removeNote=function(a,b,c){are_you_sure()&&this.loadDetail({id:a,remove_note_id:b,caller:c})};
OapOiObjectBrowser.prototype.onExportAll=function(a){a=jQuery(a);if(this.exportValidator.validate(this.recordCount,function(a){(new Olmero.UI.Alert("",a)).show()}))switch(a.find(":selected").val()){case "PDF":this.exportSheets(!1);break;case "CSV":this.exportCsv(!1);break;case "Excel":this.exportList(!1)}a.val("")};
OapOiObjectBrowser.prototype.onExportSelected=function(a){a=jQuery(a);if(this.exportValidator.validate(this.selectedObjectCount,function(a){(new Olmero.UI.Alert("",a)).show()}))switch(a.find(":selected").val()){case "PDF":this.exportSheets(!0);break;case "CSV":this.exportCsv(!0);break;case "Excel":this.exportList(!0)}a.val("")};
OapOiObjectBrowser.prototype.exportList=function(a){if(!(a&&this.selectedObjectCount===0))document.forms[this.formName].export_selected.value=a?1:0,document.forms[this.formName].export_type.value="xls",this.submitForm(this.exportPath)};OapOiObjectBrowser.prototype.exportCsv=function(a){if(!(a&&this.selectedObjectCount===0))document.forms[this.formName].export_selected.value=a?1:0,document.forms[this.formName].export_type.value="csv",this.submitForm(this.exportPath)};
OapOiObjectBrowser.prototype.exportSheets=function(a){if(!(a&&this.selectedObjectCount===0))document.forms[this.formName].export_selected.value=a?1:0,document.forms[this.formName].export_type.value="pdf",this.submitForm(this.exportPath)};
OapOiObjectBrowser.prototype.submitForm=function(a,b){var c,d;if(a)c=document.forms[this.formName].action,document.forms[this.formName].action=a;if(b)d=document.forms[this.formName].target,document.forms[this.formName].target=b;document.forms[this.formName].submit();if(a)document.forms[this.formName].action=c;if(b)document.forms[this.formName].target=d};
function OapOiDetailTabs(b){var a=null;this.tabs={};for(a in b)this.tabs[a]={jLabel:jQuery("#"+b[a].labelID),jBody:jQuery("#"+b[a].bodyID)},this.tabs[a].jIFrames=jQuery("iframe",this.tabs[a].jBody)}
OapOiDetailTabs.prototype.setTab=function(b){for(var a in this.tabs)a==b?(this.tabs[a].jBody.show(),this.tabs[a].jLabel.addClass("front").removeClass("back"),b=="userinfo"&&this.tabs[a].jIFrames.length>0&&this.tabs[a].jIFrames.attr("longdesc")&&(this.tabs[a].jIFrames.attr("src",this.tabs[a].jIFrames.attr("longdesc")),this.tabs[a].jIFrames.removeAttr("longdesc"))):(this.tabs[a].jBody.hide(),this.tabs[a].jLabel.addClass("back").removeClass("front"))};
function OapOiSelectorRange(a,b){this.name=a;this.expandable=!0;this.minElementId=this.name+"__min";this.minSuffix=this.minPrefix="";this.maxElementId=this.name+"__max";this.maxSuffix=this.maxPrefix="";this.summaryElementId=this.name+"__summary";this.emptySummary="";var c;if(b)for(c in b)this[c]!==void 0&&(this[c]=b[c]);this.minElement=document.getElementById(this.minElementId);this.maxElement=document.getElementById(this.maxElementId);this.summaryElement=document.getElementById(this.summaryElementId);
var d=this;if(this.minElement)this.minElement.onchange=function(){d.updateSummary()};if(this.maxElement)this.maxElement.onchange=function(){d.updateSummary()};this.expandable&&(new olmeroXElements.expandableElement({name:this.name})).init();this.updateSummary()}OapOiSelectorRange.prototype.updateSummary=function(){if(this.summaryElement)this.summaryElement.innerHTML=this.getSummaryText()};
OapOiSelectorRange.prototype.getSummaryText=function(){var a="",b=this.getElementText(this.minElement),c=this.getElementValue(this.minElement),d=this.getElementText(this.maxElement),e=this.getElementValue(this.maxElement);if(b!==null&&b==d)return b;c!==null&&c.length>0&&(a=this.minPrefix+" "+b+" "+this.minSuffix);e!==null&&e.length>0&&(a.length>0&&(a+=" "),a+=this.maxPrefix+" "+d+" "+this.maxSuffix);if(a.length===0)a=this.emptySummary;return a};
OapOiSelectorRange.prototype.getElementValue=function(a){return a?a.value:null};OapOiSelectorRange.prototype.getElementText=function(a){return a?isA(a,"select")?a.options[a.selectedIndex].innerHTML:a.value:null};
function oiSelectAge_Choosen(a,c){var b=null;jQuery("#"+a+"_period_by_select").is(":checked")?b=c+", "+jQuery("#"+a+"_max").find("option:selected").text():jQuery("#"+a+"_period_by_latest_month").is(":checked")?b=jQuery("label[for="+a+"_period_by_latest_month]").html():jQuery("#"+a+"_period_by_calendar").is(":checked")?b=jQuery("#"+a+"_date_min").val()+" - "+jQuery("#"+a+"_date_max").val():jQuery("#"+a+"_period_by_all").is(":checked")&&(b=jQuery("label[for="+a+"_period_by_all]").html());return b}
function oiSelectAge_ChangeToByCalendar(a){jQuery("#"+a).attr("checked","checked")};
function OapOiMerge(a){this.path=a;var b=this;jQuery("#merge_add_operation").change(function(){b.addOperation(jQuery("#merge_add_operation").val());jQuery(this).val("")})}OapOiMerge.prototype.addOperation=function(a){jQuery.post(this.path,{add_operation:a},function(a){jQuery("#merge_operation_container").append(a);jQuery("#merge_add_operation").val(0)})};OapOiMerge.prototype.deleteOperation=function(a){jQuery("#op_"+a).remove();jQuery.post(this.path,{delete_operation:a},function(){})};
OapOiMerge.prototype.moveOperation=function(a,b){move=!0;switch(b){case "up":jQuery("#op_"+a).prev().html()!=null?jQuery("#op_"+a).insertBefore(jQuery("#op_"+a).prev()):(alert("Element ist bereits zuobert!"),move=!1);break;case "down":jQuery("#op_"+a).next().html()!=null?jQuery("#op_"+a).insertAfter(jQuery("#op_"+a).next()):(alert("Element ist bereits zuunterst!"),move=!1)}move&&jQuery.post(this.path,{move_operation:a,direction:b},null)};
OapOiMerge.prototype.removeTemplate=function(a){jQuery.post(this.path,{delete_template:a},function(){jQuery("#mt_"+a).remove()})};OapOiMerge.prototype.selectWhere=function(a,b){var c=jQuery("#oi_where_"+a+"_"+b),e,d;c.attr("checked")?(e="none",d="/images/plus.gif",c.attr("checked",!1)):(e="block",d="/images/minus.gif",c.attr("checked",!0));jQuery("#oi_where_"+a+b+"_details").css("display",e);jQuery("#oi_where_"+a+"_"+b+"_icon").attr("src",d)};
OapOiMerge.prototype.initFilteredDropdown=function(a,b,c){var e={},d=null;jQuery("option",b).each(function(){var a=jQuery(this);e[a.attr("value")]=a;a.is(":selected")&&(d=a.attr("value"))});a.change(function(){var a=c[jQuery(this).val()],g=null,f=null,h=null;b.html("");if(a)for(g in a)if(a[g]&&(f=e[a[g]]))b.append(f),d==f.val()&&(h=f.val());h&&b.val(h)});if(d!==null)for(masterValue in c)c[masterValue]&&c[masterValue][d]&&jQuery("option[value="+masterValue+"]",a).attr("selected",!0);a.trigger("change")};
function oi_export_rows(a){var b=this;this.rows=[];this.rows_selected=[];this.id=0;this.name="unbenannt";this.dropdown_opened=!1;this.texts=a.texts;this.startSaveItemsTimer=this.loadingElement=null;this.sequenceEditor=a.sequenceEditor;this.sequenceEditor.changed(function(){b.startSaveItems()});this.ajaxPosts={};this.dlgTemplateName=jQuery("#dlg_template_name");this.ajaxPath=a.ajaxPath;this.dlgTemplateName&&(a={},a[this.texts.save]=function(){jQuery(this).dialog("close")},a[this.texts.cancel]=function(){jQuery(this).dialog("close")},
this.dlgTemplateName.dialog({bgiframe:!0,autoOpen:!1,height:100,modal:!0,buttons:a}))}oi_export_rows.prototype.postPath=function(a,b,c){var d=this;this.startLoading();this.ajaxPosts&&this.ajaxPosts[a]&&this.ajaxPosts[a].abort();b||(b={});if(a)b.method=a;this.ajaxPosts[a]=jQuery.post(this.ajaxPath,b,function(b){d.ajaxPosts[a]=null;if(b.error>0)return d.endLoading(),alert("ERROR "+b.error_message),!1;d.endLoading();return c(b.data)},"json")};
oi_export_rows.prototype.openDialog_TemplateName=function(a,b,c){var d=this;this.dlgTemplateName&&(jQuery("#dlg_template_name_value").val(a),jQuery("#dlg_template_name_id").val(b),a=this.dlgTemplateName.dialog("option","buttons"),a[this.texts.save]=function(){d.editName_Do()&&jQuery(this).dialog("close")},jQuery(this.dlgTemplateName).dialog("option","buttons",a).dialog("option","title",c).dialog("open"))};
oi_export_rows.prototype.editName_Do=function(){var a={},b=this,c="save-name";a.name=jQuery("#dlg_template_name_value").val();a.id=parseInt(jQuery("#dlg_template_name_id").val(),10);a.id<=0&&(c="save");this.postPath(c,a,function(c){b.startLoading();b.updateListData(c);b.endLoading();a.id<=0?b.load_record():b.updateView()});return!0};
oi_export_rows.prototype.editName=function(){jQuery("#template_list").length==1&&this.openDialog_TemplateName(jQuery("#template_list").val(),this.getSelectedTemplateId(),this.texts.oi_export_template_rename)};oi_export_rows.prototype.addTemplate=function(){jQuery("#template_list").length==1&&this.openDialog_TemplateName("",-1,this.texts.oi_export_template_new)};
oi_export_rows.prototype.deleteTemplate=function(){var a=this;jQuery("#template_list").length==1&&confirm(this.texts.oi_export_template_delete_confirm)&&this.postPath("delete",{id:a.getSelectedTemplateId()},function(b){a.updateListData(b);a.load_record()})};oi_export_rows.prototype.updateListData=function(a){jQuery("#template_list").html(a)};
oi_export_rows.prototype.getSelectedTemplateId=function(){var a=jQuery("#template_list option:selected").attr("id");return a?a.replace(/dropdown_item_/g,""):-1};oi_export_rows.prototype.startLoading=function(){jQuery("#row_drag_and_drop_title").addClass("loading")};oi_export_rows.prototype.endLoading=function(){jQuery("#row_drag_and_drop_title").removeClass("loading")};oi_export_rows.prototype.reinitLists=function(){};oi_export_rows.prototype.initList=function(){};
oi_export_rows.prototype.init=function(a){this.rows=a;this.load_record()};oi_export_rows.prototype.get_item_by_id=function(a){for(i in this.rows){var b=this.rows[i];if(b.id==a)return b}};oi_export_rows.prototype.create_item=function(){};oi_export_rows.prototype.startSaveItems=function(){var a=this;this.startSaveItemsTimer&&clearTimeout(this.startSaveItemsTimer);this.startSaveItemsTimer=setTimeout(function(){a.saveItems()},500)};
oi_export_rows.prototype.saveItems=function(a){var b=this.sequenceEditor.getSortedElementWithLabels();jQuery("#fieldset_info_text").text();var c=jQuery(a),d=a="";for(elementId in b)b[elementId]&&(a.length>0&&(a+=",",d+=","),a+=elementId,d+=b[elementId]);if(!(a.length<1)){var e=this;c.addClass("loading");this.postPath("save",{order:a,labels:d,id:e.getSelectedTemplateId()},function(a){e.startLoading();e.updateListData(a);e.endLoading();e.updateView();c.removeClass("loading")})}};
oi_export_rows.prototype.load_record=function(a){var b=this;a||(a=this.getSelectedTemplateId());a>0?this.postPath(null,{id:a},function(a){b.reinitLists(!1);b.setLoadedData(a)},"json"):b.updateView()};
oi_export_rows.prototype.setLoadedData=function(a){var b=null,b=null;this.startLoading();this.sequenceEditor&&this.sequenceEditor.allRemove(!0);if(a){for(b in a.custom_labels)a.custom_labels[b]&&this.sequenceEditor.setElementCustomLabel(b,a.custom_labels[b]);for(b=0;b<a.rows.length;b++)this.sequenceEditor.selectElement(a.rows[b],!0,!0)}this.endLoading();this.updateView()};oi_export_rows.prototype.dropdown_select=function(){this.load_record(this.getSelectedTemplateId())};
oi_export_rows.prototype.updateView=function(){this.startLoading();this.getSelectedTemplateId()>0?(jQuery("tr.nothing_selected").hide(),jQuery("tr.field_editor_row").show(),this.update_fieldset_info_text(),this.update_rowset_height()):(jQuery("tr.nothing_selected").show(),jQuery("tr.field_editor_row").hide());this.sequenceEditor.redraw();this.endLoading()};oi_export_rows.prototype.update_rowset_height=function(){};
oi_export_rows.prototype.update_fieldset_info_text=function(){this.getSelectedTemplateId()&&jQuery("#fieldset_info_text").html(this.name)};
function kapCheckUserName(){}function kapCheckUserNameByField(){};
function OapFilter(a){var b=this;if(!a.defaultAjaxArgs)a.defaultAjaxArgs={};this.defaultAjaxArgs=a.defaultAjaxArgs;this.parentOapFilters=null;this.filterId=a.filterId;this.filterName=a.filterName;this.jMe=jQuery("#"+a.domId);this.jHeaderOpen=jQuery(".filter-header-open",this.jMe);this.jHeaderOpen.click(function(a){b.close(jQuery(".filter-name",b.jHeaderOpen),!0);a.stopPropagation();return!1});this.jHeaderClosed=jQuery(".filter-header-closed",this.jMe);this.jHeaderClosed.click(function(a){b.open(jQuery(".filter-name",
b.jHeaderClosed));a.stopPropagation();return!1});this.jContainer=jQuery(".filter-container",this.jMe);this.jButtonSearch=jQuery(".button-search-filter",this.jMe);this.jButtonSearch.click(function(a){b.execute(jQuery(this));a.stopPropagation();return!1});jQuery(".button-reset-filter",this.jMe).click(function(a){b.reset(jQuery(this));a.stopPropagation();return!1});jQuery(".button-save-filter",this.jMe).click(function(a){b.save(jQuery(this));a.stopPropagation();return!1});jQuery(".button-rename-filter",
this.jMe).click(function(a){b.rename(jQuery(this));a.stopPropagation();return!1});jQuery(".button-remove-filter",this.jMe).click(function(a){b.remove(jQuery(this));a.stopPropagation();return!1});jQuery(".button-move-filter-up",this.jMe).click(function(a){b.move(jQuery(this),!0);a.stopPropagation();return!1});jQuery(".button-move-filter-down",this.jMe).click(function(a){b.move(jQuery(this),!1);a.stopPropagation();return!1})}
OapFilter.prototype.execute=function(a){var b=this;this.jContainer.is(":hidden")?this.open(a,function(){b.parentOapFilters.executeFilter(b,a)}):this.parentOapFilters.executeFilter(this,a)};OapFilter.prototype.close=function(a,b){this.jHeaderClosed.show();this.jHeaderOpen.hide();this.jContainer.hide();b!==!0&&this.jContainer.html("")};OapFilter.prototype.move=function(a,b){this.parentOapFilters.move(this,a,b)};
OapFilter.prototype.open=function(a,b){var c=this,d=function(){c.jContainer.show();c.jHeaderClosed.hide();c.jHeaderOpen.show();c.parentOapFilters.closeFilters(c.filterId);b&&b()};c.jContainer.html().length>0?d():this.reloadFilters(a,d)};OapFilter.prototype.reloadFilters=function(a,b){var c=this.defaultAjaxArgs;c||(c={});c.filter_model_id=this.filterId;a.addClass("loading");this.jContainer.load(this.parentOapFilters.pathFilter,c,function(){a.removeClass("loading");b&&b()})};
OapFilter.prototype.save=function(a){this.parentOapFilters.saveFilter(this,a)};OapFilter.prototype.rename=function(a){this.parentOapFilters.saveFilter(this,a,this.filterId)};OapFilter.prototype.reset=function(a){are_you_sure()&&this.reloadFilters(a,function(){try{oap_oi.selectAll(!0)}catch(a){if(!(a instanceof ReferenceError))throw a;oapPl.selectClear()}})};OapFilter.prototype.remove=function(a){are_you_sure()&&this.parentOapFilters.removeFilter(this,a)};
OapFilter.prototype.getFilterValues=function(a){var b={filter_model_id:this.filterId},c=a===!0?"":"filtervalues__";jQuery("input[type=hidden], input[type=text], input[type=radio]:checked, input[type=checkbox]:checked, textarea, select",this.jMe).each(function(){var a=jQuery(this);b[c+a.attr("name")]=a.val()});return b};
function OapFilters(a){var b=this;this.filters={};this.jMe=jQuery("#"+a.domId);this.jMeForm=this.jMe.closest("form");this.onExecuteCallback=null;this.jNewFilterName=jQuery("#"+a.domId+"_new_filter_name");this.jFilterId=jQuery("input[name=filter_model_id]:first",this.jMe);this.labelSave="OK";this.labelCancel="Cancel";this.currentFilterId=a.currentFilterId;this.pathFilter=a.pathFilter;this.jSaveDialog=jQuery(".oap-filters-save-dialog:first");this.jSaveDialog.dialog({bgiframe:!0,autoOpen:!1,modal:!0});
this.jSaveDialog.find("input[type=text]:visible").keydown(function(a){var d=null;if(a&&a.keyCode===13&&(d=b.jSaveDialog.dialog("option","buttons"))&&d[b.labelSave])d[b.labelSave]()})}OapFilters.prototype.addFilter=function(a){a.parentOapFilters=this;this.filters[a.filterId]=a};OapFilters.prototype.onexecute=function(a){this.onExecuteCallback=a};OapFilters.prototype.getCurrentFilter=function(){return this.currentFilterId&&this.filters[this.currentFilterId]?this.filters[this.currentFilterId]:null};
OapFilters.prototype.executeFilter=function(a,b){this.currentFilterId=a.filterId;this.jFilterId.val(this.currentFilterId);if(this.onExecuteCallback)this.onExecuteCallback(this,b);else b.addClass("loading"),this.jMeForm.submit()};
OapFilters.prototype.saveFilter=function(a,b,c){var d=this,f={},g="";f[this.labelSave]=function(){var e={};if(d.jNewFilterName.val().length===0)d.jNewFilterName.addClass("invalid");else{e=a.getFilterValues();e.filter_name=d.jNewFilterName.val();e.filter_model_id=null;if(c)e.filter_model_id=c;d.updateFilters("save_filter",e,b);d.jSaveDialog.dialog("close")}};f[this.labelCancel]=function(){d.jSaveDialog.dialog("close")};if(c)g=this.filters[c].filterName;this.jNewFilterName.val(g);this.jSaveDialog.dialog("option",
"buttons",f).dialog("option","title",b.attr("title")).dialog("open")};OapFilters.prototype.removeFilter=function(a,b){this.updateFilters("remove_filter",{filter_model_id:a.filterId,filter_name:a.filterName},b)};OapFilters.prototype.move=function(a,b,c){this.updateFilters("move_filter",{filter_model_id:a.filterId,filter_name:a.filterName,move_up:c===!0?1:0},b)};
OapFilters.prototype.updateFilters=function(a,b,c){b||(b={});b.op=a;c&&c.addClass("loading");jPostElement(this.jMe).load(this.pathFilter,b,function(){c&&c.removeClass("loading")})};OapFilters.prototype.closeFilters=function(a){var b=null;for(b in this.filters)b!=a&&this.filters[b]&&this.filters[b].close()};OapFilters.prototype.init=function(){};
function OapAjaxList(a){var b=this;this.jElement=a;this.jForm=a.find("form:first").submit(function(a){b.search(a.originalEvent?a.originalEvent.explicitOriginalTarget:null);a.stopPropagation();return!1});this.jListContainer=a.find(".ajax-list-container:first")}OapAjaxList.cache={};OapAjaxList.get=function(a){return OapAjaxList.cache[a]?OapAjaxList.cache[a]:null};OapAjaxList.createInstance=function(a){OapAjaxList.cache[a]=new OapAjaxList(jQuery("#"+a));return OapAjaxList.get(a)};
OapAjaxList.prototype.reset=function(){jQuery("input[type=text]").val("")};OapAjaxList.prototype.reload=function(){this.jForm.submit()};OapAjaxList.prototype.abortCurrentSearch=function(a){if(this.currentAjaxRequest)this.currentAjaxRequest.abort(),this.currentAjaxRequest=null,jQuery(a).removeClass("loading")};
OapAjaxList.prototype.search=function(a){var b=this,c=jQuery(a).addClass("loading");this.abortCurrentSearch();this.currentAjaxRequest=this.jListContainer.load(this.jForm.attr("action"),this.jForm.serializeArray(),function(){b.currentAjaxRequest=null;c.removeClass("loading")})};
var OapDirectoryInstance=null;function OapDirectory(){this.loadedCompanyData=null;this.jButtonMarked=jQuery("#regular-remove_marked").click(function(){return!jQuery(this).hasClass("disabled")});this.jCheckboxes=jQuery();this.updateView()}OapDirectory.get=function(){OapDirectoryInstance===null&&(OapDirectoryInstance=new OapDirectory);return OapDirectoryInstance};
OapDirectory.prototype.setLoadedCompanyData=function(c){var a=this;this.loadedCompanyData=c;this.jCheckboxes=jQuery("input[type=checkbox][name^=selected__]").click(function(){a.updateView()});this.updateView()};OapDirectory.prototype.updateView=function(){this.jCheckboxes.filter(":checked").length>0?this.jButtonMarked.removeClass("disabled"):this.jButtonMarked.addClass("disabled")};
OapDirectory.prototype.action=function(c,a,d,e){var f=jQuery(c).addClass("loading");this.jCheckboxes.filter(":checked").each(function(){var a=jQuery(this);d[a.attr("name")]=a.val()});e===!0?jQuery.get(a,d,function(a){f.removeClass("loading");f.append(a)}):jPostElement(f).load(a,d,function(){f.removeClass("loading")})};
OapDirectory.prototype.copyAddress=function(){var c=window.opener,a=null,d=!1,e="",f=this;if(c&&c.document){if(c.document.servicesform)a=c.document.servicesform,d=!0;else if(c.document.addressform)a=c.document.servicesform;jQuery("input[name^=selected__]:checked").each(function(){var b=jQuery(this).val();if(d===!0)e!==""&&(e+=","),e+=b;else if(b=f.loadedCompanyData[b])a["KontaktFirma_"+addressid].value=b.Firma,a["KontaktName_"+addressid].value=b.Name,a["KontaktStrasse_"+addressid].value=b.Strasse,
a["KontaktPLZ_"+addressid].value=b.PLZ,a["KontaktOrt_"+addressid].value=b.Ort,a["KontaktTelefon_"+addressid].value=b.Tel,a["KontaktFax_"+addressid].value=b.Fax,a["KontaktEmail_"+addressid].value=b.Email,window.close()});d===!0&&e.length>0?(a.Branchenbuch_Auswahl.value=e,a.submit(),window.close()):alert("Bitte eine Firma auswählen")}else window.close()};
function OapAdminKap(a,b){this.jElement=jQuery("#"+a);this.jLoader=this.jElement.find(".kap-loading-status:first");this.jElement.data("oapAdminKap",this);this.pathSynch=b.pathSynch;this.jPost=null}OapAdminKap.prototype.l=function(a){a===!0&&this.jLoader.is(":visible")?this.jLoader.slideUp():!a&&!this.jLoader.is(":visible")&&this.jLoader.slideDown()};
OapAdminKap.prototype.synch=function(a,b){var c=this;b||(b={});if(this.pathSynch){if(null!==this.jPost)this.jPost.abort(),this.jPost=null;this.l();b.op=a;this.jElement.load(this.pathSynch,b,function(){c.l(!0)})}};OapAdminKap.prototype.synchAccount=function(){this.synch("synch")};OapAdminKap.prototype.unlinkAccount=function(){this.synch("unlink",{keep:this.jElement.find("input[name=keep]:checked").length})};
OapAdminKap.prototype.linkAccount=function(){var a=this.jElement.find("input[name=kap_account_name]");a.val().length==0?a.addClass("invalid"):(a.removeClass("invalid"),this.synch("link",{kap_account_name:a.val(),new_account:this.jElement.find("input[name=new_account]:checked").val()}))};
function OapPlBrowser(a){var b=this;this.listBox=jQuery("#"+a.listBoxId);this.jElementForm=this.listBox.closest("form");this.jElementForm.submit(function(){oapFilters.getCurrentFilter().jButtonSearch.addClass("loading")});this.listUrl=a.listUrl;this.detailUrl=a.detailUrl;this.exportUrlInquiriesInfos=a.exportUrlInquiriesInfos;this.exportUrlProjectInfos=a.exportUrlProjectInfos;this.pageSizeJElement=jQuery('input[name="'+a.argNamePageSize+'"]',this.jElementForm);this.argNameCurrentPage=a.argNameCurrentPage;
this.argNameRecordCount=a.argNameRecordCount;this.changeSelectedJElement=this.selectedProjectIds=this.dataCheckboxesJ=this.allCheckboxesJ=null;this.currentPage=0;this.btnMarkAllJElement=jQuery("#btn_select_all");this.btnClearSelectionJElement=jQuery("#btn_clear_selection");this.jElementSortBy=jQuery("#"+a.fieldNameSortBy);this.exportValidator=a.exportValidator;this.jExpandAll=jQuery(a.jSelectorExpandAllField);this.btnExpandAll=jQuery("#btn_expand_all").click(function(){b.expandAll(jQuery(this),!0);
return!1});this.btnColapseAll=jQuery("#btn_colapse_all").click(function(){b.expandAll(jQuery(this),!1);return!1});this.chooserExportMarked=jQuery("#chooser_export_marked").change(function(){b.exportSelected(jQuery(this));return!1});this.chooserExportAll=jQuery("#chooser_export_all").change(function(){b.exportAll(jQuery(this));return!1});this.jElementSortByDirection=jQuery("#"+a.fieldNameSortDirection);this.btnMarkAllJElement.click(function(){b.selectAll();return!1});this.btnClearSelectionJElement.click(function(){b.selectClear();
return!1});this.count=a.count;this.reinit()}OapPlBrowser.prototype.reinit=function(){this.changeSelectedJElement=this.selectedProjectIds=this.dataCheckboxesJ=this.allCheckboxesJ=null;this.initFields();this.checkboxStateChanged()};
OapPlBrowser.prototype.initFields=function(){var a=this;this.changeSelectedJElement=jQuery("#change_state_of_selection");this.changeSelectedJElement.unbind("change");this.changeSelectedJElement.change(function(){a.changeSelectedProjectToState()});this.changeSelectedJElement.val(-1);this.allCheckboxesJ=jQuery("input[type=checkbox].selector");this.dataCheckboxesJ=jQuery("input[type=checkbox].selector:not(.detail)");this.allCheckboxesJ.unbind("change");this.allCheckboxesJ.change(function(){var b=jQuery(this),
c=null;if(this.oapOtherCheckbox==null)this.oapOtherCheckbox=c=b.hasClass("detail")?jQuery("#selected_project__"+b.attr("value")):jQuery("#selected_project__"+b.attr("value")+"_detail");b.is(":checked")?this.oapOtherCheckbox.attr("checked",!0):this.oapOtherCheckbox.removeAttr("checked");a.checkboxStateChanged()})};
OapPlBrowser.prototype.detailTabChanged=function(a,b,c){if(c==b)try{jIFrame=resize_my_iframe("#project_notes_"+a),jIFrame.attr("longdesc")&&(jIFrame.attr("src",jIFrame.attr("longdesc")),jIFrame.removeAttr("longdesc"))}catch(d){console.log(d)}};OapPlBrowser.prototype.expandAll=function(a,b){a.hasClass("disabled")||(this.jExpandAll.val(b===!0?1:0),this.showPage(this.currentPage,a))};
OapPlBrowser.prototype.exportInquiries=function(a){if(!(a&&this.selectedProjectIds.length===0)){var b=this.jElementForm.attr("id");document.forms[b].export_selected.value=a?1:0;this.submitForm(this.exportUrlInquiriesInfos)}};OapPlBrowser.prototype.exportProjectInfos=function(a,b){if(!(a&&this.selectedProjectIds.length===0)){var c=this.jElementForm.attr("id");document.forms[c].export_selected.value=a?1:0;document.forms[c].format.value=b;this.submitForm(this.exportUrlProjectInfos)}};
OapPlBrowser.prototype.submitForm=function(a){var b=this.jElementForm.attr("id"),c=document.forms[b].action;document.forms[b].action=a;document.forms[b].submit();document.forms[b].action=c};OapPlBrowser.prototype.exportAll=function(a){if(this.exportValidator.validate(this.count,function(a){(new Olmero.UI.Alert("",a)).show()}))switch(a.val()){case "1":this.exportInquiries(!1);break;case "2":this.exportProjectInfos(!1,"csv");break;case "3":this.exportProjectInfos(!1,"pdf")}a.val(0)};
OapPlBrowser.prototype.exportSelected=function(a){if(this.exportValidator.validate(this.selectedProjectIds.length,function(a){(new Olmero.UI.Alert("",a)).show()}))switch(a.val()){case "1":this.exportInquiries(!0);break;case "2":this.exportProjectInfos(!0,"csv");break;case "3":this.exportProjectInfos(!0,"pdf")}a.val(0)};
OapPlBrowser.prototype.changeSelectedProjectToState=function(){var a=null,b={edit_status:1};b[this.argNameCurrentPage]=this.currentPage;if(this.changeSelectedJElement!==null&&this.selectedProjectIds.length>0&&(a=this.changeSelectedJElement.val(),a>-1&&are_you_sure())){b.state_id=a;for(i=0;i<this.selectedProjectIds.length;i++)b["ids__"+i]=this.selectedProjectIds[i];this.changeSelectedJElement.parent().addClass("loading");this.ajaxList(b)}};
OapPlBrowser.prototype.ajaxList=function(a,b){var c=this;b||(b=function(){});var d=jQuery("form").serializeArray();for(x=0;x<d.length;x++)if(d[x])name=d[x].name,value=d[x].value,name&&!a[name]&&(a[name]=value);this.listBox.load(this.listUrl+"?rand="+Math.random(),a,function(){c.reinit();c.changeSelectedJElement.parent().removeClass("loading");b()})};
OapPlBrowser.prototype.updateView=function(){this.selectedProjectIds.length===0?(this.changeSelectedJElement!==null&&this.changeSelectedJElement.attr("disabled",!0),this.chooserExportMarked.attr("disabled",!0),this.btnClearSelectionJElement.addClass("disabled")):(this.changeSelectedJElement!==null&&this.changeSelectedJElement.removeAttr("disabled"),this.btnClearSelectionJElement.removeClass("disabled"),this.chooserExportMarked.removeAttr("disabled"));this.jExpandAll.val()==1?(this.btnExpandAll.addClass("disabled"),
this.btnColapseAll.removeClass("disabled")):(this.btnColapseAll.addClass("disabled"),this.btnExpandAll.removeClass("disabled"));this.count>0?this.chooserExportAll.removeAttr("disabled"):this.chooserExportAll.attr("disabled","disabled")};OapPlBrowser.prototype.checkboxStateChanged=function(){var a=this;this.selectedProjectIds=[];this.dataCheckboxesJ.filter(":checked").each(function(){a.selectedProjectIds[a.selectedProjectIds.length]=this.value});this.updateView()};
OapPlBrowser.prototype.selectAll=function(){this.allCheckboxesJ!==null&&(this.allCheckboxesJ.attr("checked",!0),this.checkboxStateChanged())};OapPlBrowser.prototype.selectClear=function(){this.allCheckboxesJ!==null&&(this.allCheckboxesJ.removeAttr("checked"),this.checkboxStateChanged())};
OapPlBrowser.prototype.showPage=function(a,b,c,d){var e=this,f=jQuery(b);f.addClass("loading");c&&this.pageSizeJElement.val(c);b={};b[this.argNameCurrentPage]=a;b[this.argNameRecordCount]=this.count;b[this.jExpandAll.attr("name")]=this.jExpandAll.val();this.ajaxList(b,function(){e.currentPage=a;f.removeClass("loading");d&&d()})};
OapPlBrowser.prototype.toggleDetail=function(a,b){var c,d=jQuery("#oap-pl-"+a.id+"-data"),e=jQuery("#oap-pl-"+a.id+"-detail"),f=jQuery(b);e.is(":visible")?(e.hide(),d.show()):(f.addClass("loading"),c=jQuery("#oap-pl-"+a.id+"-detailbox"),c.load(this.detailUrl,{id:a.id},function(){d.hide();e.show();f.removeClass("loading")}))};
OapPlBrowser.prototype.checkboxChanged=function(a,b){var c=null,d=null;b?(c=jQuery("#"+a+"_detail"),d=jQuery("#"+a)):(c=jQuery("#"+a),d=jQuery("#"+a+"_detail"));c.is(":checked")?d.attr("checked",!0):d.removeAttr("checked")};OapPlBrowser.prototype.removeFollowup=function(a,b){var c=jQuery(a);b&&are_you_sure()&&(c.addClass("loading"),this.ajaxList({edit_followup:1,remove_followup:b},function(){c.removeClass("loading")}));return!1};
OapPlBrowser.prototype.sortBy=function(a,b,c){jQuery(a).addClass("loading");this.jElementSortBy.val(b);this.jElementSortByDirection.val(c);this.jElementForm.submit()};OapPlBrowser.prototype.moveSupplierMessage=function(a,b){jQuery(a).addClass("loading");jQuery("#"+b.containerId).parent(":first").load(this.detailUrl+"/supplier_message",{id:b.projectId,move_supplier_message:1,message_id:b.supplierMessageId,to_folder:b.moveToFolder})};
OapPlBrowser.prototype.retractApplication=function(a,b,c){are_you_sure()&&(jQuery(a).addClass("loading"),jQuery("#project_application_"+b).load(c,{project_id:b}))};OapPlBrowser.prototype.submitApplication=function(a,b,c){var d=jQuery("#project_application_"+b);jQuery(a).addClass("loading");for(var a={},e=jQuery('input[type="hidden"]',d).serializeArray(),f=0;f<e.length;f++)a[e[f].name]=e[f].value;a.project_id=b;a.message=jQuery("textarea:first",d).val();d.load(c,a)};
function oapRemoveNote(a,b,c,d){are_you_sure()&&(jQuery(a).addClass("loading"),jQuery.get(d,{note_id:c},function(){jQuery("#note_item_"+c).remove();jQuery("#note_attachment_"+c).remove();resize_my_iframe("#project_notes_"+b)}))}
function oapSubmitFollowup(a,b){var c=jQuery(b),d=jQuery("input[name=at]",c);if(jQuery("input[name=event__3]",c).is(":checked")&&(d.removeClass("invalid"),d.val().length==0)){d.addClass("invalid");return}var d=c.serializeArray(),e=jQuery(a);e.addClass("loading");c.load(c.attr("action")+"&edit_followup=1&rand"+Math.random(),d,function(){e.removeClass("loading")})};
function OapSupplierMessagesList(a,b,c,d){this.reset_op=a;this.decline_op=b;this.export_op=c;this.open_op=d;this.open_urls=[]}OapSupplierMessagesList.prototype.addOpenUrl=function(a,b){this.open_urls[a]=b};OapSupplierMessagesList.prototype.markAll=function(){var a=jQuery(".mark-toggle input");if(a.attr("checked"))return!1;a.click().change();this.showMarkAll(!1);this.showRemoveMarks(!0);return!1};
OapSupplierMessagesList.prototype.removeMarks=function(){var a=jQuery(".mark-toggle input");a.attr("checked")||a.click().change();a.click().change();this.showMarkAll(!0);this.showRemoveMarks(!1);return!1};OapSupplierMessagesList.prototype.showRemoveMarks=function(a){var b=this;a?(jQuery(".remove-marks").removeClass("olmero_button_disabled"),jQuery(".remove-marks").bind("click",function(){return b.removeMarks()})):(jQuery(".remove-marks").addClass("olmero_button_disabled"),jQuery(".remove-marks").unbind("click"))};
OapSupplierMessagesList.prototype.showMarkAll=function(a){var b=this;a?(jQuery(".mark-all").removeClass("olmero_button_disabled"),jQuery(".mark-all").bind("click",function(){return b.markAll()})):(jQuery(".mark-all").addClass("olmero_button_disabled"),jQuery(".mark-all").unbind("click"))};
OapSupplierMessagesList.prototype.setup=function(){var a=this;jQuery(".list-box td.data.list:not(.ID)").click(function(){var a=jQuery(this).parent(),b=a.find(".button-bind");b.click().change();a.removeClass("selected");b.attr("checked")&&a.addClass("selected");return!1});jQuery(".button-bind").change(function(){var b=jQuery(this).parents("tr:first");b.removeClass("selected");jQuery(this).attr("checked")&&b.addClass("selected");a.updateButtons()});jQuery(".check-bind").change(function(){var b=jQuery(this).val();
if(b==a.open_op)return jQuery(".button-bind:checked").each(function(){var b=jQuery(this).val();window.open(a.open_urls[b],"_blank","width=675,height=330,resizable=yes,scrollbars=auto")}),a.resetButtons(),!1;if(b==a.decline_op)return jQuery(".decline_reason").show("fast"),a.setButtonsDisabled(!0),!1;var c=jQuery(this).parents("form:first").submit();b==a.export_op&&a.resetButtons();jQuery(this).val("noop");return c});jQuery(".cancel").click(function(){a.resetButtons();a.setButtonsDisabled(!1);jQuery(".decline_reason").hide("fast")});
jQuery(':submit[name="'+a.decline_op+'"]').click(function(){if(a.validateText())return a.setButtonsDisabled(!1),!0;jQuery(".reason").addClass("invalid");return!1});jQuery(".reason").keypress(function(){jQuery(".reason").removeClass("invalid")});jQuery(".olmero_button_disabled").live("click",function(){return!1});var b=jQuery(".button-bind:checked"),c=jQuery(".button-bind");this.showRemoveMarks(b.length>0);this.showMarkAll(b.length<c.length);this.updateButtons()};
OapSupplierMessagesList.prototype.setButtonsDisabled=function(a){jQuery(".check-bind:first").attr("disabled",a)};OapSupplierMessagesList.prototype.resetButtons=function(){jQuery(".check-bind").val(jQuery(".check-bind option:first").val())};
OapSupplierMessagesList.prototype.updateButtons=function(){var a=jQuery(".check-bind:first"),b=jQuery(".button-bind:checked");a.attr("disabled","disabled");this.showRemoveMarks(!1);if(b.length>0){this.showRemoveMarks(!0);a.removeAttr("disabled");var b=jQuery(".oap_request.declinable td input:checked").length==b.length,c=this.getOption(a,this.decline_op),d=jQuery(".hidden-select");b?c.length==0&&(c=this.getOption(d,this.decline_op),a.append(c.clone()),c.remove()):c.length>0&&(jQuery(d).append(c.clone()),
c.remove())}};OapSupplierMessagesList.prototype.getOption=function(a,b){return a.find("option[value='"+b+"']")};OapSupplierMessagesList.prototype.validateText=function(){return jQuery(".reason").val().length>0};
if(!this.JSON)this.JSON={};
(function(){function k(a){return a<10?"0"+a:a}function o(a){p.lastIndex=0;return p.test(a)?'"'+a.replace(p,function(a){var c=r[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function l(a,i){var c,d,h,m,g=e,f,b=i[a];b&&typeof b==="object"&&typeof b.toJSON==="function"&&(b=b.toJSON(a));typeof j==="function"&&(b=j.call(i,a,b));switch(typeof b){case "string":return o(b);case "number":return isFinite(b)?String(b):"null";case "boolean":case "null":return String(b);
case "object":if(!b)return"null";e+=n;f=[];if(Object.prototype.toString.apply(b)==="[object Array]"){m=b.length;for(c=0;c<m;c+=1)f[c]=l(c,b)||"null";h=f.length===0?"[]":e?"[\n"+e+f.join(",\n"+e)+"\n"+g+"]":"["+f.join(",")+"]";e=g;return h}if(j&&typeof j==="object"){m=j.length;for(c=0;c<m;c+=1)d=j[c],typeof d==="string"&&(h=l(d,b))&&f.push(o(d)+(e?": ":":")+h)}else for(d in b)Object.hasOwnProperty.call(b,d)&&(h=l(d,b))&&f.push(o(d)+(e?": ":":")+h);h=f.length===0?"{}":e?"{\n"+e+f.join(",\n"+e)+"\n"+
g+"}":"{"+f.join(",")+"}";e=g;return h}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+k(this.getUTCMonth()+1)+"-"+k(this.getUTCDate())+"T"+k(this.getUTCHours())+":"+k(this.getUTCMinutes())+":"+k(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var q=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e,n,r={"":"\\b","\t":"\\t","\n":"\\n","":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},j;if(typeof JSON.stringify!=="function")JSON.stringify=function(a,i,c){var d;n=e="";if(typeof c==="number")for(d=0;d<c;d+=1)n+=" ";else typeof c==="string"&&(n=c);if((j=i)&&typeof i!=="function"&&(typeof i!=="object"||typeof i.length!=="number"))throw Error("JSON.stringify");return l("",{"":a})};
if(typeof JSON.parse!=="function")JSON.parse=function(a,e){function c(a,d){var g,f,b=a[d];if(b&&typeof b==="object")for(g in b)Object.hasOwnProperty.call(b,g)&&(f=c(b,g),f!==void 0?b[g]=f:delete b[g]);return e.call(a,d,b)}var d,a=String(a);q.lastIndex=0;q.test(a)&&(a=a.replace(q,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return d=eval("("+a+")"),typeof e==="function"?c({"":d},""):d;throw new SyntaxError("JSON.parse");}})();
function OapObjectBrowserExportValidator(a,b){this.validate=function(c,d){return c>a?(d(b),!1):!0}};
var Olmero={namespace:function(a){var a=a.split("."),b=this,c=function(){for(var a in window)if(window[a]===b)return a}();a[0]===c&&(a=a.slice(1));for(c=0;c<a.length;c++){var d=a[c];if(b[d]===void 0)b[d]={};else if(typeof b[d]!=="object")throw new TypeError("All segments of a namespace must be of type object: ".concat(d));b=b[d]}return b}};
var ui=Olmero.namespace("Olmero.UI");
ui.Alert=function(e,f,b){if(!(this instanceof ui.Alert))return new ui.Alert(e,f,b);var c=this,d=!0,a=jQuery("<div>").append(f).dialog({title:e,modal:!0,closeOnEscape:!0,resizable:!1,autoOpen:!1,draggable:!1,buttons:b!==void 0?b:[{text:"Ok",click:function(){d?c.destroy():c.hide()}}],close:function(){d&&c.destroy()}});this.disableDestructionOnClose=function(a){d=!a};this.show=function(){a.dialog("open")};this.hide=function(){a.dialog("close")};this.destroy=function(){a.dialog("destroy");a.remove()}};

