function sprawdz_email() 
{		
      var adres_email;
		var max_length = 40;
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		
		if (filter.test(document.newsletter.adres_email.value)) {
			email = document.newsletter.adres_email.value;
			var a = true;
		} else {
			alert("Wpisz poprawny adres email.");
			var a = true; return false;
		}		
                try {
					if(document.newsletter.adres_email.length < 1) {
				alert("Wpisz poprawne dane. Dziękujemy.");
				return false;
			}
					}
		catch(e) {}
		return true;
}  

function sprawdzForm() {
	var email;
	var max_length = 50;
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	
	if (filter.test(document.formKont.email.value)) {
		email = document.formKont.email.value;
		var a = true;
	} else {
		alert("Wpisz poprawny adres email.");
		var a = true; return false;
	}
	try {
				if(document.formKont.email.length < 1) {
			alert("Wpisz poprawny adres email.");
			return false;
		}
				}

	catch(e) {}
	return true;
}			 	


function OnInputForm(input)
{
	if( (input.value == 'Twój e-mail...' && input.name == 'email') || (input.value == 'Twój e-mail...' && input.name == 'email') )
		input.value = "";
}

function OffInputForm(input)
{
	if( (input.value == '' && input.name == 'email') || (input.value == '' && input.name == 'email') )
		input.value = 'Twój e-mail...';
}


function OnInputFormN(input)
{
	if( (input.value == 'Twój e-mail...' && input.name == 'adres_email') || (input.value == 'Twój e-mail...' && input.name == 'adres_email') )
		input.value = "";
}

function OffInputFormN(input)
{
	if( (input.value == '' && input.name == 'adres_email') || (input.value == '' && input.name == 'adres_email') )
		input.value = 'Twój e-mail...';
}

