function allTest() {

				nonights = (document.booking.nonights[document.booking.nonights.selectedIndex].value);
              if (nonights=="0"){
                alert("If you want to stay for more than 7 nights, just book the first 7 nights and then, upon arrival at the hostel, you can arrange the rest of your stay with reception.");
                document.booking.nonights.focus();
                flag=1;
                return false;
                            }

				noguests = parseInt(document.booking.noguests[document.booking.noguests.selectedIndex].value);
              if (noguests=="0"){
                alert("For bookings of more than 6 people please call the hostel directly.");
                document.booking.noguests.focus();
                flag=1;
                return false;
                            }
				nomales = parseInt(document.booking.nomales[document.booking.nomales.selectedIndex].value);
				nofemales = parseInt(document.booking.nofemales[document.booking.nofemales.selectedIndex].value);
				nogender = parseInt(nomales + nofemales);		
              if (noguests != nogender){
                alert("The number of Males + Females that you've indicated, do not add up to the total Number of Guests. Please amend it");
                document.booking.noguests.focus();
                flag=1;
                return false;
                            }
				
/* Time function for booking date calculation */		
              todayDate = new Date();
		  	  var regex=/^([0-3][0-9])-([0-1][0-9])-([0-9]{2,4})?$/;
			  var parts=document.booking.arrivedate.value.replace(regex,"$3 $2 $1").split(' ');
			  Georgian = new Date(parts[0],parts[1]-1,parts[2]);
			  Georgian = new Date(Georgian);
        	  timeDiff = Georgian - todayDate;
        	  exactTime = eval((((timeDiff/1000)/60)/60)/24);
        	  critTime = Math.ceil(exactTime);


			  booktab = new Date("July 31, 2009");
			  booktab = booktab.getTime();

         if(critTime <0)
                  {
           alert("The date you are trying to book for has already passed. Please select a new date!");
                document.booking.day.focus();
                flag=1;
                return false;
                  }

         if(critTime <1)
                  {
           alert("Advance booking requires 1 days notice. For bookings for today please call the hostel directly to check on accommodation availability.");
                document.booking.day.focus();
                flag=1;
                return false;
                  }

                document.booking.submit();
                 }