(function(a){a.fn.setDisabled=function(a){return this.each(function(){if("undefined"!=typeof this.disabled)this.disabled=a})};a.fn.disable=function(){return this.setDisabled(!0)};a.fn.enable=function(){return this.setDisabled(!1)};a.fn.replaceWith=function(a){return this.after(a).remove()}})(jQuery);$(function(){$("form").submit(function(){$(":submit",this).attr("disabled","disabled");$(":reset",this).attr("disabled","disabled")})});function JPhlocClass(){}
JPhlocClass.prototype={ge:function(a){return document.getElementById(a)},ce:function(a){return document.createElement(a)},ct:function(a){return document.createTextNode(a)},submitForm:function(a){(a=this.ge(a))&&a.submit()},selectAllCheckBoxes:function(a){if(a=this.ge(a))for(var a=this.getChildrenByTagName(a,"input",!0),b=0;b<a.length;b++)if("checkbox"==a[b].getAttribute("type"))a[b].checked="checked"},unselectAllCheckBoxes:function(a){if(a=this.ge(a))for(var a=this.getChildrenByTagName(a,"input",
!0),b=0;b<a.length;b++)if("checkbox"==a[b].getAttribute("type"))a[b].checked=!1},outerHTML:function(a,b){var c=null;if(a){var d=a.parentNode;if(d){var f=document.createElement("span");f.innerHTML=b;for(var e=0;e<f.childNodes.length;e++)c=f.childNodes[e],d.insertBefore(c,a);d.removeChild(a)}}return c},startsWith:function(a,b){return a&&b&&a.length>=b.length?a.substring(0,b.length)==b:!1},endsWith:function(a,b){return a&&b&&a.length>=b.length?a.substr(a.length-b.length)==b:!1},getChildrenByTagName:function(a,
b,c){var d=[];if(a&&a.childNodes)for(var f=0;f<a.childNodes.length;f++){var e=a.childNodes[f];1==e.nodeType&&(e.nodeName.toLowerCase()==b&&d.push(e),c&&(d=d.concat(this.getChildrenByTagName(e,b,c))))}return d},isTagOfName:function(a,b){return a&&b&&1==a.nodeType&&a.nodeName.toLowerCase()==b.toLowerCase()},getParentByTagName:function(a,b){if(a){var c=a.parentNode;if(c&&1==c.nodeType)return c.nodeName.toLowerCase()==b?c:this.getParentByTagName(c,b)}return null},getChildrenByIDPrefix:function(a,b,c){var d=
[];if(a&&a.childNodes)for(var f=0;f<a.childNodes.length;f++){var e=a.childNodes[f];1==e.nodeType&&(this.startsWith(e.id,b)?d.push(e):c&&(d=d.concat(this.getChildrenByIDPrefix(e,b,!0))))}return d},getOffsetTopRecursive:function(a){var b=0;if(a){if(a.offsetTop&&"number"==typeof a.offsetTop)b=a.offsetTop;a.offsetParent&&(b+=this.getOffsetTopRecursive(a.offsetParent))}return b},escapeRegex:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=/(\/|\.|\*|\+|\?|\||\(|\)|\[|\]|\{|\}|\\)/g;return a.replace(arguments.callee.sRE,
"\\$1")},escapeLiteral:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=/(\'|\"|\\)/g;return a.replace(arguments.callee.sRE,"\\$1")},escapeLinebreaks:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=/(\n)/g;return a.replace(arguments.callee.sRE,"\\n")},escapeHTML:function(a){return a.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},nlToBR:function(a){if(!arguments.callee.sRE)arguments.callee.sRE=/(\n)/g;return a.replace(arguments.callee.sRE,
"<br/>")},removeNode:function(a){"string"==typeof a&&(a=this.ge(a));return a&&a.parentNode?a.parentNode.removeChild(a):null},moveBeforePrevSibling:function(a){var b=a.previousSibling;return b?(a.parentNode.insertBefore(jphloc.removeNode(a),b),!0):!1},moveAfterNextSibling:function(a){var b=a.nextSibling;return b?(a.parentNode.insertBefore(jphloc.removeNode(b),a),!0):!1},updateDisableStateByCheckBox:function(a,b){if(a){var c=this.ge(b);c&&(a.checked?this.enableCtrl(c):this.disableCtrl(c))}},isButton:function(a){return a&&
(this.hasClass(a,"pdaf_button")||this.hasClass(a,"pui_button"))},disableButton:function(a){"string"==typeof a&&(a=this.ge(a));if(a){var b=a.getAttribute("disabled",0);if(!b||"disabled"!=b)a.setAttribute("disabled","disabled"),this.addClass(a,"pdaf_button_disabled"),this.addClass(a,"pui_button_disabled"),a.onfocus=function(){a.blur()},a.blur()}},blur:function(a){a&&a.blur()},enableButton:function(a){"string"==typeof a&&(a=this.ge(a));if(a&&a.getAttribute("disabled",0))a.removeAttribute("disabled"),
this.removeClass(a,"pdaf_button_disabled"),this.removeClass(a,"pui_button_disabled"),a.removeAttribute("onfocus"),a.onfocus=function(){a.focus()}},readAttribute:function(a,b){var c=a.getAttribute(b,0);if("function"==typeof c)c=a.getAttributeNode(b).nodeValue;return c},isDisabled:function(a){return a&&this.readAttribute(a,"disabled")},disableCtrl:function(a){if(a)this.isButton(a)?this.disableButton(a):(a.disabled="disabled",this.addClass(a,"disabled"))},enableCtrl:function(a){if(a)this.isButton(a)?
this.enableButton(a):(a.disabled=!1,this.removeClass(a,"disabled"))},focusControl:function(a,b){if(!this.hasClass(a,"readonly"))this.addClass(a,b),a.focussed=!0},blurControl:function(a,b){if(!this.hasClass(a,"readonly"))this.removeClass(a,b),a.focussed=!1},isSubmitKey:function(a){return(a=a?a:event?event:null)&&13==a.keyCode?!0:!1},href:function(a){try{if(a&&0<a.length)window.location.href=a}catch(b){}},linkTransactionStart:function(a){return a&&!this.isDisabled(a)?(this.disableCtrl(a),!0):!1},linkTransactionEnd:function(a){a&&
this.enableCtrl(a)},hidden:function(a){if(a)a.style.visibility="hidden"},disable:function(a){if(a)a.disabled="disabled"},enable:function(a){if(a)a.disabled=!1},visible:function(a){if(a)a.style.visibility="visible"},hasClass:function(a,b){return $(a).hasClass(b)},addClass:function(a,b){$(a).addClass(b)},removeClass:function(a,b){$(a).removeClass(b)},toggleClassByFlag:function(a,b,c,d){d?(this.addClass(a,b),this.removeClass(a,c)):(this.removeClass(a,b),this.addClass(a,c))},setVisible:function(a,b){b?
this.show(a):this.hide(a)},toggleVisible:function(a){"string"==typeof a&&(a=this.ge(a));a&&a.style&&this.setVisible(a,"none"==a.style.display)},hide:function(a){"string"==typeof a&&(a=this.ge(a));if(a)a.style.display="none"},show:function(a){"string"==typeof a&&(a=this.ge(a));if(a)a.style.display="block"},isShown:function(a){"string"==typeof a&&(a=this.ge(a));return a?"block"==a.style.display:!1},showInline:function(a){"string"==typeof a&&(a=this.ge(a));if(a)a.style.display="inline-block"},appendHiddenField:function(a,
b,c){var d=this.ce("input");d.setAttribute("type","hidden");d.setAttribute("name",b);d.setAttribute("value",c);(a=this.getParentByTagName(a,"form"))&&a.appendChild(d)},getPreloadedImage:function(a){var b=document.createElement("div");document.body.appendChild(b);b.innerHTML=a;return b.getElementsByTagName("img")[0]},getPageWidth:function(){return window.innerWidth?window.innerWidth:window.document.documentElement&&window.document.documentElement.clientWidth?window.document.documentElement.clientWidth:
window.document.body.offsetWidth},getPageHeight:function(){return window.innerHeight?window.innerHeight:window.document.documentElement&&window.document.documentElement.clientHeight?window.document.documentElement.clientHeight:window.document.body.offsetHeight},triggerEvent:function(a,b){if(a.fireEvent)a.fireEvent("on"+b);else if(document.createEvent&&a.dispatchEvent){var c=document.createEvent("HTMLEvents");c.initEvent("change",!0,!0);a.dispatchEvent(c)}else alert("Event "+b+" not fired!")},setInputValue:function(a,
b){if(b&&("string"==typeof a&&(a=this.ge(a)),a))a.value=b},eval:function(a){a&&(a=sajax_extract_executablecode(a),jQuery.globalEval(a))},getPosition:function(a){var b=nTop=0;if(a.offsetParent){do b+=a.offsetLeft,nTop+=a.offsetTop;while(a=a.offsetParent);return[b,nTop]}},isNull:function(a){return null===a||void 0===a}};var jphloc=window.jphloc=new JPhlocClass;function pdafRemoveNodeAfterTimeout(a,b){window.setTimeout(function(){jphloc.removeNode(a);pdaf_triggerWindowLayoutChange()},b)}
window.g_aOnLayoutChangeCont=[];function pdaf_registerWindowLayoutChangeListener(a){"function"!=typeof a&&alert("You must pass in a function as change listener to pdaf_registerWindowLayoutChangeListener!");window.g_aOnLayoutChangeCont.push(a)}function pdaf_triggerWindowLayoutChange(){for(var a in window.g_aOnLayoutChangeCont)window.g_aOnLayoutChangeCont[a]()}
function pdaf_submit_form(a){var b=!1,c=a;for(a&&1==a.nodeType&&"form"==a.nodeName.toLowerCase()&&(b=!0);!b&&c;)(c=c.parentNode)&&1==c.nodeType&&"form"==c.nodeName.toLowerCase()&&(b=!0);if(c){if(c.onsubmit)c.onsubmit();c.submit()}}window.onresize=pdaf_triggerWindowLayoutChange;

