function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openWindow(str,features){
        window.name='windowOpener';
        window.open(str,'newWindow',features);
}
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=1,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpWindowNS(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars=0,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}


function zaloguj(){
	if (document.login.username.value == ''){
		alert ('Proszę wpisać Login !');
		document.login.username.focus();
	} else if (document.login.password.value == ''){
		alert ('Proszę wpisać Hasło !');
		document.login.password.focus();
	} else {
		document.login.submit();
	}
}

function checkEmail()	{
	
	var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
	
	if (!emailRegExp.test(document.emailForm.email.value))	{

		document.emailForm.email.focus();
		alert('Podaj prawidłowo swój adres email!');
		return false;
	}

	return true;
}

function checkCFPL()	{

	if (!document.contactForm.imie.value.length)	{

		document.contactForm.imie.focus();
		alert('Podaj imię!');
		return false;
	}

	if (!document.contactForm.nazwisko.value.length)	{

		document.contactForm.nazwisko.focus();
		alert('Podaj nazwisko!');
		return false;
	}

	var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
	
	if (!emailRegExp.test(document.contactForm.email.value))	{

		document.contactForm.email.focus();
		alert('Podaj prawidłowo swój adres email!');
		return false;
	}

	return true;
}

function checkCFENG()	{

	if (!document.contactForm.imie.value.length)	{

		document.contactForm.imie.focus();
		alert('This filed is mandatory!');
		return false;
	}

	if (!document.contactForm.nazwisko.value.length)	{

		document.contactForm.nazwisko.focus();
		alert('This filed is mandatory!');
		return false;
	}

	var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
	
	if (!emailRegExp.test(document.contactForm.email.value))	{

		document.contactForm.email.focus();
		alert('This filed is mandatory!');
		return false;
	}

	return true;
}
function checkCFDE()	{

	if (!document.contactForm.imie.value.length)	{

		document.contactForm.imie.focus();
		alert('Obligatorisch!');
		return false;
	}

	if (!document.contactForm.nazwisko.value.length)	{

		document.contactForm.nazwisko.focus();
		alert('Obligatorisch!');
		return false;
	}

	var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
	
	if (!emailRegExp.test(document.contactForm.email.value))	{

		document.contactForm.email.focus();
		alert('Obligatorisch!');
		return false;
	}

	return true;
}

function checkCFHU()	{

	if (!document.contactForm.imie.value.length)	{

		document.contactForm.imie.focus();
		alert('This filed is mandatory!');
		return false;
	}

	if (!document.contactForm.nazwisko.value.length)	{

		document.contactForm.nazwisko.focus();
		alert('This filed is mandatory!');
		return false;
	}

	var emailRegExp = /^[A-Za-z0-9._\-]+@(([A-Za-z]\.)|([A-Za-z0-9][A-Za-z0-9\-]+\.))+[A-Za-z]+$/;
	
	if (!emailRegExp.test(document.contactForm.email.value))	{

		document.contactForm.email.focus();
		alert('This filed is mandatory!');
		return false;
	}

	return true;
}