
// Error-Messages customizen und
// wFORMS showAlert-Funktion mit eigener Routine überschreiben
if(wFORMS) {

	lang = "de";

	// Customizing der Error-Messages (analog zu http://www.formassembly.com/wForms/v2.0/documentation/input-validation.php?cb1a=yes&cb1b=yes)
	if( lang == "en" ) {
		wFORMS.behaviors['validation'].errMsg_required 	= "This field is required.";
		wFORMS.behaviors['validation'].errMsg_alpha 	= "The text must use alphabetic characters only (a-z, A-Z). Numbers are not allowed.";
		wFORMS.behaviors['validation'].errMsg_email 	= "This does not appear to be a valid email address.";
		wFORMS.behaviors['validation'].errMsg_integer 	= "Please enter an integer.";
		wFORMS.behaviors['validation'].errMsg_float 	= "Please enter a number (ex. 1.9).";
		wFORMS.behaviors['validation'].errMsg_password 	= "Unsafe password. Your password should be between 4 and 12 characters long and use a combinaison of upper-case and lower-case letters.";
		wFORMS.behaviors['validation'].errMsg_alphanum 	= "Please use alpha-numeric characters only [a-z 0-9].";
		wFORMS.behaviors['validation'].errMsg_date 		= "This does not appear to be a valid date.";
		wFORMS.behaviors['validation'].errMsg_notification = "%% error(s) detected. Your form has not been submitted yet.\nPlease check the information you provided.";  // %% will be replaced by the actual number of errors.
		wFORMS.behaviors['validation'].errMsg_custom	= "Please enter a valid value.";
	} else {
		wFORMS.behaviors['validation'].errMsg_required 	= ">> Dieses Feld ist ein Pflichtfeld.";
		wFORMS.behaviors['validation'].errMsg_alpha 	= "Bitte verwenden Sie ausschliesslich Buchstaben (a-z, A-Z). Zahlen und andere Zeichen sind nicht erlaubt.";
		wFORMS.behaviors['validation'].errMsg_email 	= "This does not appear to be a valid email address.";
		wFORMS.behaviors['validation'].errMsg_integer 	= "Bitte geben Sie eine ganze Zahl ein.";
		wFORMS.behaviors['validation'].errMsg_float 	= "Bitte geben Sie eine Kommazahl ein (z.B. 1,9).";
		wFORMS.behaviors['validation'].errMsg_password 	= "Unsafe password. Your password should be between 4 and 12 characters long and use a combinaison of upper-case and lower-case letters.";
		wFORMS.behaviors['validation'].errMsg_alphanum 	= "Bitte benutzen Sie ausschliesslich alpha-numerische Zeichen [a-z 0-9].";
		wFORMS.behaviors['validation'].errMsg_date 		= "Bitte geben Sie ein gültiges Datum ein.";
		wFORMS.behaviors['validation'].errMsg_notification = "Es wurde(n) %% Fehler entdeckt und das Formular wurde noch nicht abgeschickt.\nBitte überprüfen Sie Ihre Angaben.";  // %% will be replaced by the actual number of errors.
		wFORMS.behaviors['validation'].errMsg_custom	= "Bitte geben Sie einen gültigen Wert ein.";
	}

	// wFORMS showAlert-Funktion zur Ausgabe der Fehlermeldung überschreiben
	wFORMS.behaviors['validation'].showAlert = function (nbTotalErrors) {
		alert( "" + wFORMS.behaviors['validation'].errMsg_notification.replace('%%',nbTotalErrors));
	};

}

