PrimeFaces={escapeClientId:function(a){return"#"+a.replace(/:/g,"\\:")},onContentReady:function(b,a){YAHOO.util.Event.onContentReady(b,a,window,true)},cleanWatermarks:function(){$.watermark.hideAll()},showWatermarks:function(){$.watermark.showAll()},addSubmitParam:function(b,a,c){$(this.escapeClientId(b)).append('');return this},submit:function(a){$(this.escapeClientId(a)).submit()},attachBehaviors:function(b,a){for(var e in a){var d=e,c=a[d];b.bind(d,function(f){c.call(b,f)})}},getCookie:function(a){return $.cookie(a)},setCookie:function(a,b){$.cookie(a,b)},skinInput:function(a){a.hover(function(){$(this).addClass("ui-state-hover")},function(){$(this).removeClass("ui-state-hover")}).focus(function(){$(this).addClass("ui-state-focus")}).blur(function(){$(this).removeClass("ui-state-focus")})},ab:function(a,b){PrimeFaces.ajax.AjaxRequest(a,b)},navigate:function(b,a){$.mobile.changePage($(PrimeFaces.escapeClientId(b)),a)},info:function(a){if(window.log){log.info(a)}},debug:function(a){if(window.log){log.debug(a)}},warn:function(a){if(window.log){log.warn(a)}},error:function(a){if(window.log){log.error(a)}},changeTheme:function(e){if(e&&e!=""){var f=$('link[href*="javax.faces.resource/theme.css"]'),d=f.attr("href"),c=d.split("&")[0],b=c.split("ln=")[1],a=d.replace(b,"primefaces-"+e);f.attr("href",a)}},clearSelection:function(){var a=window.getSelection?window.getSelection():document.selection;if(a){if(a.removeAllRanges){a.removeAllRanges()}else{if(a.empty){a.empty()}}}},locales:{},PARTIAL_REQUEST_PARAM:"javax.faces.partial.ajax",PARTIAL_UPDATE_PARAM:"javax.faces.partial.render",PARTIAL_PROCESS_PARAM:"javax.faces.partial.execute",PARTIAL_SOURCE_PARAM:"javax.faces.source",BEHAVIOR_EVENT_PARAM:"javax.faces.behavior.event",PARTIAL_EVENT_PARAM:"javax.faces.partial.event",VIEW_STATE:"javax.faces.ViewState"};PrimeFaces.ajax={};PrimeFaces.widget={};PrimeFaces.ajax.AjaxUtils={encodeViewState:function(){var a=document.getElementById(PrimeFaces.VIEW_STATE).value;var c=new RegExp("\\+","g");var b=a.replace(c,"%2B");return b},updateState:function(c){var a=$.trim(c),b=this.portletForms?this.portletForms:$("form");b.each(function(){var d=$(this),e=d.children("input[name='javax.faces.ViewState']").get(0);if(e){$(e).val(a)}else{d.append('')}})},serialize:function(b){var c="";for(var a in b){c=c+"&"+a+"="+b[a]}return c},updateElement:function(c,b){if(c==PrimeFaces.VIEW_STATE){PrimeFaces.ajax.AjaxUtils.updateState.call(this,b)}else{$(PrimeFaces.escapeClientId(c)).replaceWith(b);if($.mobile){var a=$(PrimeFaces.escapeClientId(c)).parent().find("input, textarea, select, button, ul");a.filter("input, textarea").not("[type='radio'], [type='checkbox'], [type='button'], [type='submit'], [type='reset'], [type='image'], [type='hidden']").textinput();a.filter("[data-role='listview']").listview();a.filter("button, [type='button'], [type='submit'], [type='reset'], [type='image']").button();a.filter("input, select").filter("[data-role='slider'], [data-type='range']").slider();a.filter("select:not([data-role='slider'])").selectmenu()}}},handleResponse:function(d){var e=d.find("redirect"),c=d.find('extension[ln="primefaces"]'),a=d.find("eval");if(e.length>0){window.location=e.attr("url")}else{this.args=c.length>0?$.parseJSON(c.text()):{};for(var b=0;b0){b=g.val();e=$('form[action="'+c.attr("action")+'"]')}PrimeFaces.debug("URL to post "+b+".");l=l+"&"+PrimeFaces.PARTIAL_REQUEST_PARAM+"=true";l=l+"&"+PrimeFaces.PARTIAL_SOURCE_PARAM+"="+k.source;var a=[];if(k.process){a.push(k.process)}if(f&&f.process){a.push(f.process)}if(a.length>0){l=l+"&"+PrimeFaces.PARTIAL_PROCESS_PARAM+"="+a.join(" ")}var h=[];if(k.update){h.push(k.update)}if(f&&f.update){h.push(f.update)}if(h.length>0){l=l+"&"+PrimeFaces.PARTIAL_UPDATE_PARAM+"="+h.join(" ")}if(k.event){l=l+"&"+PrimeFaces.BEHAVIOR_EVENT_PARAM+"="+k.event;var j=k.event;if(k.event=="valueChange"){j="change"}else{if(k.event=="action"){j="click"}}l=l+"&"+PrimeFaces.PARTIAL_EVENT_PARAM+"="+j}else{l=l+"&"+k.source+"="+k.source}if(k.params){l=l+PrimeFaces.ajax.AjaxUtils.serialize(k.params)}if(f&&f.params){l=l+PrimeFaces.ajax.AjaxUtils.serialize(f.params)}PrimeFaces.debug("Post Data:"+l);var i={url:b,type:"POST",cache:false,dataType:"xml",data:l,portletForms:e,beforeSend:function(m){m.setRequestHeader("Faces-Request","partial/ajax")},error:function(o,m,n){if(k.onerror){k.onerror.call(o,m,n)}PrimeFaces.error("Request return with error:"+m+".")},success:function(o,m,p){PrimeFaces.debug("Response received succesfully.");var n;if(k.onsuccess){n=k.onsuccess.call(this,o,m,p)}if(f&&f.onsuccess&&!n){n=f.onsuccess.call(this,o,m,p)}if(n){return}else{PrimeFaces.ajax.AjaxResponse.call(this,o,m,p)}PrimeFaces.debug("DOM is updated.")},complete:function(n,m){if(k.oncomplete){k.oncomplete.call(this,n,m,this.args)}if(f&&f.oncomplete){f.oncomplete.call(this,n,m,this.args)}PrimeFaces.debug("Response completed.");PrimeFaces.ajax.RequestManager.poll()}};i.global=k.global==true||k.global==undefined?true:false;if(k.async){$.ajax(i)}else{PrimeFaces.ajax.RequestManager.offer(i)}};PrimeFaces.ajax.AjaxResponse=function(e){var c=$(e.documentElement),d=c.find("update");for(var a=0;a1&&(e===null||typeof e!=="object")){b=jQuery.extend({},b);if(e===null){b.expires=-1}if(typeof b.expires==="number"){var g=b.expires,c=b.expires=new Date();c.setDate(c.getDate()+g)}return(document.cookie=[encodeURIComponent(d),"=",b.raw?String(e):encodeURIComponent(String(e)),b.expires?"; expires="+b.expires.toUTCString():"",b.path?"; path="+b.path:"",b.domain?"; domain="+b.domain:"",b.secure?"; secure":""].join(""))}b=e||{};var a,f=b.raw?function(h){return h}:decodeURIComponent;return(a=new RegExp("(?:^|; )"+encodeURIComponent(d)+"=([^;]*)").exec(document.cookie))?f(a[1]):null};Array.prototype.remove=function(c,b){var a=this.slice((b||c)+1||this.length);this.length=c<0?this.length+c:c;return this.push.apply(this,a)};