if(typeof LADDERS=="undefined"){LADDERS={}}if(typeof console=="undefined"){console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){}}}function $(a){return document.getElementById(a)}function equalColumns(a){var f=0;var e=new Array();for(var c=0;c<a.length;c++){a[c].style.minHeight="";e[c]=YAHOO.util.Dom.getRegion(a[c]);if(e[c].height>f){f=e[c].height}}for(var c=0;c<a.length;c++){var b=a[c];if(e[c].height!=f){var d=YAHOO.util.Dom.getStyle(b,"paddingTop");var g=YAHOO.util.Dom.getStyle(b,"paddingBottom");d=d?Number(d.replace(/px/,"")):0;g=g?Number(g.replace(/px/,"")):0;YAHOO.util.Dom.setStyle(b,"minHeight",(f-d-g)+"px")}}}function retX(a){if(!a){var a=window.event}return YAHOO.util.Dom.getX(YAHOO.util.Event.getTarget(a))}function retY(a){if(!a){var a=window.event}return YAHOO.util.Dom.getY(YAHOO.util.Event.getTarget(a))}function lTrim(b){var a=/\s*((\S+\s*)*)/;return b.replace(a,"$1")}function rTrim(b){var a=/((\s*\S+)*)\s*/;return b.replace(a,"$1")}function trim(a){return lTrim(rTrim(a))}function stripTags(a){return a.replace(/<\/?[^>]+>/gi,"")}function ajaxFailure(a){if(a.status>0){alert("There was an error performing the specified action:\n\n"+a.statusText+"("+a.status+")")}}function escapeHTML(b){var c=document.createElement("div");var a=document.createTextNode(b);c.appendChild(a);return c.innerHTML}function unescapeHTML(a){var b=document.createElement("div");b.innerHTML=stripTags(a);return b.childNodes[0]?(b.childNodes.length>1?$A(b.childNodes).inject("",function(c,d){return c+d.nodeValue}):b.childNodes[0].nodeValue):""}function formElementPopulated(a){if(!a){return true}else{if(a.type=="text"){return(a.value!="")}else{if(a.type=="select-one"){return(a.options.selectedIndex>0)}else{return true}}}}function clearDefaultText(b,a){if(a.value==a.getAttribute("defaultText")){a.style.cssText="";a.value=""}}function restoreDefaultText(b,a){if(a.getAttribute("defaultText")!=""&&(a.value==""||a.value==a.getAttribute("defaultText"))){if(a.getAttribute("defaultStyle")!=""){a.style.cssText=a.getAttribute("defaultStyle")}a.value=a.getAttribute("defaultText")}}function defaultTextFormEventMassAction(d,b){var e=b[0];var a=b[1];for(var c=0;c<e.elements.length;c++){if(e.elements[c].getAttribute("defaultText")!=null&&e.elements[c].getAttribute("defaultText")!=""){a(null,e.elements[c])}}}function modifyFields(b,d,f){var g=["INPUT","SELECT","TEXTAREA"];for(var e=0;e<g.length;e++){var a=b.getElementsByTagName(g[e]);for(var c=0;c<a.length;c++){a[c][d]=f}}}function arrayIndexOf(d,b){for(var a=0,c=d.length;a<c;a++){if(b==d[a]){return a}}return -1}function objectFind(b,d,a){for(var c in b){if(b.hasOwnProperty(c)&&b[c][d]==a){return b[c]}}return null}function isNodeList(a){if(typeof NodeList!=="undefined"){return a instanceof NodeList}else{return a.length>=0&&!a.nodeName}}function printPage(){var b=window.location.toString().split("#");var c=b[0];c+=c.indexOf("?")==-1?"?":"&";c+="print=true";if(b[1]){c=c+"#"+b[1]}var a=window.open(c,"printWindow","width=910,height=700,location=no,status=no,scrollbars=yes")}function runScriptTags(scriptTags){for(var i=0,ii=scriptTags.length;i<ii;i++){if(scriptTags[i].innerHTML){if(window.execScript){window.execScript(scriptTags[i].innerHTML)}else{window.eval(scriptTags[i].innerHTML)}}}}function promoteAJAXStyles(c,g){var j=/href=['"]([\S]*)['"]/g;var a;if(document.createStyleSheet){while(a=j.exec(c)){document.createStyleSheet(a[1],document.styleSheets.length-1)}document.styleSheets[document.styleSheets.length-1].cssText+=g}else{while(a=j.exec(c)){var l="@import url('"+a[1]+"');";var f=document.createElement("link");f.rel="stylesheet";f.href="data:text/css, "+escape(l);document.getElementsByTagName("head")[0].insertBefore(f,document.getElementsByTagName("STYLE")[0])}try{document.getElementsByTagName("STYLE")[0].innerHTML+=g}catch(h){var b=g.split("}");for(var d=0,k=b.length;d<k;d++){if(trim(b[d])!=""){document.styleSheets[document.styleSheets.length-1].insertRule(b[d]+"}")}}}}}function shimSubmits(){var c=document.getElementsByTagName("FORM");for(var b=0;b<c.length;b++){var a=document.createElement("INPUT");a.type="submit";a.className="shim";c[b].insertBefore(a,c[b].firstChild)}}function JSONFormPopulator(a){this.form=a;return this}JSONFormPopulator.prototype.form=null;JSONFormPopulator.prototype.populate=function(JSON,updateOnly,nestedPath){if(this.form){if(updateOnly===true){this.jsonDescend(nestedPath,JSON)}else{if(nestedPath){var nestedJSON={};nestedJSON[nestedPath]=JSON;JSON=nestedJSON}for(var i=0;i<this.form.elements.length;i++){var formElement=this.form.elements[i];var evaluatedJSONPath=[];try{evaluatedJSONPath=eval("JSON."+formElement.name);if(evaluatedJSONPath===undefined||evaluatedJSONPath===null){evaluatedJSONPath=[]}}catch(e){}this.populateElement(formElement,evaluatedJSONPath)}}}return this.form};JSONFormPopulator.prototype.populateElement=function(d,f){if(!d||f===null){return}else{if(isNodeList(d)){for(var b=0,c=d.length;b<c;b++){this.populateElement(d[b],f)}}else{if(!d.name||d.name.indexOf("_")==0){return}else{if(!(f instanceof Array)){f=[f]}for(var b=0;b<f.length;b++){if(f[b] instanceof Object&&f[b].id!==null){var e=f[b].id;f[b]=e}f[b]=f[b]+""}if(d.type=="select-one"){for(var a=0;a<d.options.length;a++){if(d.options[a].value==f[0]){d.selectedIndex=a;break}}}else{if((d.type=="text"||d.type=="textarea"||d.type=="hidden")){d.value=f[0]||""}else{if(d.type=="radio"){d.checked=(d.value==f[0])}else{if(d.type=="checkbox"){d.checked=(arrayIndexOf(f,d.value)!=-1)}}}}}}}};JSONFormPopulator.prototype.jsonDescend=function(e,d){for(childName in d){var b=d[childName];var f;if(!e||e===""){f=childName}else{f=e+"."+childName}if(this.form.elements[f]){var a=this.form.elements[f];this.populateElement(a,b)}else{if(b instanceof Array){for(var c=0;c<b.length;c++){this.jsonDescend(f+"["+c+"]",b[c])}}else{if(b instanceof Object){this.jsonDescend(f,b)}}}}};function selectJobFunction(){$("jobLevel-hr").style.display="none";$("jobLevel-agency").style.display="none";$("jobLevel-raa").style.display="none";$("jobLevel-others").style.display="none";$("jobLevel-hr-select").disabled=true;$("jobLevel-agency-select").disabled=true;$("jobLevel-raa-select").disabled=true;$("jobLevel-others-select").disabled=true;if($("jobFunction").selectedIndex<2){$("jobLevel-hr").style.display="block";$("jobLevel-hr-select").disabled=false}else{if($("jobFunction").selectedIndex==2){$("jobLevel-agency").style.display="block";$("jobLevel-agency-select").disabled=false}else{if($("jobFunction").selectedIndex==3){$("jobLevel-raa").style.display="block";$("jobLevel-raa-select").disabled=false}else{if($("jobFunction").selectedIndex>3){$("jobLevel-others").style.display="block";$("jobLevel-others-select").disabled=false}}}}};