		function is_email( email )
		{
			var valid = false;
			var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
			if ( filter.test( email ) )
			{
				valid = true;
			}
			else
			{
				valid = false;
			}
			return ( valid )
		}
		
		function trim( sString )
		{
			while (sString.substring(0,1) == ' ')
			{
				sString = sString.substring(1, sString.length);
			}
			while (sString.substring(sString.length-1, sString.length) == ' ')
			{
				sString = sString.substring(0,sString.length-1);
			}
			return sString;
		}
	
		function przetwarzaj_dane()
		{
			if (document.layers||document.getElementById||document.all)
			{
				var valid = true;
				var arr_emaile;
				var wrong_email='';
				var message='';
				var wrong_pola='';				
				if( document.getElementById('email').value == '')
				{
					wrong_pola += 'E-mail' +', ';
				}
				else
				{
				
					arr_emaile = document.getElementById('email').value;
					
					valid = is_email( trim( arr_emaile ) );
					if( !valid )
					{
						wrong_email += arr_emaile;
					}
		
				}
				
				if( wrong_pola != '')
				{
					message += 'wypełnij pola: '+wrong_pola.substring(0,wrong_pola.length-2)+"\n";
				}
					
				if( wrong_email != '')
				{
					message += 'nieprawidłowy e-mail: ' + wrong_email;
				}				

				
				if( message != '')
				{	
					alert( message ); 
					return false;
				}
				else
				{
					return true;
				}
			}
			else
			{
				return true;
			}
		}
		
//window.onload = function(){
//	emailInp = document.getElementById("email");
//	if(emailInp){
//		emailInp.value = "podaj adres email..."
//	}
//}

function clearEmailIntro(){
	emailInp = document.getElementById("email");
	if(emailInp && emailInp.value == "podaj adres email..."){
		emailInp.value = ""
	}
}

function addEmailIntro(){
	emailInp = document.getElementById("email");
	if(emailInp && emailInp.value == ""){
		emailInp.value = "podaj adres email..."
	}
}