function validate(formularz){
        EMAILre = /^[a-zA-Z0-9\.\-\_]+@[a-zA-Z0-9][a-zA-Z0-9-\.]*\.[a-zA-Z0-9]+$/;



        if (!EMAILre.test(window.document.getElementById('mail').value))
	{
		alert ('Musisz podaæ poprawny adres E-mail');
		window.document.getElementById('mail').select();
                window.document.getElementById('mail').focus();
		return false;
	}
return true;
}

function validateforum(formularz){
        EMAILre = /^[a-zA-Z0-9\.\-\_]+@[a-zA-Z0-9][a-zA-Z0-9-\.]*\.[a-zA-Z0-9]+$/;



        if (!EMAILre.test(window.document.getElementById('email').value))
	{
		alert ('Musisz podaæ poprawny adres E-mail');
		window.document.getElementById('email').select();
                window.document.getElementById('email').focus();
		return false;
	}
	
        if (window.document.getElementById('pass').value!=window.document.getElementById('repass').value)
	{
		alert ('Podane hasla nie sa takie same');
		window.document.getElementById('repass').select();
                window.document.getElementById('repass').focus();
		return false;
	}

        if (window.document.getElementById('pass').value.length < 4){
		alert ('Pole "haslo" winno mieæ co najmniej 4 znaki');
  		window.document.getElementById('pass').select();
                window.document.getElementById('pass').focus();
		return false;
	}

 return true;
}

function validateforumup(formularz){
        EMAILre = /^[a-zA-Z0-9\.\-\_]+@[a-zA-Z0-9][a-zA-Z0-9-\.]*\.[a-zA-Z0-9]+$/;



        if (!EMAILre.test(window.document.getElementById('email').value))
	{
		alert ('Musisz podaæ poprawny adres E-mail');
		window.document.getElementById('email').select();
                window.document.getElementById('email').focus();
		return false;
	}
	
	if (window.document.getElementById('oldpass').value!=window.document.getElementById('voldpass').value)
	{
		alert ('Obecne haslo nie jest prawidlowe');
		window.document.getElementById('pass').select();
                window.document.getElementById('pass').focus();
		return false;
	}
	
	if (window.document.getElementById('newpass').value!=window.document.getElementById('renewpass').value)
	{
		alert ('Podane hasla nie sa takie same');
		window.document.getElementById('pass').select();
                window.document.getElementById('pass').focus();
		return false;
	}
return true;
}

