var regInfo;var timerId=0;function checkAvailability(B){var A={success:function(C){document.getElementById("username_reminder").innerHTML=C.responseText}};YAHOO.util.Connect.asyncRequest("GET",base_url+"index.php/user_registration_nohttps/checkUser/"+B,A)}function clearContent(A){while(A.hasChildNodes()){var B=A.firstChild;A.removeChild(B)}}function getcaptcha(){var A={success:function(C){var B=document.getElementById("captcha");clearContent(B);B.innerHTML=C.responseText}};YAHOO.util.Connect.asyncRequest("POST",base_url+"index.php/user_registration_nohttps/captcha",A)}function cleanEmail(){document.getElementById("email").value=""}function changeRegistrationCountry(){countryCode=document.getElementById("country").value;if(countryCode=="0"){return }document.getElementById("stats_div").innerHTML="...";var A={success:function(B){document.getElementById("stats_div").innerHTML=B.responseText}};url=base_url+"/index.php/user_registration_nohttps/getStatesRegistration/"+countryCode;YAHOO.util.Connect.asyncRequest("GET",url,A)}function clickAgree(){if(document.getElementById("agreement_check").checked){document.getElementById("agree_error").style.display="none";document.getElementById("submit_button").className="circle-button-yellow"}else{document.getElementById("submit_button").className="circle-button-grey"}}function validateAndSubmit(){if(!document.getElementById("agreement_check").checked){document.getElementById("agree_error").style.display="";return }else{document.getElementById("agree_error").style.display="none"}var C=document.getElementById("password").value;var B=document.getElementById("verifypassword").value;if(C==""||B==""){document.getElementById("passwd_errormsg").innerHTML='<div class="error-text"><img src="'+base_url+'images/field_error_icon.gif">Password can not be empty</div>';document.getElementById("password").focus();return }else{if(C!=B){document.getElementById("passwd_errormsg").innerHTML='<div class="error-text"><img src="'+base_url+'images/field_error_icon.gif">Passwords do not match</div>';document.getElementById("password").focus();return }else{if(C.length<6){document.getElementById("passwd_errormsg").innerHTML='<div class="error-text"><img src="'+base_url+'images/field_error_icon.gif">Password must be at least 6 characters</div>';document.getElementById("password").focus();return }else{document.getElementById("passwd_errormsg").innerHTML=""}}}var E=document.getElementById("security_code").value;if(E==""){document.getElementById("captcha_errormsg").innerHTML='<div class="error-text"><img src="'+base_url+'images/field_error_icon.gif">Verification code can not be empty</div>';document.getElementById("security_code").focus();return }else{document.getElementById("captcha_errormsg").innerHTML=""}var A=base_url+"index.php/user_registration_nohttps/submit";var D=document.getElementById("UserRegistration");var F={success:function(H){var G=H.responseText;if(G==""){closePopup();window.location.href=base_url+"index.php/campaign/wishlist/build"}else{closePopup();document.getElementById("sign_up_register").innerHTML=H.responseText;launchPopUp("sign_up_register",false)}},failure:function(G){}};YAHOO.util.Connect.setForm(D);YAHOO.util.Connect.asyncRequest("POST",A,F)}function sendDefaultEmailVerification(A){var B={success:function(C){document.getElementById("message_box_popup_message").innerHTML=C.responseText;launchPopUp("message_box")}};YAHOO.util.Connect.asyncRequest("GET",base_url+"index.php/verification/sendDefaultEmailVerification"+A,B)}function sendBuyEmailVerification(){var A={success:function(B){document.getElementById("message_box_popup_message").innerHTML=B.responseText;launchPopUp("message_box")}};YAHOO.util.Connect.asyncRequest("POST",base_url+"index.php/verification/sendBuyEmailVerification",A)}function sendSellEmailVerification(){var A={success:function(B){document.getElementById("message_box_popup_message").innerHTML=B.responseText;launchPopUp("message_box")}};YAHOO.util.Connect.asyncRequest("POST",base_url+"index.php/verification/sendSellEmailVerification",A)}function submitLogin(){var A=base_url+"index.php/user_registration_nohttps/login";var B=document.getElementById("loginform");var C={success:function(E){var D=E.responseText;if(D==""){closePopup();window.location.href=base_url+"index.php/campaign/wishlist/build"}else{closePopup();document.getElementById("sign_up_register").innerHTML=E.responseText;launchPopUp("sign_up_register",false)}},failure:function(D){}};YAHOO.util.Connect.setForm(B);YAHOO.util.Connect.asyncRequest("POST",A,C)}