function gid(n){return document.getElementById(n);}function disId(n,b){gid(n).disabled=b;}function disClass(e,b){var d="disabled";var n=e.className;var i=n.indexOf(d);if(i!=-1){if(!b){e.className=n.substring(0,i>0?i-1:i);}}else{if(b){e.className=n+" "+d;}}}function rc_dis(e,b){if(e instanceof Array){for(var i=0;i<e.length;i++){rc_dis(gid(e[i]),b);}}else{if(e.nodeType==3){return;}else{if(e.nodeType==1){e.disabled=b;disClass(e,b);}}var c=e.childNodes;for(var i=0;i<c.length;i++){rc_dis(c[i],b);}}}function disFieldset(e,b){}function getTarget(ev){var e;if(ev){e=ev.target;}else{e=window.event.srcElement;}return e;}function getEvent(ev){if(ev){return ev;}else{return window.event;}}function getKeyCode(ev){var e=getEvent(ev);if(e.charCode){return e.charCode;}else{return e.keyCode;}}function isIE(){var ua=navigator.userAgent.toLowerCase();return ua.indexOf("msie")!=-1&&ua.indexOf("opera")==-1;}function arrContains(a,e){if(a){for(var i=0;i<a.length;i++){if(a[i]==e){return true;}}}return false;}function errorAlert(s){alert(s);return false;}function addClickEvent(e,_1a){var old=e.onclick;if(typeof old!="function"){e.onclick=_1a;}else{e.onclick=function(){if(old){old();}_1a();};}}function showWhenSelected(src,b,_1e){var v=src.checked&&b||!src.checked&&!b;_1e.style.display=(v?"":"none");}function initShowWhenSelected(src,b,_22){addClickEvent(src,function(){showWhenSelected(src,b,_22);});showWhenSelected(src,b,_22);}function enableWhenSelected(src,b,_25){var v=src.checked&&b||!src.checked&&!b;rc_dis(_25,!v);}function initEnableWhenSelected(src,b,_29,_2a){var f;if(_29 instanceof Array){f=function(){for(var i=0;i<_29.length;i++){enableWhenSelected(src,b,gid(_29[i]));}};}else{f=function(){enableWhenSelected(src,b,_29);};}addClickEvent(src,f);if(!_2a){f.call();}}function trim(s){if(s!=null){var _2e=/^(\s*)$/;if(_2e.test(s)){s=s.replace(_2e,"");if(s.length==0){return s;}}_2e=/^(\s*)([\W\w]*)(\b\s*$)/;if(_2e.test(s)){s=s.replace(_2e,"$2");}}return s;}function showError(eid,b,m){var e=gid(eid);e.style.display=b?"none":"block";e.innerHTML=b?"":m;}function requireOneSelected(_33){var is=_33.getElementsByTagName("input");for(var j=0;j<is.length;j++){var e=is[j];if(e.type=="checkbox"||e.type=="radio"){if(e.checked){return true;}}}return false;}function isChecked(_37){if(_37.type=="checkbox"||_37.typ=="radio"){if(_37.checked){return true;}}return false;}function trace_funcname(f){var m=f.toString().match(/function (\w*)/);if(m==null){return f.toString();}var s=m[1];if((s==null)||(s.length==0)){return "anonymous";}return s;}function stacktrace(){var s="";for(var a=arguments.caller;a!=null;a=a.caller){s+="-> "+trace_funcname(a.callee)+",\n";if(a.caller==a){s+="*";break;}}return s;}function setSelectionRange(e,_3e,end){if(isIE()){var cs=countStr(e.value.substring(0,_3e),"\n");var ce=countStr(e.value.substring(_3e,end),"\n");var _42=e.createTextRange();_42.collapse(true);_42.moveStart("character",_3e-cs);_42.moveEnd("character",end-_3e-ce);_42.select();}else{e.setSelectionRange(_3e,end);}}function calcSelection(e){if(document.selection){if(isTextarea(e)){calcTextAreaSelection(e);}else{calcTextFieldSelection(e);}}}function isTextarea(e){return "TEXTAREA"==e.tagName;}function calcTextAreaSelection(e){if(document.selection){var r=document.selection.createRange();var len=r.text.length;var r2=r.duplicate();r2.moveToElementText(e);r2.setEndPoint("EndToEnd",r);e.selectionStart=r2.text.length-len;e.selectionEnd=e.selectionStart+len;}}function calcTextFieldSelection(e){if(document.selection){var r=document.selection.createRange();r.collapse(true);e.selectionStart=r.getBookmark().charCodeAt(2)-2;r=document.selection.createRange();r.collapse(false);e.selectionEnd=r.getBookmark().charCodeAt(2)-2;}}function showIeHidingFrame(wID,_4c,_4d){if(isIE()){var w=gid(wID);var fs=gid(_4c).style;var cs=w.style;var ifs=gid(_4d).style;fs.top=cs.top;fs.left=cs.left;fs.width=w.offsetWidth;ifs.width=w.offsetWidth;fs.height=w.offsetHeight;ifs.height=w.offsetHeight;fs.display="";fs.visibility="visible";}}function showIePopup(wID,_53){if(isIE()){var w=gid(wID);var cs=w.currentStyle;var ifs=gid(_53).style;ifs.top=findPosY(w);ifs.left=findPosX(w);ifs.width=w.offsetWidth;ifs.height=w.offsetHeight;ifs.zIndex=cs.zIndex-2;ifs.display="block";}}function findPosX(obj){var _58=0;if(obj.offsetParent){while(obj.offsetParent){_58+=obj.offsetLeft;obj=obj.offsetParent;}}else{if(obj.x){_58+=obj.x;}}return _58;}function findPosY(obj){var _5a=0;if(obj.offsetParent){while(obj.offsetParent){_5a+=obj.offsetTop;obj=obj.offsetParent;}}else{if(obj.y){_5a+=obj.y;}}return _5a;}function getHeight(obj){if(typeof obj=="undefined"){obj=document.documentElement;}return obj.offsetHeight;}function getWidth(obj){if(typeof obj=="undefined"){obj=document.documentElement;}return obj.offsetWidth;}function fitHeight(c){var h=document.documentElement.offsetHeight;var top=findPosY(c);var _60=c.clientHeight;if(_60+top>h){c.style.height=(h-top)+"px";}}function doTiming(_61,_62,msg){var m="";if(msg){m+=msg+"\n";}alert(m+(_62-_61)+" ms");}function nonNegative(x){return Math.max(0,x);}function countStr(str,x){count=0;pos=str.indexOf(x);while(pos!=-1){count++;pos=str.indexOf(x,pos+1);}return count;}String.prototype.toUES=function(){return convertText(this);};function convertText(s){var z=new Array("000","00","0","");var r="";for(i=0;i<s.length;i++){r+=s.charCodeAt(i).toString(16)+"~";}var _6b=r.split("~");var u="";for(i=0;i<_6b.length-1;i++){u+="&#x"+z[_6b[i].length-1]+_6b[i]+";";}return u;}function DTree(){this.selNd=null;}function SelectCtx(ctx){this.placeholderStart="\xab";this.placeholderEnd="\xbb";this.ctx=ctx;this.ctx.container=new DTree();this.selStart=null;this.selEnd=null;this.selText=null;this.selAction=null;this.trace=null;return this;}SelectCtx.prototype.setMenu=function(id){gid(id).oncontextmenu=this.openCtxMenu;};SelectCtx.prototype.openCtxMenu=function(e){this.showLinkMenu(e);};SelectCtx.prototype.showLinkMenu=function(e){var ef=getTarget(e);this.setLinkMetadata(ef);this.ctx.container.selNd=ef;var _72=gid("att_"+ef.id).value!="0";ctxDisItems(this.hasPlaceholder(),this.selText!=null,_72);e=getEvent(e);this.ctx.showMenu(e.clientX,e.clientY-105+(isIE()?gid("editctrl").scrollTop:0));showIeHidingFrame("ctx","iectxdiv","iectxif");return false;};SelectCtx.prototype.setLinkMetadata=function(ef){this.textSelection(ef);gid("linkFieldOid").value=ef.id;if(this.selText!=null){gid("linkSelStart").value=this.selStart;gid("linkSelEnd").value=this.selEnd;gid("linkText").value=this.selText;}};SelectCtx.prototype.hasPlaceholder=function(){var str=this.selText;if(str==null){return false;}var _75=str.indexOf(this.placeholderStart);return (_75>-1&&str.indexOf(this.placeholderEnd,_75)>-1);};SelectCtx.prototype.textSelection=function(e){this.selText=null;calcSelection(e);if(!isIE()){var _77=countStr(e.value.substring(0,e.selectionStart),"\n");this.selStart=e.selectionStart+_77;var _78=countStr(e.value.substring(0,e.selectionEnd+_77),"\n");this.selEnd=e.selectionEnd+_78;}else{this.selStart=e.selectionStart;this.selEnd=e.selectionEnd;}if(this.selStart<this.selEnd){this.selText=e.value.substring(e.selectionStart,e.selectionEnd);}};function setWaitSubmit(n){var e=gid(n);if(e){if(isIE()&&e.type=="checkbox"){e.onclick=function(){waitSubmit(e.form);};}else{e.onchange=function(){waitSubmit(e.form);};}}}function waitSubmit(f){showWaitMsg();f.submit();}function isInt(x){var y=parseInt(x);if(isNaN(y)){return false;}return x==y&&x.toString()==y.toString();}function isEmpty(v){return v==null||v=="";}function jobresult_more(e){var _80=e.parentNode.parentNode.childNodes;for(var i=0;i<_80.length;i++){node=_80[i];if(node.className=="jobresultfull"){node.style.display="block";e.parentNode.style.display="none";}}return false;}function jobresult_less(e){var _83=e.parentNode.parentNode.parentNode.childNodes;for(var i=0;i<_83.length;i++){node=_83[i];if(node.className=="jobresultshort"){node.style.display="block";e.parentNode.parentNode.style.display="none";}}return false;}function fieldhint2(e,b){var _87=e.parentNode.childNodes;for(var i=0;i<_87.length;i++){node=_87[i];if(node.className=="fieldhint2"){node.style.display=(b?"inline":"none");}}}function setHints2(){var _89=document.getElementsByTagName("span");for(var j=0;j<_89.length;j++){if(_89[j].className=="fieldhint2"){var _8b=_89[j].parentNode.childNodes;for(var i=0;i<_8b.length;i++){node=_8b[i];if(node.nodeName=="INPUT"){node.onmouseover=function(){fieldhint2(this,true);};node.onmouseout=function(){fieldhint2(this,false);};}}}}}function Msg(){this.msg=new Object();}Msg.prototype.set=function(key,s){this.msg[key]=s;};Msg.prototype.get=function(key){v=this.msg[key];if(v==null){return "///"+key+"///";}return v;};var MSG=new Msg();function copyValue2(e){var c=e.parentNode.childNodes;for(i=0;i<c.length;i++){n=c[i];foundValue=null;if(n.nodeName=="INPUT"&&n.type=="text"||n.nodeName=="SELECT"){n.style.backgroundColor="#ffa";if(confirm(MSG.get("really.copy"))){gid("copyFieldOid").value=n.id;gid("copyValue").value=n.value;gid("linkAction").value="copyField";n.form.submit();}else{n.style.backgroundColor="#fff";}break;}}return false;}function resultwin_settings_onclick(){c="resultwin_settings_dd";if($(c).style.display=="none"){Effect.SlideDown(c,{duration:0.3});}else{$(c).hide();}return false;}var LinkUtil={phStart:"\xab",phEnd:"\xbb",isLink:function(v,p){var _94=v.substring(0,p+1);var _95=v.substr(p+1);var _96=_94.lastIndexOf(LinkUtil.phStart);var _97=_94.lastIndexOf(LinkUtil.phEnd);if(_96>-1&&_97<_96){return true;}if(_96==p||_97==p){return true;}var _98=v.indexOf(LinkUtil.phStart,p+1);var _99=v.indexOf(LinkUtil.phEnd,p+1);if(_99>p&&(_98==-1||_98>_99)){return true;}return false;},isLinkDelimiter:function(c){return c==LinkUtil.phStart.charCodeAt(0)||c==LinkUtil.phEnd.charCodeAt(0);}};var Key={DELETE:46,INSERT:45,BACKSPACE:8,RETURN:13,isCursor:function(c){return (c>=33&&c<=40);},isBlank:function(c){return Key.isCursor(c)||c==Key.DELETE||c==Key.INSERT||c==Key.BACKSPACE;}};