PrimeFacesExt={getRequestUrlExtension:function(){return PrimeFacesExt.getUrlExtension(location.href)},getUrlExtension:function(a){return(a=a.substr(1+a.lastIndexOf("/")).split("?")[0]).substr(a.lastIndexOf("."))},getFacesResource:function(a,b,d){var c=PrimeFacesExt.getPrimeFacesExtensionsScriptURI(),c=c.replace("/primefaces-extensions.js",a),c=PrimeFacesExt.useUncompressedResources?c.replace("ln\x3d"+PrimeFacesExt.RESOURCE_LIBRARY_UNCOMPRESSED,"ln\x3d"+b):c.replace("ln\x3d"+PrimeFacesExt.RESOURCE_LIBRARY, "ln\x3d"+b);a=/[?&]v=([^&]*)/.exec(c)[1];c=d&&0d?a:d,height:b>c?b:c}},u=!1,q=null;$(window).bind("resize",function(){q&&clearTimeout(q);q=setTimeout(v,100)});var v=function(){if(!0===u){for(var b=w(),d=b.width,b=b.height,c=$(PrimeFaces.escapeClientId(a)),e=c.offset().left,k=c.offset().top,r=e+c.outerWidth(),p=k+c.outerHeight(),l=c.parent();0m.left+l.outerWidth()&&(r=m.left+l.outerWidth()),p>m.top+l.outerHeight()&&(p=m.top+l.outerHeight()));l=l.parent()}0>e&&(e=0);0>k&&(k=0);r=p-k)try{var n=$(PrimeFaces.escapeClientId(a)+" :focusable");if(2>n.length){var q=$('\x3ca href\x3d"#"\x3e \x3c/a\x3e');c.append(q);q.focus();q.remove()}else $(n[1]).focus();$(n[0]).focus()}catch(x){}n= 0;$.browser.msie&&document.documentMode&&!window.performance&&(n=1);f.updatePosition(0,0,d-0,k-0);g.updatePosition(0,p-0,d-0,b-0);h.updatePosition(0,k-0+n,e-0,p-0-n);t.updatePosition(r-0,k-0+n,d-0,p-0-n);setTimeout(v,150)}};return{show:function(){u=!0;v();var a=++PrimeFaces.zindex;f.show(a);g.show(a);h.show(a);t.show(a)},hide:function(){u=!1;f.hide();g.hide();h.hide();t.hide()}}}; CKEDITOR_GETURL=function(a){if(-1!==a.indexOf("?resolve\x3dfalse"))a=a.replace("?resolve\x3dfalse","");else{var b=a.indexOf("v\x3d"+PrimeFacesExt.getPrimeFacesExtensionsVersion());if(-1!==b){if(b=a.substring(b+("v\x3d"+PrimeFacesExt.getPrimeFacesExtensionsVersion()).length),0=a||96<=a&&111>=a||186<=a&&222>=a)&&(this.checkChange(),this.checkDirty())},this));this.instance.on("blur",$.proxy(function(){this.instance.dirtyFired=!1},this))},checkDirty:function(){this.isDirtyEventDefined&&!this.instance.dirtyFired&&this.instance.checkDirty()&& (this.fireEvent("dirty"),this.instance.dirtyFired=!0)},checkChange:function(){this.isChangeEventDefined&&this.fireEvent("change")},fireEvent:function(a){this.cfg.behaviors&&(a=this.cfg.behaviors[a])&&a.call(this,{params:[]})},destroy:function(){if(this.instance){try{this.instance.destroy(!0)}catch(a){window.console&&console.log&&console.log("CKEditor throwed a error while destroying the old instance: "+a)}this.instance=null}this.jq.show()},isDirty:function(){return this.instance?this.instance.checkDirty(): !1},setReadOnly:function(a){this.instance.setReadOnly(!1!==a)},isReadOnly:function(){return this.instance.readOnly},hasFocus:function(){return this.instance.focusManager.hasFocus},getEditorInstance:function(){return this.instance}}); PrimeFacesExt.widget.DynaForm=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);a.isPostback||(this.toggledExtended=!1);if(a.autoSubmit&&!PF(a.widgetVar))this.submitForm();else if(a.isPostback&&this.toggledExtended&&this.uuid==a.uuid){var b=this.jq.find("tr.pe-dynaform-extendedrow");0=this.degree-a?360- -1*(this.degree-a):this.degree-a;this.redrawImage(!1,!0)},rotateRight:function(a){this.initializeLazy();this.degree=360<=this.degree+a?this.degree+a-360:this.degree+a;this.redrawImage(!1,!0)},resize:function(a,b){this.initializeLazy();this.newImageWidth=a;this.newImageHeight=b;this.redrawImage(!0,!1)},scale:function(a){this.initializeLazy(); this.newImageWidth*=a;this.newImageHeight*=a;this.redrawImage(!0,!1)},restoreDefaults:function(){this.initializeLazy();this.newImageWidth=this.imageWidth;this.newImageHeight=this.imageHeight;this.degree=0;this.redrawImage(!0,!0)},redrawImage:function(a,b){var d;d=0<=this.degree?Math.PI*this.degree/180:Math.PI*(360+this.degree)/180;var c=Math.cos(d),e=Math.sin(d);if($.browser.msie&&8>=parseInt($.browser.version)){var f=document.createElement("img");f.onload=$.proxy(function(){f.height=this.newImageHeight; f.width=this.newImageWidth;f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+c+",M12\x3d"+-1*e+",M21\x3d"+e+",M22\x3d"+c+",SizingMethod\x3d'auto expand')";f.id=this.target.id;this.target.parentNode.replaceChild(f,this.target);this.target=f;a&&this.fireResizeEvent();b&&this.fireRotateEvent()},this);f.src=this.imageSrc}else{var h=document.createElement("canvas"),g=new Image;g.onload=$.proxy(function(){h.style.width=h.width=Math.abs(c*g.width)+Math.abs(e*g.height);h.style.height=h.height= Math.abs(c*g.height)+Math.abs(e*g.width);var f=h.getContext("2d");f.save();d<=Math.PI/2?f.translate(e*g.height,0):d<=Math.PI?f.translate(h.width,-1*c*g.height):d<=1.5*Math.PI?f.translate(-1*c*g.width,h.height):f.translate(0,-1*e*g.width);f.rotate(d);f.drawImage(g,0,0,g.width,g.height);f.restore();h.id=this.target.id;h.src=this.target.src;this.target.parentNode.replaceChild(h,this.target);this.target=h;a&&this.fireResizeEvent();b&&this.fireRotateEvent()},this);g.src=this.imageSrc;g.width=this.newImageWidth; g.height=this.newImageHeight}},fireRotateEvent:function(){if(this.cfg.behaviors){var a=this.cfg.behaviors.rotate;a&&a.call(this,{params:[{name:this.id+"_degree",value:this.degree}]})}},fireResizeEvent:function(){if(this.cfg.behaviors){var a=this.cfg.behaviors.resize;a&&a.call(this,{params:[{name:this.id+"_width",value:this.newImageWidth},{name:this.id+"_height",value:this.newImageHeight}]})}}}); PrimeFacesExt.widget.TriStateCheckbox=PrimeFaces.widget.BaseWidget.extend({init:function(a){this._super(a);this.input=$(this.jqId+"_input");this.box=this.jq.find(".ui-chkbox-box");this.icon=this.box.children(".ui-chkbox-icon");this.itemLabel=this.jq.find(".ui-chkbox-label");this.disabled=this.input.is(":disabled");this.fixedMod=function(a,b){return(a%b+b)%b};var b=this;this.disabled||(this.box.mouseover(function(){b.box.addClass("ui-state-hover")}).mouseout(function(){b.box.removeClass("ui-state-hover")}).click(function(a){b.toggle(1); a.preventDefault?a.preventDefault():a.returnValue=!1}),this.itemLabel.click(function(){b.toggle(1);event.preventDefault?event.preventDefault():event.returnValue=!1}),this.box.bind("keydown",function(a){switch(a.keyCode){case 38:b.toggle(1);a.preventDefault?a.preventDefault():a.returnValue=!1;break;case 40:b.toggle(-1);a.preventDefault?a.preventDefault():a.returnValue=!1;break;case 39:b.toggle(1);a.preventDefault?a.preventDefault():a.returnValue=!1;break;case 37:b.toggle(-1);a.preventDefault?a.preventDefault(): a.returnValue=!1;break;case 32:b.toggle(1),a.preventDefault?a.preventDefault():a.returnValue=!1}}),this.cfg.behaviors&&PrimeFaces.attachBehaviors(this.input,this.cfg.behaviors));this.input.data(PrimeFaces.CLIENT_ID_DATA,this.id)},toggle:function(a){if(!this.disabled){var b=parseInt(this.input.val());a=this.fixedMod(b+a,3);this.input.val(a);0==a?this.box.removeClass("ui-state-active"):this.box.addClass("ui-state-active");var d=this.box.data("iconstates");this.icon.removeClass(d[b]).addClass(d[a]); b=this.box.data("titlestates");null!=b&&0