function checkCF()	{

	
	if (!document.contactForm.firma.value.length)	{

		document.contactForm.firma.focus();
		alert('Podaj nazwę firmy!');
		return false;
	}

	if (!document.contactForm.branza.value.length)	{

		document.contactForm.branza.focus();
		alert('Podaj branżę!');
		return false;
	}

	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;
	}

	if (!document.contactForm.stanowisko.value.length)	{

		document.contactForm.stanowisko.focus();
		alert('Podaj swoje stanowisko!');
		return false;
	}

	if (!document.contactForm.ulica.value.length)	{

		document.contactForm.ulica.focus();
		alert('Podaj ulicę!');
		return false;
	}

	if (!document.contactForm.kod.value.length)	{

		document.contactForm.kod.focus();
		alert('Podaj kod pocztowy!');
		return false;
	}

	if (!document.contactForm.miasto.value.length)	{

		document.contactForm.miasto.focus();
		alert('Podaj miejscowość!');
		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;
	}
	
	if (!document.contactForm.telefon.value.length)	{

		document.contactForm.telefon.focus();
		alert('Podaj nr telefonu!');
		return false;
	}

	if (!document.contactForm.tresc.value.length)	{

		document.contactForm.tresc.focus();
		alert('Podaj treść wiadomości!');
		return false;
	}

	return true;
}



function CheckDigit(w)	{

	if(!IsDigit())		{
		alert("Prosimy o podanie liczby.");
		if(w == 1)
			document.form1.ilosc.value = "";
		else if(w == 2)
			document.form2.ilosc.value = "";
		return false;
	}
	return true;
}


function IsDigit()	{
	
	return (((event.keyCode >= 48) && (event.keyCode <= 57)) || 
		((event.keyCode >= 96) && (event.keyCode <= 105)) ||
		event.keyCode == 27 ||
		event.keyCode == 32 ||
		event.keyCede == 20 ||
		event.keyCode == 16 ||
		event.keyCode == 17 ||
		event.keyCode == 18 ||
		event.keyCode == 93 ||
		event.keyCode == 7	||
		event.keyCode == 37	||
		event.keyCode == 38	||
		event.keyCode == 39	||
		event.keyCode == 40	||
		event.keyCode == 70	||
		event.keyCode == 46	||
		event.keyCode == 9	||
		event.keyCode == 8);
}

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+'');
}