function SubmitForm()
{
	var msg = "";

	if(document.getElementById("txtaddress") != null)
	{
		var val = TrimString(document.getElementById("txtaddress").value);
		if(val.length == 0){msg += "Wypełnij pole: Adres strony www\n";}
	}
	if(document.getElementById("txtwords") != null)
	{
		var val = TrimString(document.getElementById("txtwords").value);
		if(val.length == 0){msg += "Wypełnij pole: Słowa i frazy kluczowe\n";}
	}	
	
	var val = TrimString(document.getElementById("txtname").value);
	if(val.length == 0){msg += "Wypełnij pole: Nazwa firmy lub imię i nazwisko\n";}
	
	val = TrimString(document.getElementById("txtstreet").value);	
	if(val.length == 0){msg += "Wypełnij pole: Ulica/nr domu/mieszkania\n";}
	
	val = TrimString(document.getElementById("txtzipcode").value);	
	if(val.length == 0){msg += "Wypełnij pole: Kod pocztowy\n";}	
	
	val = TrimString(document.getElementById("txtcity").value);	
	if(val.length == 0){msg += "Wypełnij pole: Miejscowość\n";}
	
	val = TrimString(document.getElementById("txtphone").value);	
	if(val.length == 0){msg += "Wypełnij pole: Telefon\n";}
	
	val = TrimString(document.getElementById("txtemail").value);	
	if(val.length == 0){msg += "Wypełnij pole: e-mail\n";}	

	//if(IsCheck("shop") || IsCheck("shopexpert") || IsCheck("shopprof") || IsCheck("page"))
	//{
		if(!IsCheck("chklicense"))
		{
			msg += "Prosimy o zapoznanie się z licencją\noprogramowania.\n";
		}
		
		if( !IsCheck("chkpersonal"))
		{
			msg += "Prosimy o zapoznanie się z informacją\no ochronie danych osobowych.\n";
		}
	//}
	
	if(msg.length > 0)
	{
		alert(msg);
		return false;
	}
	else
	{
		document.forms[0].submit();
	}
}
function IsCheck(idChk)
{
	ctrl = document.getElementById(idChk);
	if(ctrl != null)
	{
		return ctrl.checked;
	}
	return false;
}
function TrimString(str)
{
	return str.replace(/^\s+|\s+$/g, '');
}
function Open(file,title,width,height)
{
	var left=(screen.availWidth-width)/2;
	var top=(screen.availHeight-height)/2;
	window.open(file,title,'toolbar=no,menubar=no,location=no,personalbar=no,status=no,resizable=yes,scrollbars=yes,width='+width+',height='+height+',top='+top+',left='+left+'');
}