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,func){var old=e.onclick;if(typeof old!="function"){e.onclick=func;}else{e.onclick=function(){if(old){old();}func();};}}function showWhenSelected(src,b,_427){var v=src.checked&&b||!src.checked&&!b;_427.style.display=(v?"":"none");}function initShowWhenSelected(src,b,_42b){addClickEvent(src,function(){showWhenSelected(src,b,_42b);});showWhenSelected(src,b,_42b);}function enableWhenSelected(src,b,_42e){var v=src.checked&&b||!src.checked&&!b;rc_dis(_42e,!v);}function initEnableWhenSelected(src,b,_432,_433){var f;if(_432 instanceof Array){f=function(){for(var i=0;i<_432.length;i++){enableWhenSelected(src,b,gid(_432[i]));}};}else{f=function(){enableWhenSelected(src,b,_432);};}addClickEvent(src,f);if(!_433){f.call();}}function trim(s){if(s!=null){var _437=/^(\s*)$/;if(_437.test(s)){s=s.replace(_437,"");if(s.length==0){return s;}}_437=/^(\s*)([\W\w]*)(\b\s*$)/;if(_437.test(s)){s=s.replace(_437,"$2");}}return s;}function showError(eid,b,m){var e=gid(eid);e.style.display=b?"none":"block";e.innerHTML=b?"":m;}function requireOneSelected(cont){var is=cont.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(cont){if(cont.type=="checkbox"||cont.typ=="radio"){if(cont.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,_447,end){if(isIE()){var cs=countStr(e.value.substring(0,_447),"\n");var ce=countStr(e.value.substring(_447,end),"\n");var _44b=e.createTextRange();_44b.collapse(true);_44b.moveStart("character",_447-cs);_44b.moveEnd("character",end-_447-ce);_44b.select();}else{e.setSelectionRange(_447,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,_455,ifID){if(isIE()){var w=gid(wID);var fs=gid(_455).style;var cs=w.style;var ifs=gid(ifID).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,ifID){if(isIE()){var w=gid(wID);var cs=w.currentStyle;var ifs=gid(ifID).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 _461=0;if(obj.offsetParent){while(obj.offsetParent){_461+=obj.offsetLeft;obj=obj.offsetParent;}}else{if(obj.x){_461+=obj.x;}}return _461;}function findPosY(obj){var _463=0;if(obj.offsetParent){while(obj.offsetParent){_463+=obj.offsetTop;obj=obj.offsetParent;}}else{if(obj.y){_463+=obj.y;}}return _463;}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 _469=c.clientHeight;if(_469+top>h){c.style.height=(h-top)+"px";}}function doTiming(_46a,_46b,msg){var m="";if(msg){m+=msg+"\n";}alert(m+(_46b-_46a)+" 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 _474=r.split("~");var u="";for(i=0;i<_474.length-1;i++){u+="&#x"+z[_474[i].length-1]+_474[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 _47b=gid("att_"+ef.id).value!="0";ctxDisItems(this.hasPlaceholder(),this.selText!=null,_47b);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 _47e=str.indexOf(this.placeholderStart);return (_47e>-1&&str.indexOf(this.placeholderEnd,_47e)>-1);};SelectCtx.prototype.textSelection=function(e){this.selText=null;calcSelection(e);if(!isIE()){var _480=countStr(e.value.substring(0,e.selectionStart),"\n");this.selStart=e.selectionStart+_480;var _481=countStr(e.value.substring(0,e.selectionEnd+_480),"\n");this.selEnd=e.selectionEnd+_481;}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 _489=e.parentNode.parentNode.childNodes;for(var i=0;i<_489.length;i++){node=_489[i];if(node.className=="jobresultfull"){node.style.display="block";e.parentNode.style.display="none";}}return false;}function jobresult_less(e){var _48c=e.parentNode.parentNode.parentNode.childNodes;for(var i=0;i<_48c.length;i++){node=_48c[i];if(node.className=="jobresultshort"){node.style.display="block";e.parentNode.parentNode.style.display="none";}}return false;}function fieldhint2(e,b){var _490=e.parentNode.childNodes;for(var i=0;i<_490.length;i++){node=_490[i];if(node.className=="fieldhint2"){node.style.display=(b?"inline":"none");}}}function setHints2(){var divs=document.getElementsByTagName("span");for(var j=0;j<divs.length;j++){if(divs[j].className=="fieldhint2"){var _494=divs[j].parentNode.childNodes;for(var i=0;i<_494.length;i++){node=_494[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;}