var jsWin,empWin;var jsWinId='JobSeekerWin';var emWinId='EmployerWin';function OpenJsWin(a){jsWin=window.open(a,jsWinId,'width=850,height=600,status=0,toolbar=0,menubar=0,scrollbars=1,resizable=yes');if(jsWin==null||jsWin.closed)return;setCookie(jsWinId,jsWin);jsWin.focus()}function CloseJsWin(){if(jsWin==null||jsWin.closed)return;jsWin.close()}function OpenEmpWin(a){empWin=window.open(a,emWinId,'width=990,height=600,status=0,toolbar=0,menubar=0,scrollbars=1,resizable=yes');if(empWin==null||empWin.closed)return;setCookie(emWinId,empWin);empWin.focus()}function CloseEmpWin(){if(empWin==null||empWin.closed)return;empWin.close()}function CheckCloseEmp(){setTimeout("CheckCloseEmpInternal()",2000)}function CheckCloseEmpInternal(){if(empWin==null){empWin=getCookie(emWinId)}if(empWin==null||empWin.closed){ro_loadXMLDoc("/employer/Logout.jsp",null)}}function setCookie(a,b){var c=new Date();c.setDate(c.getDate()+1);document.cookie=a+"="+escape(b)+";expires="+c.toGMTString()}function getCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end))}}return""}function setEmptyOption(a,b,c){empOpt_target=document.getElementById(a);empOpt_target.length=0;empOpt_target.options[0]=new Option(b,c)}function initSelection(a,b,c){initSelection_target=document.getElementById(a);initSelection_target.length=0;initSelection_k=0;for(var d in b){initSelection_target.options[initSelection_k]=new Option(b[d],d);if(initSelection_target.options[initSelection_k].value==c)initSelection_target.options[initSelection_k].selected=true;initSelection_k++}}function selectionChange(a,b,c,d){selc_src=document.getElementById(a);selc_srcObjVal=selc_src.options[selc_src.selectedIndex].value;selc_pairs=c[selc_srcObjVal];selc_target=document.getElementById(b);selc_target.length=0;if(selc_srcObjVal==null||selc_srcObjVal==''){var o;if(c==rc_catFuncMap){o=new Option('-- Please Select Job Function --');o.value='';selc_target.options[0]=o}else{o=new Option('-- Please Select --');o.value='';selc_target.options[0]=o}return}selc_k=0;for(var e in selc_pairs){selc_target.options[selc_k]=new Option(selc_pairs[e],e);if(selc_target.options[selc_k].value==d){selc_target.options[selc_k].selected=true}selc_k++}}var state='none';function showhide(a,b,c){if(document.getElementById)if(document.getElementById(a).style.display=='')document.getElementById(a).style.display='none';else document.getElementById(a).style.display='';if(document.getElementById(b).style.display=='')document.getElementById(b).style.display='none';else document.getElementById(b).style.display='';if(document.getElementById(c).style.display=='')document.getElementById(c).style.display='none';else document.getElementById(c).style.display=''}function show(a){if(document.getElementById(a).style.display=='none')document.getElementById(a).style.display=''}function hide(a){if(document.getElementById(a).style.display=='')document.getElementById(a).style.display='none'}function Div(a,b){this.div=a;this.color=b}var previousDivs=null;function changeColor(a,b){if(previousDivs!=null){for(var i=0;i<previousDivs.length;i++){previousDivs[i].div.style.backgroundColor=previousDivs[i].color}}previousDivs=new Array();previousDivs[0]=new Div(a,a.style.backgroundColor);a.style.backgroundColor=b;for(var i=2;i<arguments.length;i++){var c=document.getElementById(arguments[i]);previousDivs[previousDivs.length]=new Div(c,c.style.backgroundColor);c.style.backgroundColor=b}}var NS4=(navigator.appName=="Netscape"&&parseInt(navigator.appVersion)<5);function addOption(a,b,c){var d=new Option(b,c);var e=a.length;a.options[e]=d}function deleteOption(a,b){var c=a.length;if(c>0){a.options[b]=null}}function moveOptions(a,b){var c=a.length;var d=new Array();var e=new Array();var f=0;var i;for(i=c-1;i>=0;i--){if(a.options[i].selected){d[f]=a.options[i].text;e[f]=a.options[i].value;deleteOption(a,i);f++}}for(i=f-1;i>=0;i--){addOption(b,d[i],e[i])}if(NS4)history.go(0)}function addRow(a){var b=document.getElementById;(a).getElementsByTagName("TBODY")[0];var c=document.createElement("TR");var d=document.createElement("TD");d.appendChild(document.createTextNode('column 1'));c.appendChild(d);b.appendChild(c)}function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i]}}}function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p)}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x}function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2]}}function MM_openBrWindow(a,b,c){window.open(a,b,c)}function viewJob(a){MM_openBrWindow('/jobseeker/JobDetail.jsp?jobOrderList='+a,'JobDetail','width=920,height=600, scrollbars=yes,status=yes')}function viewExpiredJob(a){window.alert("This job ["+a+"] is expried !");MM_openBrWindow('/jobseeker/JobDetail.jsp?jobOrderList='+a+'&jobExpired=Y','JobDetail','width=920,height=600, scrollbars=yes,status=yes')}function addRow(a){var b=document.getElementById(a).getElementsByTagName("TBODY")[0];var c=document.createElement("TR");var d=document.createElement("TD");d.appendChild(document.createTextNode('column 1'));c.appendChild(d);b.appendChild(c)}function showhide_exp(){if(document.getElementById('em1').style.display==''&&document.getElementById('em2').style.display=='none'){document.getElementById('em2').style.display='';document.getElementById('moreEmp1').style.display='';document.getElementById('moreEmp2').style.display='none'}else if(document.getElementById('em2').style.display==''&&document.getElementById('em3').style.display=='none'){document.getElementById('em3').style.display='';document.getElementById('moreEmp1').style.display='';document.getElementById('moreEmp2').style.display='none'}else if(document.getElementById('em3').style.display==''&&document.getElementById('em4').style.display=='none'){document.getElementById('em4').style.display='';document.getElementById('moreEmp1').style.display='none';document.getElementById('moreEmp2').style.display=''}else{window.alert('You have reached the maximum number of records already.')}}function showhide_edu(){if(document.getElementById('edu3').style.display==''&&document.getElementById('edu4').style.display=='none'){document.getElementById('edu4').style.display='';document.getElementById('edu5').style.display='';document.getElementById('moreEdu1').style.display='';document.getElementById('moreEdu2').style.display='none'}else if(document.getElementById('edu5').style.display==''&&document.getElementById('edu6').style.display=='none'){document.getElementById('edu6').style.display='';document.getElementById('edu7').style.display='';document.getElementById('moreEdu1').style.display='';document.getElementById('moreEdu2').style.display='none'}else if(document.getElementById('edu7').style.display==''&&document.getElementById('edu8').style.display=='none'){document.getElementById('edu8').style.display='';document.getElementById('edu9').style.display='';document.getElementById('moreEdu1').style.display='';document.getElementById('moreEdu2').style.display='none'}else if(document.getElementById('edu9').style.display==''&&document.getElementById('edu10').style.display=='none'){document.getElementById('edu10').style.display='';document.getElementById('edu11').style.display='';document.getElementById('moreEdu1').style.display='';document.getElementById('moreEdu2').style.display='none'}else if(document.getElementById('edu11').style.display==''&&document.getElementById('edu12').style.display=='none'){document.getElementById('edu12').style.display='';document.getElementById('moreEdu1').style.display='none';document.getElementById('moreEdu2').style.display=''}else{window.alert('You have reached the maximum number of records already.')}}function clearform(a){var b=document.getElementById(a);for(i=0;i<b.length;i++){var c=b.elements[i];switch(c.type){case'checkbox':c.checked=false;break;case'radio':c.checked=false;break;case'select':c.selectedIndex=0;break;case'hidden':break;default:c.value=''}}}function specialCharacterValidation(a,b){var c="!@#$%^&*()+=-[]\\\';,./{}|\":<>?";var d="1234567890";var e=document.getElementById(a);for(var i=0;i<e.value.length;i++){if(c.indexOf(e.value.charAt(i))!=-1){window.alert(b+" has special characters.\nThese are not allowed.\nPlease remove them and try again.");e.focus();return false}if(d.indexOf(e.value.charAt(i))!=-1){window.alert(b+" has number.\nThese are not allowed.\nPlease remove them and try again.");e.focus();return false}}return true}function maxCharactersValidation(a,b,c){var d=document.getElementById(a);var e=checkLength(d.value);if(e>b){window.alert(c+" has exceeded the maximum length.");d.focus();return false}return true}function maxCharactersFormValidation(a,b,c,d){var e=document.getElementsByName(b)[a];var f=checkLength(e.value);if(f>c){window.alert(d+" has exceeded the maximum length.");e.focus();return false}return true}function maxCharactersCheck(a,e,b){var c=checkLength(a.value);alert(c);if(c>=b){if(window.event){e.keyCode='\0'}else if(e.which){e.which='\0'}}}function checkLength(s){var a=encodeURI(s);if(a.indexOf("%")!=-1){var b=a.split("%").length-1;if(b==0)b++;var c=a.length-(b*3);b=b+c}else{b=a.length}return b}function isPositiveValue(a){if(isNaN(a)){return false}else{if(parseInt(a)<0){return false}}return true}function numberCompareValidation(a,b,c){var d=document.getElementById(a);var e=document.getElementById(b);var f=parseInt(d.value);var g=parseInt(e.value);if(f>g){window.alert(c);d.focus();return false}return true}function checkboxControl(a,b){selc_src=document.getElementById(a);selc_srcObjVal=selc_src.options[selc_src.selectedIndex].value;if(selc_srcObjVal=="-1"){document.getElementById(b).disabled=true}else{document.getElementById(b).disabled=false}}function initcheckboxControl(a,b){selc_src=document.getElementById(a);selc_srcObjVal=selc_src.options[selc_src.selectedIndex].value;if(selc_srcObjVal=="-1"){document.getElementById(b).disabled=true}else{document.getElementById(b).disabled=false}}function checkEmail(a){var b='@';var c='.';var d=a.indexOf(b);var e=a.length;var f=a.indexOf(c);if(a.indexOf(b)==-1)return false;if(a.indexOf(b)==-1||a.indexOf(b)==0||a.indexOf(b)==e)return false;if(a.indexOf(c)==-1||a.indexOf(c)==0||a.indexOf(c)==e)return false;if(a.indexOf(b,(d+1))!=-1)return false;if(a.substring(d-1,d)==c||a.substring(d+1,d+2)==c)return false;if(a.indexOf(c,(d+2))==-1)return false;if(a.indexOf(' ')!=-1)return false;if(a.indexOf(';')!=-1)return false;if(a.indexOf('$')!=-1)return false;if(a.indexOf('*')!=-1)return false;return true}function trim(s){return s.replace(/(^\s*)|(\s*$)/g,"")}function checkMaxLength(a,e,b){if(a.value.length>=b){if(window.event){e.keyCode='\0'}else if(e.which){e.which='\0'}}}function restrict2Number(e){if(window.event){if(e.keyCode<48||e.keyCode>57)e.keyCode='\0'}else if(e.which){if(e.which<48||e.which>57)e.which='\0'}}function checkAttach(a,b,c){var d=a.value;var e;if(!d){alert("Please select a file.");return false}while(d.indexOf("\\")!=-1){d=d.slice(d.indexOf("\\")+1)}e=d.slice(d.indexOf(".")).toLowerCase();for(var i=0;i<b.length;i++){if(b[i]==e)return true}alert("Please select the correct file type: ["+(b.join(" "))+"]. Please select a file again.");return false}function getFCKEditorValue(a){FCKeditorAPI.GetInstance(a).UpdateLinkedField();return document.getElementById(a).value}if(!objbeforeItem){var objbeforeItem=null;var objbeforeItembackgroundColor=null}function ItemOver(a){if(objbeforeItem){objbeforeItem.style.backgroundColor=objbeforeItembackgroundColor}objbeforeItembackgroundColor=a.style.backgroundColor;objbeforeItem=a;a.style.backgroundColor="#CFF0FF"}function startmenu(){menu0.style.display="none";menu1.style.display="none";menu2.style.display="none"}function menu0func(){if(menu0.style.display=="none"){startmenu();menu0.style.display="block"}else{startmenu()}}function menu1func(){if(menu1.style.display=="none"){startmenu();menu1.style.display="block"}else{startmenu()}}function menu2func(){if(menu2.style.display=="none"){startmenu();menu2.style.display="block"}else{startmenu()}}function logForClick(a,b){var o=a.split("-");if(o.length<3)return;var c="/jobseeker/rlinkz.aspx?page="+o[0]+"&section="+o[1]+"&item="+o[2]+"&url="+escape(b.href);try{var d=new ActiveXObject("Msxml2.XMLHTTP");d.open("Get",c,false);d.send()}catch(e){}}function startArticleMenu(a,b,c){var d="/images/article/but_ebook.gif";var e="/images/article/but_ebook_over.gif";var f="/images/article/but_textcontent.gif";var g="/images/article/but_textcontent_over.gif";var h="/images/article/but_highlight.gif";var i="/images/article/but_highlight_over.gif";if(c==true){menu0.style.display="none";document.getElementById("menu0Img").src=d;menu1.style.display="none";document.getElementById("menu1Img").src=f}if(a==0){if(b=="block")document.getElementById("menu0Img").src=e;else document.getElementById("menu0Img").src=d}if(a==1){if(b=="block")document.getElementById("menu1Img").src=g;else document.getElementById("menu1Img").src=f}}function articleMenu0func(){var a="/images/article/but_ebook.gif";var b="/images/article/but_ebook_over.gif";if(menu0.style.display=="none"){document.getElementById("menu0Img").src=b;menu0.style.display="block"}else{document.getElementById("menu0Img").src=a;menu0.style.display="none"}}function articleMenu1func(){var a="/images/article/but_textcontent.gif";var b="/images/article/but_textcontent_over.gif";if(menu1.style.display=="none"){document.getElementById("menu1Img").src=b;menu1.style.display="block"}else{document.getElementById("menu1Img").src=a;menu1.style.display="none"}}function articleMenu2func(){var a="/images/article/but_highlight.gif";var b="/images/article/but_highlight_over.gif";if(menu2.style.display=="none"){document.getElementById("menu2Img").src=b;menu2.style.display="block"}else{document.getElementById("menu2Img").src=a;menu2.style.display="none"}}function Change_JobSearchResultGV_BgColor(a){if(objbeforeItem){objbeforeItem.style.backgroundColor=objbeforeItembackgroundColor}objbeforeItembackgroundColor=a.style.backgroundColor;objbeforeItem=a;a.style.backgroundColor="#FAFAFA"}function refreshUploader(a){var b=document.getElementsByName(a)[0];var c=b.cloneNode(false);c.onchange=b.onchange;b.parentNode.replaceChild(c,b)}function GetFileNameFormFullPath(a){var b=a.lastIndexOf(a.charAt(a.indexOf(":")+1));var c=(b==0)?a:a.substring(b+1);return c}function HtmlEncode(s){var a=document.createElement("div");a.innerText=a.textContent=s;s=a.innerHTML;delete a;return s;}
