var digits="0123456789";var phoneNumberDelimiters="()- ";var validWorldPhoneChars=phoneNumberDelimiters+"+";var minDigitsInIPhoneNumber=10;function ttrim(A){return A=A.replace(/^\s+|\s+$/g,"")}function isValidEmail(A){var B=/^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/;return B.test(A)}function isInteger(B){var A;for(A=0;A<B.length;A++){var C=B.charAt(A);if(((C<"0")||(C>"9"))){return false}}return true}function stripCharsInBag(C,D){var B;var A="";for(B=0;B<C.length;B++){var E=C.charAt(B);if(D.indexOf(E)==-1){A+=E}}return A}function checkInternationalPhone(A){if(A==""){return true}s=stripCharsInBag(A,validWorldPhoneChars);return(isInteger(s)&&s.length>=minDigitsInIPhoneNumber)}function form_validation(B){var A="";B.email_address.className="js-infoinputxt";B.confirm_email_address.className="js-infoinputxt";B.first_name.className="js-infoinputxt";B.last_name.className="js-infoinputxt";B.password.className="js-infoinputxt";B.phone_number.className="js-infoinputxt";B.mobile_number.className="js-infoinputxt";B.current_location.className="js-infoinputxt";B.current_location_other.className="js-infoinputxt";B.security_code.className="js-infoinputxt";if(ttrim(B.email_address.value)==""){A+="Please enter your email address.<br>";B.email_address.className="js-errorinputtxt"}else{if(!isValidEmail(ttrim(B.email_address.value))){A+="Please enter a valid email address.<br>";B.email_address.className="js-errorinputtxt"}else{if(ttrim(B.confirm_email_address.value)==""){A+="Please re-enter your email address.<br>";B.confirm_email_address.className="js-errorinputtxt"}else{if(ttrim(B.confirm_email_address.value)!=ttrim(B.email_address.value)){A+="Email addresses do not match. Please re-enter your email address.<br>";B.email_address.className="js-errorinputtxt";B.confirm_email_address.className="js-errorinputtxt"}}}}if(ttrim(B.password.value)==""){A+="Please enter your password.<br>";B.password.className="js-errorinputtxt"}else{if(B.password.value.length<6){A+="Password must be at least 6 characters.<br>";B.password.className="js-errorinputtxt"}else{if(B.password.value.length>20){A+="Password cannot be more than 20 characters long.<br>";B.password.className="js-errorinputtxt"}else{if(B.password.value!=B.confirm_password.value){A+="Passwords do not match. Please confirm your password.<br>";B.password.className="js-errorinputtxt"}}}}if(ttrim(B.first_name.value)==""){A+="Please enter your first name.<br>";B.first_name.className="js-errorinputtxt"}if(ttrim(B.last_name.value)==""){A+="Please enter your last name.<br>";B.last_name.className="js-errorinputtxt"}if(ttrim(B.mobile_number.value)==""&&ttrim(B.phone_number.value)==""){A+="Please enter atleast one of phone/mobile number.<br>";B.mobile_number.className="js-errorinputtxt";B.phone_number.className="js-errorinputtxt"}else{if(checkInternationalPhone(ttrim(B.phone_number.value))==false){A+="Please enter a valid phone/mobile number.<br>";B.phone_number.className="js-errorinputtxt"}else{if(checkInternationalPhone(ttrim(B.mobile_number.value))==false){A+="Please enter a valid phone/mobile number.<br>";B.mobile_number.className="js-errorinputtxt"}}}if(B.current_location.selectedIndex==0){A+="Please select your current location.<br>";B.current_location.className="js-errorinputtxt"}else{if((B.current_location.value==157||B.current_location.value==201)&&ttrim(B.current_location_other.value)==""){A+="Please enter your current location.<br>";B.current_location_other.className="js-errorinputtxt"}}if(ttrim(B.security_code.value)==""&&A==""){A="Please enter the security code.<br>";B.security_code.className="js-errorinputtxt"}if(B.terms_conditions.checked==false&&A==""){A="Submitting this form means you have read and agreed with our terms of service, kindly check the box below to proceed."}if(A!=""){var C=document.getElementById("error_pane");C.innerHTML="<table width='70%' align='center' style='border:solid 1px #990000;' cellspacing='0' cellpadding='0'><tr><td style='background-color: #990000;color: #FFFFFF;font: bold 12px verdana, arial, sans-serif;padding: 5px 5px 5px 5px;'>Please correct these errors</td></tr><tr><td style='color: #000000; font: 11px verdana, arial, sans-serif;padding: 5px 5px 5px 5px'>"+A+"</td></tr></table>";window.location.hash="errordiv";return false}return true}var currentLocationOther="";function disable_others(A){if(A.current_location.value==157||A.current_location.value==201){A.current_location_other.value=currentLocationOther;A.current_location_other.disabled=false}else{currentLocationOther=A.current_location_other.value;A.current_location_other.value="";A.current_location_other.disabled=true}}function purl(B){var A=B;window.open(A,"popupWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=660,height=550,screenX=5,screenY=5,top=5,left=5")}function SaveContinueSubmit(A){if(form_validation(A)==true){document.edit_account.action="seekers_register_step1.php?Save_Continue=SaveContinue";document.edit_account.submit()}return false}function terms_popup(){var A="seeker_terms_popup.php";window.open(A,"popupWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=720,height=600")};