//<script language=javascript>
function fctMessages(ps_nom,s_NomChamp,i_LongueurChamp)
{
	switch(ps_nom)
	{	
		case "STR_SPACEPASS":
			return "Spaces in the begining and the end of your password are removed";
		case "STR_COURRIEL":
			return "Please enter a valid e-mail address.";
		case "STR_WWW":
			return "Please enter a valid website address";			
		case "STR_CHAMP1NOTNULL":
			return "The " + eval("document.message."+s_NomChamp+".value")+ " field must be filled and cannot be left blank.";
		case "STR_CHAMP2NOTNULL":
			return "At least one element from the " + eval("document.message."+s_NomChamp+".value")+ " list must be selected.";
		case "STR_CHAMP3NOTNULL":
			return "At least one element from the " + eval("document.message."+s_NomChamp+".value")+ " list must be selected.";	
		case "STR_CHAMP4NOTNULL":
			var carac
			if(i_LongueurChamp>1)
				carac='s';
			else
				carac='';
			return "At least " + i_LongueurChamp + " element" + carac + " from the " + eval("document.message."+s_NomChamp+".value")+ " field must be selected.";
		case "STR_CHAMP3MAX":
			return "The text of the " + eval("document.message."+s_NomChamp+".value")+ " field must have " + i_LongueurChamp+ " characters or fewer. Please modify your text. ";
		case "STR_CHAMP4MIN":
			return "The text of the " + eval("document.message."+s_NomChamp+".value")+ " field must have at least " + i_LongueurChamp+ " characters. Please modify your text.";			
		case "STR_CHAMP5FORMAT":
			return eval("document.message."+s_NomChamp+".value")+ " format is incorrect (Correct format: G2A 1J8)";
		case "STR_CHAMP6FORMAT":
			return  eval("document.message."+s_NomChamp+".value")+ " format is incorrect (Correct format: 418-872-9098) ";
		case "STR_CHAMPDATE1FORMAT":
			return "The date is incorrect or its format is not valid (Correct format: JJ/MM/AA)";
		case "STR_CHAMPDATE2FORMAT":
			return "The date is incorrect or its format is not valid (Correct format: JJ/MM/AAAA)";
		case "STR_CHAMPDATE3FORMAT":
			return "The date is incorrect or its format is not valid (Correct format: MM/JJ/AA)";
		case "STR_CHAMPDATE4FORMAT":
			return "The date is incorrect or its format is not valid (Correct format: MM/JJ/AAAA)";
		case "STR_CHAMP7":
			return "Password must contain numbers and letters. ";
		case "STR_CHAMP8":
			return "The " + eval("document.message."+s_NomChamp+".value")+ " field must contain a valid number.";
		case "STR_CHAMP9":
			return "The " + eval("document.message."+s_NomChamp+".value")+ " field must contain numbers only. Please correct the data.";
		case "STR_CHAMP10":
			return "The " + eval("document.message."+s_NomChamp+".value")+ " field must contain letters only. Please correct the data.";
		case "STR_DELETERECORD":
			return "Are you sure you want to delete " + s_NomChamp + "?";	
	}
}
function gf_ObtenirErrMsg(ps_Nom, ps_Champs)
{
	switch(ps_Nom.toUpperCase())
	{
		case "PASSWORD_CONFIRM":
			return "The Password and Confirmation fields have different values.";
		case "SELECT_0":
			return "The " + ps_Champs + " field must be filled and cannot be left blank.";
		case "SELECT_1":
			return "At least one element from the " + ps_Champs + " section must be selected.";
		case "SELECT_2":
			return "One element from the " + ps_Champs + " section must be selected.";	   
		case "SELECT_3":
			return "At least one element from the " + ps_Champs + " list must be selected.";
		case "SELECT_4":
			return "One element from the " + ps_Champs + " list must be selected.";
		default:
			return "";		
	}
}