
         function setDefaultValues()
         {
            function selectDefaultValue(obj, val)
            {
               for (i=0;i<obj.length;i++) if (obj[i].value==val || obj[i].text==val) { obj[i].selected = true; break; }
            }
            var today = new Date(), tomorrow = new Date();
            tomorrow.setDate(today.getDate()+1);
            
            selectDefaultValue(document.searchForm.arrivalDay, today.getDate());
            selectDefaultValue(document.searchForm.arrivalMonth, today.getMonth()+1);
            selectDefaultValue(document.searchForm.arrivalYear, today.getYear());
            selectDefaultValue(document.searchForm.departureDay, tomorrow.getDate());
            selectDefaultValue(document.searchForm.departureMonth, tomorrow.getMonth()+1);
            selectDefaultValue(document.searchForm.departureYear, tomorrow.getYear());
            selectDefaultValue(document.searchForm.numberRooms, 1);
         }
         function validForm(searchForm)
         {
            var n=0;
            var today=new Date();
            var todayDate = ""+today.getYear();
            if (today.getMonth()+1 < 10) todayDate += "0";
            todayDate += today.getMonth()+1;
            if (today.getDate() < 10) todayDate += "0";
            todayDate += today.getDate();

				// alert(todayDate);


            var arrivalDate = ""+searchForm.arrivalYear.options[searchForm.arrivalYear.selectedIndex].text;
            if (searchForm.arrivalMonth.options[searchForm.arrivalMonth.selectedIndex].value < 10) arrivalDate += "0";
            arrivalDate += searchForm.arrivalMonth.options[searchForm.arrivalMonth.selectedIndex].value;
            if (searchForm.arrivalDay.options[searchForm.arrivalDay.selectedIndex].text < 10) arrivalDate += "0";
            arrivalDate += searchForm.arrivalDay.options[searchForm.arrivalDay.selectedIndex].text;

            var departureDate = ""+searchForm.departureYear.options[searchForm.departureYear.selectedIndex].text;
            if (searchForm.departureMonth.options[searchForm.departureMonth.selectedIndex].value < 10) departureDate += "0";
            departureDate += searchForm.departureMonth.options[searchForm.departureMonth.selectedIndex].value;
            if (searchForm.departureDay.options[searchForm.departureDay.selectedIndex].text < 10) departureDate += "0";
            departureDate += searchForm.departureDay.options[searchForm.departureDay.selectedIndex].text;

            if (arrivalDate < todayDate || arrivalDate > departureDate)
               { alert('Incorrect arrival date!'); ++n; }
            else if (departureDate < todayDate || departureDate < arrivalDate)
               { alert('Incorrect departure date!'); ++n; }
            else if (searchForm.numberRooms.options[searchForm.numberRooms.selectedIndex].text==0)
               { alert('Incorrect number nights!'); ++n; }
//            else if (searchForm.city.value.length == "City" || )
//               { alert('Please select your destination city!'); ++n; }
//            else if (searchForm.countryCode.options[searchForm.countryCode.selectedIndex].text == "" || searchForm.countryCode.options[searchForm.countryCode.selectedIndex].text == "Country")
//               { alert('Please select your destination country!'); ++n; }

            return n==0;
         }