// Polska lokalizacja dla wForms, biblioteki JavaScript dla formularzy elektronicznych
// wForms po polsku v0.98 - 10 listopada 2005
// Kuba Mielczarek (kuba@tenit.com.pl)
// Ten program jest na licencji CC-GNU LGPL(http://creativecommons.org/licenses/LGPL/2.1/)
// Aby uzyskać więcej informacji odwiedĽ: http://formassembly.com/blog/how-to-localize-wforms/
// Przykład użycia: 
// <head>...
// <script type="text/javascript" src="wforms.js" ></script>
// <script type="text/javascript" src="localization-pl.js" ></script>
// </head>

wf.arrErrorMsg = new Array(); 
wf.arrErrorMsg[0] = "Pole jest wymagane! "; // required
wf.arrErrorMsg[1] = "Warto¶ć musi zawieraÄ‡ tylko litery z zakresu (a-z, A-Z). Liczby sÄ… niedozwolone. "; 	// validate_alpha
wf.arrErrorMsg[2] = "To nie jest prawidĹ‚owy adres email.";									// validate_email
wf.arrErrorMsg[3] = "ProszÄ™ wprowadziÄ‡ liczbÄ™ caĹ‚kowitÄ….";															// validate_integer
wf.arrErrorMsg[4] = "ProszÄ™ wprowadziÄ‡ liczbÄ™ zmiennoprzecinkowÄ…(np. 1.9).";
wf.arrErrorMsg[5] = "Niebezpieczne hasło. HasĹ‚o powinno mirÄ‡ dĹ‚ugoĹ›Ä‡ od 4 do 12 znakĂłw i byÄ‡ kombinacjÄ… DUĹ»YCH i maĹ‚ch liter.";	
wf.arrErrorMsg[6] = "Warto¶ć musi zawieraĹ‚ tylko znaki alfanumeryczne [a-z 0-9].";
wf.arrErrorMsg[7] = "To nie jest prawidĹ‚owa data.";
wf.arrErrorMsg[8] = "IloĹ›Ä‡ wykrytych bĹ‚Ä™dĂłw %%. Formularz nie zostaĹ‚ przesĹ‚any.\nSprawdĹş wartoĹ›ci ktĂłre podaĹ‚eĹ›"; // %% will be replaced by the actual number of errors.
	
// Other Messages
wf.arrMsg = new Array();
wf.arrMsg[0] = "Dodaj wiersz"; 	// repeat link
wf.arrMsg[1] = "Powtarza poprzedzajÄ…ce pole lub grupÄ™" // title attribute on the repeat link 
wf.arrMsg[2] = "UsuĹ„"; 		// remove link
wf.arrMsg[3] = "Usuwa poprzedzajÄ…e pole lub grupÄ™." // title attribute on the remove link
wf.arrMsg[4] = "NastÄ™pna Strona";
wf.arrMsg[5] = "Poprzednia Strona";	
	
// Alpha-Numeric Input Validation: 
// Unicode ranges (from http://www.unicode.org/) :
// \u0030-\u0039 : Numbers 0-9
// \u0041-\u007A : Basic Latin : For english, and ASCII only strings (ex: username, password, ..)
// \u00C0-\u00FF : Latin-1 : For Danish, Dutch, Faroese, Finnish, Flemish, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
// \u0100–\u017F : Latin Extended-A (to be used with Basic Latin and Latin-1) : Afrikaans, Basque, Breton, Catalan, Croatian, Czech, Esperanto, Estonian, French, Frisian, Greenlandic, Hungarian, Latin, Latvian, Lithuanian, Maltese, Polish, Provençal, Rhaeto-Romanic, Romanian, Romany, Sami, Slovak, Slovenian, Sorbian, Turkish, Welsh, and many others.
// \u0180–\u024F : Latin Extended-B (to be used with Basic Latin and Latin-1) : ?
// \u1E00–\u1EFF : Latin Extended Additional : Vietnamese ?
// \u0370-\u03FF : Greek
// \u0400-\u04FF : Cyrillic : Russian, etc..
// \u0590–\u05FF : Hebrew (and #FB1D - #FB4F ?)
// \u0600–\u06FF : Arabic
// \u0900–\u097F : Devanagari : Hindi, etc..
// \u4E00–\u9FFF : Han - common ideographs : Chinese, Japanese, and Korean languages.
// See http://www.unicode.org/charts/ for other languages

wf.isAlpha = function(s) {
	var reg = /^[\u0041-\u007A\u00C0-\u00FF\u0100–\u017F]+$/; 
	return this.isEmpty(s) || reg.test(s);
}

wf.isAlphaNum = function(s) {
	var reg = /^[\u0030-\u0039\u0041-\u007A\u00C0-\u00FF\u0100–\u017F]+$/;
	return this.isEmpty(s) || reg.test(s);
}