function checkForm(){
	var msg = "";

	WzorP=/^[a-zA-Z]{3,3}$/;
	WzorD=/^[0-9]{4,4}\-[0-9]{2,2}\-[0-9]{2,2}$/;


	if (!WzorP.test(document.forms[0].departure_port.value) || document.forms[0].departure_port.value.length!=3)
	{
		document.forms[0].departure_port.focus();
		msg = msg + "\n - departure port missing - type airport code or select it from the list";
	}


	if (!WzorP.test(document.forms[0].arrival_port.value) || document.forms[0].arrival_port.value.length!=3)
	{
		document.forms[0].arrival_port.focus();
		msg = msg + "\n - arrival port missing -type airport code or select it from the list";
	}


	if (!WzorD.test(document.forms[0].dep_date.value) || document.forms[0].dep_date.value.length!=10)
	{
		document.forms[0].dep_date.focus();
		msg = msg + "\n - please provide correct departure date in YYYY-MM-DD format";
	}

	if ((!WzorD.test(document.forms[0].arr_date.value) || document.forms[0].arr_date.value.length!=10) && document.forms[0].arr_date.disabled==false)
	{
		document.forms[0].arr_date.focus();
		msg = msg + "\n - please provide correct return date in YYYY-MM-DD format";

	}


	if(msg){
		alert("Mising or incorrect data: \n" + msg);
		return false;
	} else
	return true;
}


