function showdetails(page){var showpage=page;var width=600;var height=500;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);window.open(showpage,"_blank","scrollbars=yes,fullscreen=yes,left="+left+",top="+top+",height="+height+",width="+width);}
function showwindow(page){var width=681;var height=879;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);window.open(page,"VirtuallyshowFlyer","scrollbars=1,top=1,left="+left+",height="+height+",width="+width);}
function showtourwindow(page){var width=965;var height=870;var left=(screen.width/2)-(width/2);var top=(screen.height/2)-(height/2);window.open(page,"VirtuallyshowTour","scrollbars=1,top=1,left="+left+",height="+height+",width="+width);}
var ajax=new ajaxWrapper(validateCode,ajaxError);function validate_signup(){var uname=document.getElementById('email').value;var fname=document.getElementById('fname').value;var lname=document.getElementById('lname').value;var verify=document.getElementById('security_num').value;var termschk=document.getElementById('termschk').checked;if(ValidateEMail(trim(uname))){if((trim(fname).length)==0){alert("Please enter First Name");document.getElementById('fname').focus();return false;}
if((trim(lname).length)==0){alert("Please enter Last Name");document.getElementById('lname').focus();return false;}
if((trim(verify).length)==0){alert("Please enter the code shown");document.getElementById('security_num').focus();return false;}
if(!termschk){alert("Please select Policies & Terms");return false;}
ajax.ajax_doGet("virtual-tour-signup.php","code="+document.getElementById("security_num").value+"&email="+uname);return false;}
else{alert("Please enter valid email");document.getElementById('email').focus();return false;}}
function ajaxError(err){alert(err);}
function validateCode(data){if(data==0){document.getElementById("ispostback").value=1;document.getElementById("signupform").submit();}
if(data==1){alert("This email ID is already registered. Please enter another email ID.");return false;}
if(data==2){var iframe=document.getElementById("verificationcode");iframe.src="pl2/image_verification/index.php";alert("You have typed in the wrong verification code.\n\nA new code will be displayed. Please try again.");return false;}}