// define messages related to fields over here
var aMessages = new Array();

aMessages["login"] = new Array();
aMessages["login"]["blank"] = "Profile ID is mandatory.";
aMessages["login"]["^0-9a-z_"] = "Incorrect format for Profile ID. Please use only alphabets and numerals (0-9, a-z, A-Z, ‘_’). Example Rajdoctor_28";
aMessages["login"]["length < 4"] = "Your profile ID should be between 4 to 20 characters (0-9, a-z, A-Z, ‘_’).<br> Example Rajdoctor_28";
aMessages["login"]["length > 20"] = "Your profile ID should be between 4 to 20 characters (0-9, a-z, A-Z).Example Rajdoctor28.";
aMessages["login"]["_$"] = "Please do not end your Profile ID with an '_'";
aMessages["login"]["^_"] = "Please do not begin your Profile ID with an '_'";
aMessages["login"]["login email@ same"] = "Your Profile ID & Email username (text before the @ sign) cannot be the same, for security reasons.";
aMessages["login"]["login email same"] = "Your Profile ID & Email Address cannot be the same, for security reasons.";
aMessages["login"]["check if available"] = "Checking if Profile ID is available...";
aMessages["login"]["check if available error"] = "A technical error occurred while processing your Profile ID request. Please type your Profile ID again.";
aMessages["login"]["numerics > 4"] = "Please do not use more than 4 numeric characters.";
aMessages["email"] = new Array();
aMessages["email"]["blank"] = "Your email address is mandatory.";
aMessages["email"]["invalid"] = "Incorrect email address format. Please type a valid email address. Example raj_23@yahoo.com";
aMessages["email"]["@shaadi.com"] = "Incorrect Email Address. This Email Address does not exist. Please use your correct email address.";
aMessages["email"]["login email@ same"] = "Your Profile ID & Email username (text before the @ sign) cannot be the same, for security reasons.";
aMessages["email"]["login email same"] = "Your Profile ID & Email Address cannot be the same, for security reasons.";
aMessages["email"]["check if available"] = "Checking if Email Address already exists...";
aMessages["email"]["check if available error"] = "A technical error occurred while checking if this email address exists. Please type your email address again.";

aMessages["retypeemail"] = new Array();
aMessages["retypeemail"]["blank"] = "Confirm your email address again to make sure you have entered it correctly.";
aMessages["retypeemail"]["mismatch"] = "Your email addresses do not match. Please type identical email addresses in both fields.";

aMessages["password1"] = new Array();
aMessages["password1"]["blank"] = "Password is mandatory.";
aMessages["password1"]["\s"] = "Incorrect password format. Please do not use spaces in your password.";
aMessages["password1"]["\."] = "Incorrect password format. Please do not use .(dot)  in your password.";
aMessages["password1"]["length < 4"] = "Your password should be between 4 to 20 characters. It cannot contain spaces.";
aMessages["password1"]["length > 20"] = "Your password should be between 4 to 20 characters. It cannot contain spaces.";
aMessages["password1"]["login password same"] = "In order to protect your privacy your profile ID & password cannot be identical. Please change your profile ID or your password.";
aMessages["password1"]["email password same"] = "In order to protect your privacy your email address & password cannot be identical Please change your email address or your password.";

aMessages["password2"] = new Array();
aMessages["password2"]["blank"] = "Please type your Password again.";
aMessages["password2"]["mismatch"] = "Both the Passwords you typed do not match. Please use identical Passwords in both the form fields.";

aMessages["gender"] = new Array();
aMessages["gender"]["blank"] = "Gender is mandatory.";

aMessages["dateofbirth"] = new Array();
aMessages["dateofbirth"]["blank"] = "Date of birth is mandatory.";
aMessages["dateofbirth"]["day"] = "Date is mandatory.";
aMessages["dateofbirth"]["month"] = "Month is mandatory.";
aMessages["dateofbirth"]["year"] = "Year is mandatory.";
aMessages["dateofbirth"]["Invalid"] = "Incorrect Date of Birth. Please select the correct Date of Birth of the person looking to get married.";
//aMessages["dateofbirth"]["check if valid"] = "Checking if Date of Birth is valid...";
aMessages["dateofbirth"]["check if valid"] = "";
aMessages["dateofbirth"]["check if valid error"] = "A technical error occurred while checking the Date of Birth. Please select the Date of Birth again.";

aMessages["community"] = new Array();
aMessages["community"]["blank"] = "Religion / community is mandatory.";

aMessages["countryofresidence"] = new Array();
aMessages["countryofresidence"]["blank"] = "Country of residence is mandatory.";


function toggleHint(sMode, sElementName)
{
	sDisplay = (sMode == "show") ? "inline" : "none";

	if(oElement = eval(document.getElementById('hint_' + sElementName)))
	{
		oElement.style.display = sDisplay;
	}
}
// same function is in registration2-2.js
function toggleHint_new (sMode, sElementName, sElement, sWidth)
{
	sLeftPos = 0;
	while(sElement)
	{
		sLeftPos += sElement.offsetLeft;
		sElement = sElement.offsetParent;
	}
	sLeftPos = sLeftPos + sWidth + 25 + "px";
	sDisplay = (sMode == "show") ? "inline" : "none";

	if(oElement = eval(document.getElementById('hint_' + sElementName)))
	{
		oElement.style.left = sLeftPos;
		oElement.style.display = sDisplay;
	}
}