function Rezerwacja(frm) {

    if (frm.nazwisko.value=="") {

    frm.nazwisko.style.backgroundColor = "#e5cab2";



        return false;

    }

	else

	{

   	 frm.nazwisko.style.backgroundColor = "#E4E4E4";

	}



    if (frm.telefon.value=="") {

    frm.telefon.style.backgroundColor = "#e5cab2";

        return false;

    }

	else

	{

   	 frm.telefon.style.backgroundColor = "#E4E4E4";

	}





    if (frm.email.value=="") {

    frm.email.style.backgroundColor = "#e5cab2";

        return false;

    }



	else

	{

   	 frm.email.style.backgroundColor = "#E4E4E4";

	}



    if (frm.firstinput.value=="") {

    frm.firstinput.style.backgroundColor = "#e5cab2";

        return false;

    }

	else

	{

   	 frm.firstinput.style.backgroundColor = "#E4E4E4";

	}





    if (frm.secondinput.value=="") {

    frm.secondinput.style.backgroundColor = "#e5cab2";

        return false;

    }

	else

	{

   	 frm.secondinput.style.backgroundColor = "#E4E4E4";

	}





    if (frm.firstinput.value<"") {

    frm.secondinput.style.backgroundColor = "#e5cab2";

    document.getElementById('napisdata1').innerHTML="data już mineła";

        return false;

    }



	else



		{

    			if (frm.firstinput.value==frm.secondinput.value) {

			frm.secondinput.style.backgroundColor = "#e5cab2";

			document.getElementById('napisdata1').innerHTML="daty są takie same";

		        return false;

	        }

		else 



			{

			    if (frm.firstinput.value>frm.secondinput.value) {

			    frm.secondinput.style.backgroundColor = "#e5cab2";

			    document.getElementById('napisdata1').innerHTML="nie poprawna data do<br />( data do nie może być przed data od )";

			    return false;

    			}

		else

		{

		document.getElementById('napisdata1').style.display = 'none';

		}

		}

	}

    if (frm.pokoje1.value=="" && frm.pokoje2.value=="" && frm.pokoje3.value=="" && frm.pokoje4.value=="") {

	document.getElementById('napisdata2').innerHTML="wybierz pokój";

        return false;

    }



}
