function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);
}

function check_focus() {
	if (document.form.email.value == 'wpisz swój adres e-mail')
		document.form.email.value = '';
}

function check_blur() {
	if (document.form.email.value == '')
		document.form.email.value = 'wpisz swój adres e-mail';
}

function check()
{
var email = document.form.email;
	
	if (email.value=='' || (email.value.indexOf('@') < 0) || email.value=='wpisz swój adres e-mail')
	{
	 	
   		document.form.email.focus();	
   		document.getElementById('alert').style.display ="block";
   		return false;
   		
	} else { 
				for (i=0;i<document.form.opcja.length;i++)
					{
						if (document.form.opcja[i].checked)
							{
								document.form.action = 'index.php?opt=5&p='+i;
							}
					}
			} 
		
}


function check_zgloszenie()
{
var nazwisko = document.zgloszenie.nazwisko;
var pesel = document.zgloszenie.pesel;
var ulica = document.zgloszenie.ulica;
var miasto = document.zgloszenie.miasto;
var kod = document.zgloszenie.kod;
var email = document.zgloszenie.email;
var telefon = document.zgloszenie.telefon;
	


if (nazwisko.value=='')
	{
	 	
   		document.zgloszenie.nazwisko.focus();	
   		alert('Podaj swoje imię i nazwisko');
   		return false;
   		
	}
	
	

if (pesel.value=='')
	{
	 	
   		document.zgloszenie.pesel.focus();	
   		alert('Podaj swój numer pesel!');
   		return false;
   		
	}	
	

if (ulica.value=='')
	{
	 	
   		document.zgloszenie.ulica.focus();	
   		alert('Podaj ulicę!');
   		return false;
   		
	}

if (miasto.value=='')
	{
	 	
   		document.zgloszenie.miasto.focus();	
   		alert('Podaj miasto!');
   		return false;
   		
	}	


if (kod.value=='')
	{
	 	
   		document.zgloszenie.kod.focus();	
   		alert('Podaj kod pocztowy!');
   		return false;
   		
	}		
	
	
	if (email.value=='' || (email.value.indexOf('@') < 0) || email.value=='wpisz swój adres e-mail')
	{
	 	
   		document.zgloszenie.email.focus();	
   		alert('Podaj swój adres e-mail!');
   		return false;
   		
	}
	
if (telefon.value=='')
	{
	 	
   		document.zgloszenie.telefon.focus();	
   		alert('Podaj telefon kontaktowy!');
   		return false;
   		
	}		
		
}

