		function validaceZaslaniInformaci()	{
			var regNotBlank	= new RegExp('^([ ]*).*([^ ]+).*([ ]*)$');
			var regEmail	= new RegExp('^([_a-zA-Z0-9\\.\\-]+)@([_a-zA-Z0-9\\.\\-]+)\\.([a-zA-Z]{2,4})$','i');
			var errText = '';

			if (!regNotBlank.test(this.firma.value)) {
				this.firma.style.backgroundColor="#ff9999";
				errText+="\t- název firmy\n";
			}
			if (!regNotBlank.test(this.jmeno.value)) {
				this.jmeno.style.backgroundColor="#ff9999";
				errText+="\t- své jméno a příjmení\n";
			}
			if (!regNotBlank.test(this.telefon_fax.value)) {
				this.telefon_fax.style.backgroundColor="#ff9999";
				errText+="\t- telefonní nebo faxové číslo\n";
			}
			if (!regNotBlank.test(this.adresa.value)) {
				this.adresa.style.backgroundColor="#ff9999";
				errText+="\t- kontaktní adresu\n";
			}
			if (!regEmail.test(this.email.value))	{
				this.email.style.backgroundColor="#ff9999";
				errText+="\t- svůj e-mail\n";
			}
			var testText = this.zprava.value.replace(/ /g,'');
			testText = testText.replace(/\n/g,'');
			testText = testText.replace(/\r/g,'');
			testText = testText.replace(/\t/g,'');
			if (testText=='') {
				this.zprava.style.backgroundColor="#ff9999";
				errText+="\t- text zprávy\n";
			}
/*			if (!regNotBlank.test(this.captcha_opis.value)) {
				this.captcha_opis.style.backgroundColor="#ff9999";
				errText+="\t- kontrolní řetězec\n";
			}
*/
			if (errText!='') {
				alert('Vyplňte prosím následující povinné položky:\n'+errText);
				return false;
			}
			return true;
		}
		function resetujBarvuPozadi(el) {
			el.style.backgroundColor="#ffffff";
		}
		
		function initValidaceZaslaniInformaci() {
			var elForm = document.getElementById('form_zaslani_informaci');
			elForm.onsubmit = validaceZaslaniInformaci;
			
			elForm.firma.onfocus = function() { resetujBarvuPozadi(this); };
			elForm.jmeno.onfocus = function() { resetujBarvuPozadi(this); };
			elForm.telefon_fax.onfocus = function() { resetujBarvuPozadi(this); };
			elForm.adresa.onfocus = function() { resetujBarvuPozadi(this); };
			elForm.email.onfocus = function() { resetujBarvuPozadi(this); };
			//elForm.captcha_opis.onfocus = function() { resetujBarvuPozadi(this); };
			elForm.zprava.onfocus = function() { resetujBarvuPozadi(this); };
		}

		DomLoaded.load(initValidaceZaslaniInformaci);

