var RecaptchaOptions={theme:"clean"};$(function(){$(".password").pstrength()});var error_flag_registration=0;var error_email=0;var error_username=0;var ajx_response_username;var ajx_response_email;$(function(){$("#username").blur(function(){$("#usernameLoading").show();$.post("check.php",{username:$("#username").val()},function(a){ajx_response_username=a;if(a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Username Unavailable</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Minimum 2 characters</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Username Empty</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;spaces not allowed</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Should start with Alphabet</span>"){error_username=1}else{error_username=0}setTimeout("finishAjax('showError', '"+escape(a)+"')",400)});return false});$("#email").blur(function(){$.post("checkEmail.php",{email:$("#email").val()},function(a){ajx_response_email=a;if(a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Email already Registred.</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Minimum 2 characters</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Invalid email</span>"||a=="<span class='errorClass'><img src='images/ico_cross_org.gif'>&nbsp;Email empty</span>"){error_email=1}else{error_email=0}setTimeout("finishAjax('showError5', '"+escape(a)+"')",40)});return false});$("#p1").blur(function(){if($("#p1").val()==""){$(".showError2").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Password Required</span>')}else{$(".showError2").html('<img src="images/ico_check_blu.gif" >')}});$("#p2").blur(function(){if($("#p2").val()==""){$(".showError3").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Password Required</span>')}if($("#p1").val()!=""){if($("#p1").val()!=$("#p2").val()){$(".showError3").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Passwords not match</span>')}else{$(".showError3").html('<img src="images/ico_check_blu.gif" >')}}});$("#name").blur(function(){if($("#name").val()==""){$(".showError4").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Name required</span>')}if($("#name").val()!=""){$(".showError4").html('<img src="images/ico_check_blu.gif" >')}});$("#p2").keyup(function(){var b=$("#p1").val();var a=$("#p2").val();if($("#p1").val()!=""){if(b.length==a.length){if($("#p1").val()!=$("#p2").val()){$(".showError3").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Passwords not match</span>')}else{$(".showError3").html('<img src="images/ico_check_blu.gif" >')}}}});$("#confirm_email").blur(function(){if($("#confirm_email").val()==""){$(".showError7").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Email Required</span>')}else{if($("#email").val()!=""){if($("#email").val()!=$("#confirm_email").val()){$(".showError7").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Emails do not match</span>')}else{$(".showError7").html('<img src="images/ico_check_blu.gif" >')}}}})});function finishAjax(b,a){$("."+b).html(unescape(a));$("#"+b).fadeIn()}function form_chk(d){var c=0;var b="";if(d.username.value==""){$(".showError").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Username Required</span>');c=1}else{$("#right_img_username").show();$(".showError").html(ajx_response_username);document.getElementById("username").style.border=""}if(error_username==1){c=1;$(".showError").html(ajx_response_username)}if(d.password1.value==""){$(".showError2").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Password Required</span>');c=1}else{$(".showError2").html('<img src="images/ico_check_blu.gif" >');document.getElementById("p1").style.border=" 2px solid #FFFFFF"}if(d.cpassword.value==""){c=1;$(".showError3").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Password Required</span>')}else{if(d.password1.value!=d.cpassword.value){$(".showError3").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Passwords not match</span>');c=1}else{$(".showError3").html('<img src="images/ico_check_blu.gif" >');document.getElementById("p2").style.border=""}}if(d.confirm_email.value==""){c=1;$(".showError7").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Email Required</span>')}else{if(d.email.value!=d.confirm_email.value){$(".showError7").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Emails not match</span>');c=1}else{$(".showError7").html('<img src="images/ico_check_blu.gif" >');document.getElementById("p2").style.border=""}}if(d.name.value==""){c=1;$(".showError4").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Name Required</span>')}else{$(".showError4").html('<img src="images/ico_check_blu.gif" >');document.getElementById("name").style.border=" 1px solid #FFFFFF"}if(d.email.value==""){c=1;$(".showError5").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Email Required</span>')}if(error_email==1){c=1;$(".showError5").html(ajx_response_email)}var a=d.email.value.indexOf("@");var e=d.email.value.lastIndexOf(".");if(a<1||e-a<2){b+="<span > Email is invalid.</span>";c=1}if($("#recaptcha_response_field").val()==""){c=1;$("#error_verification").html('<span style="color:#AB2B28; font-weight:bold;">Please Enter Verification Code</span>')}if(d.policy.checked==false){$(".showError6").html('<span class="errorClass"><img src="images/ico_cross_org.gif">&nbsp;Accept Policy</span>');b+="<span> Policy should be checked.</span>";c=1}else{$(".showError6").html('<img src="images/ico_check_blu.gif" >')}if(c==1){return false}if(c==0){$("#error_message_registration").hide();return true}}function changeBox(cbox){box=eval(cbox);box.checked=!box.checked;return false}function remove_html(){$(".showError").html("");$(".showError2").html("");$(".showError3").html("");$(".showError3").html("");$(".showError4").html("");$(".showError5").html("");$(".showError6").html("");$("#error_verification").html("")};