function demoVersion() {
	alert('Opcja nieaktywna w wersji demonstracyjnej');
}

function menuOn( _name ){
	document.getElementById(_name).className = "active";
	document.getElementById(_name + "_sub").style.display = "block";
}

function menuOff( _name ){
	document.getElementById(_name).className = "";
	document.getElementById(_name + "_sub").style.display = "none";

}

function wopen(page, title, width, height, features) {
	if(!page)
		return false;

	if(!width)
		width = '500';

	if(!height)
		height = '550';

	if(!features)
		features = ', scrollbars=0,resizable=0,status=0';
		
	window.open( page, title, 'width=' + width + ' , height=' + height + features);
}
function openEmail()
{
	window.open("include/email.php", "email", "width=350,height=440,scrollbars=0,resizable=0,status=0");
}
function testEmailAdress(a) {return (!(a.match(/[\w\.\-\_]+\@[\w\-\_]+[\w\.\-\_]+[\w]{2,4}/)));}

function ask_check_form(form){

	if (form.imie.value.length < 1){
		alert('Proszę wypełnić pole "Imię".');
		form.imie.focus();
		return;
	}
	if (form.nazwisko.value.length < 1){
		alert('Proszę wypełnić pole "Nazwisko".');
		form.nazwisko.focus();
		return;
	}
	if (form.firma.value.length < 1){
		alert('Proszę wypełnić pole "Firma".');
		form.firma.focus();
		return;
	}
	if (form.telefon.value.length < 1){
		alert('Proszę wypełnić pole "Telefon".');
		form.telefon.focus();
		return;
	}
	if (testEmailAdress(form.email.value)){
		alert('Proszę wypełnić pole "E-mail".');
		form.email.focus();
		return;
	}	
	
	form.submit();
}