var tmpLnk="http://www.vafinancials.com/v5/";var tmpPre="http://www.vafinancials.com/v5/vcas/";var tmpRimg="http://www.vafinancials.com/v5/vcas/images/ranks/";var tmpFimg="http://www.vafinancials.com/v5/vcas/images/flags/";var tmpPCPre="http://www.vafinancials.com/v5/pilotcenter/";var tmpPCimg="http://www.vafinancials.com/v5/pilotcenter/images/";$(document).ready(function(){$("#actloader").hide();$("#loginimg").mouseover(function(){$(this).attr('src','images/login2.png')});$("#loginimg").mouseout(function(){$(this).attr('src','images/login1.png')});$("#lnk_index").click(function(){window.location="index.php"});$("#lnk_features").click(function(){window.location="features.php"});$("#lnk_signup").click(function(){window.location="signup.php"});$("#lnk_profiles").click(function(){window.location="profiles.php"});$("#lnk_market").click(function(){window.location="stockmarket.php"});$("#lnk_support").click(function(){window.location="support.php"});$("#lnk_forums").click(function(){window.location="http://www.myvafinancials.com/v5/index.php"});$("#lnk_vcas").click(function(){window.location="vcas_login.php"});$("#lnk_pcenter").click(function(){window.location="pcenter_login.php"});$("#lsubprice").click(function(){closeAllDivs();$("#subprices").show()});$("#lstart").click(function(){closeAllDivs();$("#howstart").show()});$("#lflymore").click(function(){closeAllDivs();$("#flymore").show()});$("#lsysreq").click(function(){closeAllDivs();$("#sysreq").show()});$("#ltos").click(function(){closeAllDivs();$("#tos").show()});$("#cmdVCASLogin").click(function(){if($("#user").val()==""){$("#logerr").html("Please enter a username.");$("#logerr").show()}else if($("#pass").val()==""){$("#logerr").html("Please enter a password.");$("#logerr").show()}else{$("#loginldr").show();$.post(tmpPre+"includes/do_login.php",{user:$("#user").val(),pass:$("#pass").val()},function(data){if(data==1){window.location="./vcas/index.php"}else{$('#loginldr').hide();$("#logerr").html(data);$("#logerr").show()}})}});$("#cmdPCenterLogin").click(function(){if($("#user").val()==""){$("#logerr").html("Please enter a username.");$("#logerr").show()}else if($("#pass").val()==""){$("#logerr").html("Please enter a password.");$("#logerr").show()}else{$("#loginldr").show();$.post(tmpPCPre+"includes/do_login.php",{user:$("#user").val(),pass:$("#pass").val()},function(data){if(data==1){window.location="./pilotcenter/index.php"}else{$('#loginldr').hide();$("#logerr").html(data);$("#logerr").show()}})}});$("#cmdForgotPass").click(function(){$("#lgn_pcenter").hide();$("#lgn_forgot").show()});$("#cmdDoForgot").click(function(){if($("#pemail").val()==""){alert("You must enter your pilot email address")}else{$("#forgotldr").show();$.post(tmpLnk+"includes/do_forgot.php",{pemail:$("#pemail").val()},function(data){if(data==11){$("#forgoterr").text("An email has been sent to your email address with your credentials.");$("#forgoterr").show();$("#forgotldr").hide()}else if(data==2){$("#forgoterr").text("Could not find an account with that email address.");$("#forgoterr").show();$("#forgotldr").hide()}else{$('#forgotldr').hide();$("#forgoterr").html(data);$("#forgoterr").show()}})}});$("#cmdActivate").click(function(){$("#actloader").show();$("#suser").hide();$("#spass1").hide();$("#spass2").hide();var newuser=$("#actuser").val();var newpass=$("#actpass1").val();if(newuser.indexOf(" ")!=-1){$("#suser").text("No Spaces Allowed.");$("#suser").show()}else if(newpass.indexOf(" ")!=-1){$("#spass1").text("No Spaces Allowed!");$("#spass1").show()}else if($("#actuser").val()==""){$("#suser").text("Enter A Username!");$("#suser").show()}else if($("#actpass1").val()==""){$("#spass1").text("Enter A Password!");$("#spass1").show()}else if($("#actpass1").val()!=$("#actpass2").val()){$("#spass2").text("Your Passwords Must Match!");$("#spass2").show()}else{$.post(tmpLnk+"includes/do_activation.php",{ac:acode,user:$("#actuser").val(),pass:$("#actpass1").val()},function(data){if(data==1){$("#tbl_activation").hide();$("#pun").text($("#actuser").val());$("#pas").text($("#actpass1").val());$("#tbl_activation_complete").show()}else if(data==2){$("#suser").text("Username Is Already Taken!");$("#suser").show()}else{$('#actloader').hide();$("#suser").html(data);$("#suser").show()}})}$("#actloader").hide()})});function closeAllDivs(){$("#maintext").hide();$("#subprices").hide();$("#howstart").hide();$("#flymore").hide();$("#sysreq").hide();$("#tos").hide()}
