function testowa() {
	alert('jest ok');
}

function validate_required(field,alerttxt)
{
	with (field)
	{
		if (value==null||value=="") {alert(alerttxt);return false}
		else {return true}
	}
}

function validate_email(field,alerttxt)
{
	with (field)
	{
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) 
		  {alert(alerttxt);return false}
		else {return true}
	}
}

function zwrocId(id) {
	return document.getElementById(id);
}

function clearTip(id,txt) {
	if (zwrocId(id).value==txt) {
		zwrocId(id).value='';
	} 
}

function showTip(id,txt) {
	if (zwrocId(id).value=='') {
		zwrocId(id).value=txt;
	} 
}

function dynamiczneSelekty() {
	window.onload = function() {
		dynamicSelect('wojewodztwo', 'miasto');
	}
}


function wyslijZapytanie(formularz) {
	var wynik = validate_form(document.getElementById(formularz));
	if (!wynik) {
		document.getElementById(formularz).submit();
		return true;
	} else {
		return false;
	}
	
}


