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,_22){var old=e.onclick;if(typeof old!="function"){e.onclick=_22;}else{e.onclick=function(){if(old){old();}_22();};}}var Util={selectOption:function(e,val){if(e.options){for(var i=0;i<e.options.length;i++){if(e.options[i].value==val){e.options[i].selected=true;}}}}};function showWhenSelected(src,b,_29){var v=src.checked&&b||!src.checked&&!b;_29.style.display=(v?"":"none");}function initShowWhenSelected(src,b,_2d){addClickEvent(src,function(){showWhenSelected(src,b,_2d);});showWhenSelected(src,b,_2d);}function enableWhenSelected(src,b,_30){var v=src.checked&&b||!src.checked&&!b;rc_dis(_30,!v);}function initEnableWhenSelected(src,b,_34,_35){var f;if(_34 instanceof Array){f=function(){for(var i=0;i<_34.length;i++){enableWhenSelected(src,b,gid(_34[i]));}};}else{f=function(){enableWhenSelected(src,b,_34);};}addClickEvent(src,f);if(!_35){f.call();}}function trim(s){if(s!=null){var _39=/^(\s*)$/;if(_39.test(s)){s=s.replace(_39,"");if(s.length==0){return s;}}_39=/^(\s*)([\W\w]*)(\b\s*$)/;if(_39.test(s)){s=s.replace(_39,"$2");}}return s;}function showError(eid,b,m){var e=gid(eid);e.style.display=b?"none":"block";e.innerHTML=b?"":m;}function requireOneSelected(_3e){var is=_3e.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(_42){if(_42.type=="checkbox"||_42.typ=="radio"){if(_42.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,_49,end){if(isIE()){var cs=countStr(e.value.substring(0,_49),"\n");var ce=countStr(e.value.substring(_49,end),"\n");var _4d=e.createTextRange();_4d.collapse(true);_4d.moveStart("character",_49-cs);_4d.moveEnd("character",end-_49-ce);_4d.select();}else{e.setSelectionRange(_49,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,_57,_58){if(isIE()){var w=gid(wID);var fs=gid(_57).style;var cs=w.style;var ifs=gid(_58).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,_5e){if(isIE()){var w=gid(wID);var cs=w.currentStyle;var ifs=gid(_5e).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 _63=0;if(obj.offsetParent){while(obj.offsetParent){_63+=obj.offsetLeft;obj=obj.offsetParent;}}else{if(obj.x){_63+=obj.x;}}return _63;}function findPosY(obj){var _65=0;if(obj.offsetParent){while(obj.offsetParent){_65+=obj.offsetTop;obj=obj.offsetParent;}}else{if(obj.y){_65+=obj.y;}}return _65;}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 _6b=c.clientHeight;if(_6b+top>h){c.style.height=(h-top)+"px";}}function doTiming(_6c,_6d,msg){var m="";if(msg){m+=msg+"\n";}alert(m+(_6d-_6c)+" 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 _76=r.split("~");var u="";for(i=0;i<_76.length-1;i++){u+="&#x"+z[_76[i].length-1]+_76[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 _7d=gid("att_"+ef.id).value!="0";ctxDisItems(this.hasPlaceholder(),this.selText!=null,_7d);e=getEvent(e);this.ctx.showMenu(e.clientX,e.clientY-105);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 _80=str.indexOf(this.placeholderStart);return (_80>-1&&str.indexOf(this.placeholderEnd,_80)>-1);};SelectCtx.prototype.textSelection=function(e){this.selText=null;calcSelection(e);if(!isIE()){var _82=countStr(e.value.substring(0,e.selectionStart),"\n");this.selStart=e.selectionStart+_82;var _83=countStr(e.value.substring(0,e.selectionEnd+_82),"\n");this.selEnd=e.selectionEnd+_83;}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 _8b=e.parentNode.parentNode.childNodes;for(var i=0;i<_8b.length;i++){node=_8b[i];if(node.className=="jobresultfull"){node.style.display="block";e.parentNode.style.display="none";}}return false;}function jobresult_less(e){var _8e=e.parentNode.parentNode.parentNode.childNodes;for(var i=0;i<_8e.length;i++){node=_8e[i];if(node.className=="jobresultshort"){node.style.display="block";e.parentNode.parentNode.style.display="none";}}return false;}function fieldhint2(e,b){var _92=e.parentNode.childNodes;for(var i=0;i<_92.length;i++){node=_92[i];if(node.className=="fieldhint2"){node.style.display=(b?"inline":"none");}}}function setHints2(){var _94=document.getElementsByTagName("span");for(var j=0;j<_94.length;j++){if(_94[j].className=="fieldhint2"){var _96=_94[j].parentNode.childNodes;for(var i=0;i<_96.length;i++){node=_96[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 _9f=v.substring(0,p+1);var _a0=v.substr(p+1);var _a1=_9f.lastIndexOf(LinkUtil.phStart);var _a2=_9f.lastIndexOf(LinkUtil.phEnd);if(_a1>-1&&_a2<_a1){return true;}if(_a1==p||_a2==p){return true;}var _a3=v.indexOf(LinkUtil.phStart,p+1);var _a4=v.indexOf(LinkUtil.phEnd,p+1);if(_a4>p&&(_a3==-1||_a3>_a4)){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;}};
