var ajax=new ajaxWrapper(validateCode,ajaxError);function validate_forgot(){var uname=document.getElementById('uname').value;var verify=document.getElementById('security_num').value;if((trim(uname).length)==0){alert("Please enter User name");document.getElementById('uname').focus();return false;}
if((trim(verify).length)==0){alert("Please enter the code shown");document.getElementById('security_num').focus();return false;}
else{ajax.ajax_doGet("virtual-tour-forgot.php","code="+document.getElementById("security_num").value+"&email="+uname);return false;}}
function ajaxError(err){alert(err);}
function validateCode(data){if(data==0){document.getElementById("ispostback").value=1;document.getElementById("forgotform").submit();}
if(data==1){alert("Invalid Username");return false;}
if(data==2){alert("Please verify the code");return false;}}