var ER_LANG_STRINGS = '{\"COM_EXTENDEDREG_DOW0\":\"Sunday\",\"COM_EXTENDEDREG_DOW1\":\"Monday\",\"COM_EXTENDEDREG_DOW2\":\"Tuesday\",\"COM_EXTENDEDREG_DOW3\":\"Wednesday\",\"COM_EXTENDEDREG_DOW4\":\"Thursday\",\"COM_EXTENDEDREG_DOW5\":\"Friday\",\"COM_EXTENDEDREG_DOW6\":\"Saturday\",\"COM_EXTENDEDREG_MONTH1\":\"January\",\"COM_EXTENDEDREG_MONTH2\":\"February\",\"COM_EXTENDEDREG_MONTH3\":\"March\",\"COM_EXTENDEDREG_MONTH4\":\"April\",\"COM_EXTENDEDREG_MONTH5\":\"May\",\"COM_EXTENDEDREG_MONTH6\":\"June\",\"COM_EXTENDEDREG_MONTH7\":\"July\",\"COM_EXTENDEDREG_MONTH8\":\"August\",\"COM_EXTENDEDREG_MONTH9\":\"September\",\"COM_EXTENDEDREG_MONTH10\":\"October\",\"COM_EXTENDEDREG_MONTH11\":\"November\",\"COM_EXTENDEDREG_MONTH12\":\"December\",\"COM_EXTENDEDREG_YES\":\"Yes\",\"COM_EXTENDEDREG_NO\":\"No\",\"COM_EXTENDEDREG_OR\":\"OR\",\"COM_EXTENDEDREG_HELP\":\"Help\",\"COM_EXTENDEDREG_PAGE_IS_LOADING\":\"Loading...\",\"COM_EXTENDEDREG_SELECT_FILE_LABEL\":\"Select a file please\",\"COM_EXTENDEDREG_BROWSE_FILE_BTN\":\"Browse\",\"COM_EXTENDEDREG_FILTER\":\"Filter\",\"COM_EXTENDEDREG_GO_BUTTON\":\"Go\",\"COM_EXTENDEDREG_RESET_BUTTON\":\"Reset\",\"COM_EXTENDEDREG_NEVER\":\"Never\",\"COM_EXTENDEDREG_NONE\":\"None\",\"COM_EXTENDEDREG_SUCCESS\":\"Success\",\"COM_EXTENDEDREG_SEARCH\":\"Search\",\"COM_EXTENDEDREG_ERROR\":\"Error\",\"COM_EXTENDEDREG_WARNING\":\"Warning\",\"COM_EXTENDEDREG_FIELDPROTOTYPE_FILENOTFOUND\":\"Field type parameters file not found! (%s)\",\"COM_EXTENDEDREG_MODELHELPER_FILENOTFOUND\":\"Model not found! (%s)\",\"COM_EXTENDEDREG_ADDONSHELPER_FILENOTFOUND\":\"File not found! (%s)\",\"COM_EXTENDEDREG_ADDONSHELPER_CLASSNOTFOUND\":\"Class not found! (%s)\",\"COM_EXTENDEDREG_NOTHING_TODO\":\"Nothing todo!\",\"COM_EXTENDEDREG_NO_ACCESS_ERROR\":\"Error\",\"COM_EXTENDEDREG_AJAX_ERROR\":\"Error while loading data. Please refresh page and try again.\",\"COM_EXTENDEDREG_IS_REQUIRED_ERROR\":\"%s is required!\",\"COM_EXTENDEDREG_BAD_DATE_ERROR\":\"%s is not valid date!\",\"COM_EXTENDEDREG_THIS_IS_REQUIRED_ERROR\":\"This field is required!\",\"COM_EXTENDEDREG_ALREADY_LOGGED_IN\":\"You are already logged in!\",\"COM_EXTENDEDREG_FORGOT_YOUR_PASSWORD\":\"Forgot your password?\",\"COM_EXTENDEDREG_FORGOT_YOUR_USERNAME\":\"Forgot your username?\",\"COM_EXTENDEDREG_REQUEST_CONFIRM_EMAIL\":\"Request new confirmation email\",\"COM_EXTENDEDREG_OVER_AGE\":\"I certify that I am over the age of %s\",\"COM_EXTENDEDREG_ACCEPT_TERMS\":\"Agree to terms&conditions\",\"COM_EXTENDEDREG_ACCEPT_TERMS_EXT\":\"I certify that I agree to the Terms & Conditions\",\"COM_EXTENDEDREG_CAPTCHA_INFO\":\"Please enter the following security code\",\"COM_EXTENDEDREG_CAPTCHA_NOT_READABLE\":\"Not readable? Change text.\",\"COM_EXTENDEDREG_LOGIN_IS_DISABLED\":\"User login is disabled by admin\",\"COM_EXTENDEDREG_PLEASE_WAIT\":\"Please wait...\",\"COM_EXTENDEDREG_NOSCRIPT_WARNING\":\"Your browser does not support JavaScript! This component require JavaScript to be enabled to work!\",\"COM_EXTENDEDREG_MATHGUARD_INFO\":\"Please enter the result of the equation\",\"COM_EXTENDEDREG_MATHGUARD_GHANGE\":\"Change the equation\",\"COM_EXTENDEDREG_MATHGUARD_ZERO\":\"zero\",\"COM_EXTENDEDREG_MATHGUARD_ONE\":\"one\",\"COM_EXTENDEDREG_MATHGUARD_TWO\":\"two\",\"COM_EXTENDEDREG_MATHGUARD_THREE\":\"three\",\"COM_EXTENDEDREG_MATHGUARD_FOUR\":\"four\",\"COM_EXTENDEDREG_MATHGUARD_FIVE\":\"five\",\"COM_EXTENDEDREG_MATHGUARD_SIX\":\"six\",\"COM_EXTENDEDREG_MATHGUARD_SEVEN\":\"seven\",\"COM_EXTENDEDREG_MATHGUARD_EIGHT\":\"eight\",\"COM_EXTENDEDREG_MATHGUARD_NINE\":\"nine\",\"COM_EXTENDEDREG_MATHGUARD_PLUS\":\"plus\",\"COM_EXTENDEDREG_MATHGUARD_MINUS\":\"minus\",\"COM_EXTENDEDREG_MATHGUARD_MULTIPLIEDBY\":\"multiplied by\",\"COM_EXTENDEDREG_MATHGUARD_DEVIDEDBY\":\"devided by\",\"COM_EXTENDEDREG_SAVE\":\"Save\",\"COM_EXTENDEDREG_SUBMIT\":\"Submit\",\"COM_EXTENDEDREG_CREATE_ACCOUNT\":\"Create account\",\"COM_EXTENDEDREG_REQUEST_ACTIVATION_MAIL\":\"Request new activation mail\",\"COM_EXTENDEDREG_REGISTER\":\"Register\",\"COM_EXTENDEDREG_REGISTER_REQUIRED_INFO\":\"Fields marked with an asterisk (*) are required.\",\"COM_EXTENDEDREG_REGISTER_REQUIRED\":\"required\",\"COM_EXTENDEDREG_REGISTER_NAME\":\"Name\",\"COM_EXTENDEDREG_REGISTER_USERNAME\":\"User name\",\"COM_EXTENDEDREG_REGISTER_EMAIL\":\"Email\",\"COM_EXTENDEDREG_REGISTER_PASSWORD\":\"Password\",\"COM_EXTENDEDREG_REGISTER_VERIFY_PASSWORD\":\"Verify password\",\"COM_EXTENDEDREG_REGISTER_LOGIN\":\"Login\",\"COM_EXTENDEDREG_REGISTER_LOGOUT\":\"Logout\",\"COM_EXTENDEDREG_REGISTER_REMEMBERME\":\"Remember me\",\"COM_EXTENDEDREG_REGISTER_PASSWARNING\":\"Password must be at least 5 characters long\",\"COM_EXTENDEDREG_MSG_USER_SAVED\":\"Profile saved\",\"COM_EXTENDEDREG_REMIND_SUCCESS\":\"An email containing your username has been sent to your email address.\",\"COM_EXTENDEDREG_RESET_EMAIL_SEND\":\"An email has been sent to your email address. The email contains a verification token, please paste the token in the field below to prove that you are the owner of this account.\",\"COM_EXTENDEDREG_RESET_CHANGE_PASSWORD\":\"To complete the password reset process, please enter a new password.\",\"COM_EXTENDEDREG_PASSWORD_RESET_SUCCESS\":\"Your password has been changed. Please login using your username and new password.\",\"COM_EXTENDEDREG_STEPS_XOFY\":\"Step %s of %s\",\"COM_EXTENDEDREG_STEPS_BACK\":\"Back\",\"COM_EXTENDEDREG_STEPS_NEXT\":\"Next\",\"COM_EXTENDEDREG_STEPS_FINISH\":\"Finish\",\"COM_EXTENDEDREG_RESET_WRONG_EMAIL_ERROR\":\"Your password reset request failed because a User with the specified email address could not be found!\",\"COM_EXTENDEDREG_REMIND_WRONG_EMAIL_ERROR\":\"Your username reminder request failed because a User with the specified email address could not be found!\",\"COM_EXTENDEDREG_USER_NOT_APPROVED_ERROR\":\"Login denied! Your account has not been approved yet.\",\"COM_EXTENDEDREG_INVALID_FORM\":\"Invalid Form!\",\"COM_EXTENDEDREG_EMAIL_NOTVALID_ERROR\":\"This is not valid email!\",\"COM_EXTENDEDREG_EMAIL_EXISTS_ERROR\":\"This email already in use!\",\"COM_EXTENDEDREG_EMAIL_BLACKLISTED_ERROR\":\"This email is blacklisted by admin!\",\"COM_EXTENDEDREG_USERNAME_EXISTS_ERROR\":\"This username already in use!\",\"COM_EXTENDEDREG_USERNAME_BLACKLISTED_ERROR\":\"This username is blacklisted by admin!\",\"COM_EXTENDEDREG_IPADDR_BLACKLISTED_ERROR\":\"Your IP address is blacklisted by admin!\",\"COM_EXTENDEDREG_USING_PROXY_FORBIDDEN_ERROR\":\"Using proxy server is forbidden\",\"COM_EXTENDEDREG_CAPTCHA_INCORRECT_ERROR\":\"Security code is not correct!\",\"COM_EXTENDEDREG_TERMS_ERROR\":\"Terms&Conditions are not accepted. We can not create your account.\",\"COM_EXTENDEDREG_AGE_ERROR\":\"You are under the age of %s. We can not create your account.\",\"COM_EXTENDEDREG_NOTINSTALLED\":\"Error - com_extendedreg is NOT installed\",\"COM_EXTENDEDREG_ERROR_MINLENGTH\":\"Value of this field is too short! It must be %s characters or longer.\",\"COM_EXTENDEDREG_ERROR_MAXLENGTH\":\"Value of this field is too long! It must be %s characters or shorter.\",\"COM_EXTENDEDREG_ERROR_NOT_APPROVED\":\"Login denied! Your account has either been blocked or admins have not approved it yet.\",\"COM_EXTENDEDREG_NOLOGIN_BLOCKED\":\"Login denied! Your account has either been blocked or you have not activated it yet. Did you not get an activation e-mail and follow the validation link?\",\"COM_EXTENDEDREG_NOLOGIN_ACCESS\":\"You do not have access to the administrator section of this site.\",\"COM_EXTENDEDREG_LOGIN_DENIED\":\"You cannot access the private section of this site.\",\"COM_EXTENDEDREG_USERNAME_NOTUNIQUE_ERROR\":\"Username must be unique!\",\"COM_EXTENDEDREG_EMAIL_NOTUNIQUE_ERROR\":\"Email must be unique!\",\"COM_EXTENDEDREG_VALUE_NOTUNIQUE_ERROR\":\"This field must be unique! Value already exist.\",\"COM_EXTENDEDREG_REG_COMPLETE_ACTIVATE\":\"Your account has been created and an activation link has been sent to the email address you entered. Note that you must activate the account by clicking on the activation link when you get the email before you can login.\",\"COM_EXTENDEDREG_REG_COMPLETE_ACTIVATE_WARNING\":\"Your account has been created but error occured while sending the activation link to your email address. Please contact the administrators.\",\"COM_EXTENDEDREG_REG_COMPLETE_APPROVAL\":\"Your account has been created and waiting for admin to approve it before you can login!\",\"COM_EXTENDEDREG_REG_COMPLETE_APPROVAL_WARNING\":\"Your account has been created and waiting for admin to approve it before you can login! Error occured while sending information email to your address.\",\"COM_EXTENDEDREG_REG_COMPLETE\":\"Registration complete! You can now login.\",\"COM_EXTENDEDREG_REG_COMPLETE_WARNING\":\"Registration complete! You can now login. Error occured while sending information email to your address.\",\"COM_EXTENDEDREG_ERROR_PASS_TOO_SHORT\":\"Your password is too short. It should be atleast %s characters.\",\"COM_EXTENDEDREG_ERROR_PASS_COMMON_WORDS\":\"Unsafe password! You are trying to use common word for password.\",\"COM_EXTENDEDREG_ERROR_PASS_ALLOWED_CHARS\":\"You are trying to use characters that are not allowed in your password.\",\"COM_EXTENDEDREG_ERROR_PASS_ATLEAST_ONE_LETTER\":\"Your password should contain at least one letter.\",\"COM_EXTENDEDREG_ERROR_PASS_ATLEAST_ONE_UPPER\":\"Your password should contain at least one UPPERCASE letter.\",\"COM_EXTENDEDREG_ERROR_PASS_ATLEAST_ONE_LOWER\":\"Your password should contain at least one lowercase letter.\",\"COM_EXTENDEDREG_ERROR_PASS_ATLEAST_ONE_NUMBER\":\"Your password should contain at least one number.\",\"COM_EXTENDEDREG_ERROR_PASS_ATLEAST_ONE_SPACE\":\"Your password should contain at least one space.\",\"COM_EXTENDEDREG_ERROR_PASS_ATLEAST_ONE_SPECIAL\":\"Your password should contain at least one special character.\",\"COM_EXTENDEDREG_PASSWORD_STRENGTH_UNSAFE\":\"Unsafe password word!\",\"COM_EXTENDEDREG_PASSWORD_STRENGTH_VERYWEAK\":\"Very weak\",\"COM_EXTENDEDREG_PASSWORD_STRENGTH_WEAK\":\"Weak\",\"COM_EXTENDEDREG_PASSWORD_STRENGTH_MEDIUM\":\"Medium\",\"COM_EXTENDEDREG_PASSWORD_STRENGTH_STRONG\":\"Strong\",\"COM_EXTENDEDREG_PASSWORD_STRENGTH_VERYSTRONG\":\"Very strong\",\"COM_EXTENDEDREG_ERROR_PASS_MUSTBE0\":\"Minimum strength of your password must be \'Very weak\'\",\"COM_EXTENDEDREG_ERROR_PASS_MUSTBE1\":\"Minimum strength of your password must be \'Weak\'\",\"COM_EXTENDEDREG_ERROR_PASS_MUSTBE2\":\"Minimum strength of your password must be \'Medium\'\",\"COM_EXTENDEDREG_ERROR_PASS_MUSTBE3\":\"Minimum strength of your password must be \'Strong\'\",\"COM_EXTENDEDREG_ERROR_PASS_MUSTBE4\":\"Minimum strength of your password must be \'Very strong\'\",\"COM_EXTENDEDREG_ACTIVATE_NOT_FOUND\":\"There is no such account in our database or the account has already been activated.\",\"COM_EXTENDEDREG_ACTIVATE_WAITING_APPROVE\":\"Your account has been successfully activated and waiting for admin to approve it before you can login!\",\"COM_EXTENDEDREG_ACTIVATE_WAITING_APPROVE_WARNING\":\"Your account has been successfully activated and waiting for admin to approve it before you can login! Error occured while sending information email to your address.\",\"COM_EXTENDEDREG_ACTIVATE_COMPLETE\":\"Your account has been successfully activated! You can now login.\",\"COM_EXTENDEDREG_ACTIVATE_COMPLETE_WARNING\":\"Your account has been successfully activated! You can now login. Error occured while sending information email to your address.\",\"COM_EXTENDEDREG_APPROVE_COMPLETE\":\"The account (%s) has been successfully approved!\",\"COM_EXTENDEDREG_APPROVE_COMPLETE_WARNING\":\"The account (%s) has been successfully approved! Error occured while sending information email to user address.\",\"COM_EXTENDEDREG_TOKEN\":\"Token\",\"COM_EXTENDEDREG_INVALID_TOKEN\":\"The token was invalid!\",\"COM_EXTENDEDREG_DATABASE_ERROR\":\"A database error occurred! Please try again later.\",\"COM_EXTENDEDREG_MUST_SUPPLY_PASSWORD\":\"Password field can not be empty!\",\"COM_EXTENDEDREG_PASSWORDS_DO_NOT_MATCH\":\"Passwords do not match!\",\"COM_EXTENDEDREG_RESET_CONFIRMATION_FAILED\":\"Your password reset confirmation failed with error: %s\",\"COM_EXTENDEDREG_PASSWORD_RESET_FAILED\":\"Your password reset request failed with error: %s\",\"COM_EXTENDEDREG_HINAME\":\"Hi %s,\",\"COM_EXTENDEDREG_REQUEST_ACTIVATION_SUCCESS\":\"Link has been sent to the email address you entered. Note that you must activate the account by clicking on the activation link when you get the email before you can login.\",\"COM_EXTENDEDREG_REQUEST_ACTIVATION_FAIL\":\"Your request for activation email has failed.\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_LINK\":\"Terminate Account\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_LEGEND\":\"Enter and confirm your password. If correct - we will send you a mail with link to terminate your account.\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_PASSWORD\":\"Enter your password\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_PASSWORD_CONFIRM\":\"Confirm your password\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_PASSWORD_MISSMATCH\":\"The passwords doesn\'t match\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_PASSWORD_INVALID\":\"Invalid password\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_CHECK_MAIL\":\"Check your mail for the termination link.\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_EMPTYHASH\":\"The hash is empty. Your attempt to terminate your account has failed.\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_INVALIDHASH\":\"This hash is not valid. Your attempt to terminate your account has failed.\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_SUCCESS\":\"You have successfully terminated your account at our site.\",\"COM_EXTENDEDREG_ACCOUNT_TERMINATE_SUPERADMIN_WARN\":\"Sorry, as Super Admin, you can not terminate your account.\",\"COM_EXTENDEDREG_MAX_LOGIN_UNIT_0\":\"minutes\",\"COM_EXTENDEDREG_MAX_LOGIN_UNIT_1\":\"hours\",\"COM_EXTENDEDREG_MAX_LOGIN_UNIT_2\":\"days\",\"COM_EXTENDEDREG_MAX_LOGIN_BLOCKED_MSG\":\"This user account has been blocked for %s %s due to too many failed login attempts.\",\"COM_EXTENDEDREG_MAX_LOGIN_STILL_BLOCKED_MSG\":\"This user account is blocked for %s %s due to too many failed login attempts. Please try again later.\",\"COM_EXTENDEDREG_MAILS_APPROVE_EMAIL_USER\":\"Hello {hi_name},Thank you for registering at {sitename}.When the admins approve your account you will recieve an email. After that you may log in using the username and password you registered with.\",\"COM_EXTENDEDREG_MAILS_APPROVE_EMAIL_ADMIN\":\"Hello {hi_name},There is new user at {sitename} that needs to be reviewed and approved.This e-mail contains their details:Name: {name}E-mail: {email}Username: {username}IP address: {ip_addr}Please do not respond to this message. It is automatically generated and is for information purposes only.\",\"COM_EXTENDEDREG_MAILS_APPROVE_EMAIL_USER_DONE\":\"Hello {hi_name},Your account at {sitename} is approved and now you can login\",\"COM_EXTENDEDREG_MAILS_REGINFO_EMAIL_USER\":\"Hello {hi_name},Thank you for registering at {sitename}.You may now log in to {siteurl} using the username and password you registered with.\",\"COM_EXTENDEDREG_MAILS_REGINFO_EMAIL_ADMIN\":\"Hello {hi_name},A new user has registered at {sitename}.This e-mail contains their details:Name: {name}E-mail: {email}Username: {username}IP address: {ip_addr}Please do not respond to this message. It is automatically generated and is for information purposes only.\",\"COM_EXTENDEDREG_MAILS_ACTIVATION_EMAIL_USER\":\"Hello {hi_name},Thank you for registering at {sitename}. Your account is created and must be activated before you can use it.To activate the account click on the following link or copy-paste it in your browser:{activate_link}\",\"COM_EXTENDEDREG_ACCOUNT_DETAILS_FOR\":\"Account Details for {name} at {sitename}\",\"COM_EXTENDEDREG_MAILS_NEWUSER_FROMADMIN_TITLE\":\"New User Details\",\"COM_EXTENDEDREG_MAILS_NEWUSER_FROMADMIN_TEXT\":\"Hello {name},You have been added as a User to {sitename} by an Administrator.This e-mail contains your username and password to log in to {login_link}Username: {username}Password: {password}Please do not respond to this message as it is automatically generated and is for information purposes only.\",\"COM_EXTENDEDREG_MAILS_USERNAME_REMINDER_EMAIL_TEXT\":\"Hello,A username reminder has been requested for your {sitename} account.Your username is {username}.To login to your account, click on the link below.{login_link}Thank you.\",\"COM_EXTENDEDREG_MAILS_USERNAME_REMINDER_EMAIL_TITLE\":\"Your {sitename} username\",\"COM_EXTENDEDREG_MAILS_PASSWORD_RESET_CONFIRMATION_EMAIL_TEXT\":\"Hello,a request has been made to reset your {sitename} account password. To reset your password, you will need to submit this token in order to verify that the request was legitimate.The token is {reset_token} .Click on the URL below to enter the token and proceed with resetting your password.{reset_confirm_link}Thank you.\",\"COM_EXTENDEDREG_MAILS_PASSWORD_RESET_CONFIRMATION_EMAIL_TITLE\":\"Your {sitename} password reset request\",\"COM_EXTENDEDREG_MAILS_DELETE_ACCOUNT_TITLE\":\"Terminate your account at {sitename}\",\"COM_EXTENDEDREG_MAILS_DELETE_ACCOUNT_TEXT\":\"Hello {hi_name},You have requested to termin\\u0430te your account at {sitename}. In order to complete this action you need to click on the following link or copy-paste it in your browser:{termination_link} Before following this link make sure you are logged in to the site. If everything is ok, your account at the site will be terminated and you will be logged out.\",\"COM_EXTENDEDREG_MAILS_DELETE_ACCOUNT_ADMIN_TITLE\":\"User {username} ({name}) terminated his\\/her account\",\"COM_EXTENDEDREG_MAILS_DELETE_ACCOUNT_ADMIN_TEXT\":\"Hello {hi_name},User {username} ({name}) with e-mail {email} terminated his\\/her account at {sitename}.\",\"COM_EXTENDEDREG_MAX_LOGIN_BLOCKED_TITLE\":\"Your account at {sitename} is blocked\",\"COM_EXTENDEDREG_MAX_LOGIN_BLOCKED_TEXT\":\"Hello {hi_name},Your account has been blocked for {block_time} due to too many failed login attempts.\",\"COM_EXTENDEDREG_MAX_LOGIN_BLOCKED_ADMIN_TITLE\":\"Blocked account at {sitename}\",\"COM_EXTENDEDREG_MAX_LOGIN_BLOCKED_ADMIN_TEXT\":\"User {username} ({name}) with e-mail {email} had too many failed login attempts and his\\/her account has been blocked for {block_time}.\"}'; var ER_AJAX_URL = '/'; var ER_FORM_VALIDATION = {}; var ER_PASSWORD_STRENGTH_CHECK = 0; var ER_VALIDATE_JOOMLA_USERNAME = 0; var ER_VALIDATE_JOOMLA_EMAIL = 0; function erValidationUnique(val, id) { if (!val.toString().length) return true; var result = true; var message = ""; jQuery.ajax({ async: false, type: "POST", url: "/index.php?option=com_extendedreg&task=default.checkunique&s=" + val + "&id=" + id, success: function(data) { if (data != "0") { result = false; if (id == -1) { message = "Username must be unique!"; } else if (id == -2) { message = "Email must be unique!"; } else { message = "This field must be unique! Value already exist."; } } } }); if (!result) { throw message; return false; } return true; } function erValidationEmail(val) { var result = true; var message = ""; jQuery.ajax({ async: false, type: "POST", url: "/index.php?option=com_extendedreg&task=default.checkemail&s=" + val, success: function(data) { if (data == "1") { result = false; message = "This is not valid email!"; } else if (data == "2") { result = false; message = "This email is blacklisted by admin!"; } } }); if (!result) { throw message; return false; } return true; }