function validate(theform)
{
var x=theform.dat.value;

x=new Date(x);

var m = x.getMonth()+1;
var y = x.getYear();
var d = x.getDate();
var s=new String(y)

for(i=0;i<s.length;i++);

l=s.length
if (l>2 && l<4)
{
s=s.substring(1,3)
y=parseInt(s)
}

for(i=0;i<s.length;i++);

if (i<4)
y = y + 2000

var dtm = theform.Dmonth.selectedIndex;
var dtd = theform.Dday.selectedIndex;
var dty = theform.Dyear.selectedIndex;


var dtom = theform.Dtmonth.selectedIndex;
var dtod = theform.Dtday.selectedIndex;
var dtoy = theform.Dtyear.selectedIndex;

var dtyv = theform.Dyear[dty].value;
var dtmv = theform.Dmonth[dtm].value;
var dtdv = theform.Dday[dtd].value;


var dtoyv = theform.Dtyear[dtoy].value;
var dtomv = theform.Dtmonth[dtom].value;
var dtodv = theform.Dtday[dtod].value;


if(theform.Name.value == "")
{
alert ("Please enter your name.");
theform.Name.select();
theform.Name.focus();
return false;
}
else
{
for(var i=0;i<theform.Name.value.length;i++)
{
if(theform.Name.value.charAt(i)<'A' || theform.Name.value.charAt(i)>'Z')
{
if(theform.Name.value.charAt(i)<'a' || theform.Name.value.charAt(i)>'z')
{
if(!((theform.Name.value.charAt(i)=='.') || (theform.Name.value.charAt(i)==' ')))
{
alert("Only alphabets, a space and a . are allowed.");
theform.Name.select();
theform.Name.focus();
return false;
}
}
}
}
}
if(theform.Address.value == "")
{
 alert("Please enter your address.")
 theform.Address.select();
 theform.Address.focus();
 return false;
}

if(theform.Telephone.value == "")
{
 alert("Please enter your telephone number.")
 theform.Telephone.select();
 theform.Telephone.focus();
 return false;
}
else
 {
  a = theform.Telephone.value;
  var i=0;
  for(i=0;i<a.length;i++)
  {
   if(a.charAt(i) < '0'|| a.charAt(i) > '9') 
   {
    if(!(a.charAt(i) == ' ' || a.charAt(i) == '(' || a.charAt(i)==')' || a.charAt(i)==',' || a.charAt(i)=='/' || a.charAt(i)=='-' || a.charAt(i)=='+' || a.charAt(i)=='[' || a.charAt(i)==']')) 
    {
     alert("Characters and Special symbols are not allowed in the Phone field.");
     theform.Telephone.select();
     theform.Telephone.focus();
     return false;
    }
   }
  }
 }

if(theform.Email.value.indexOf(".") == -1 || theform.Email.value == "" || theform.Email.value.indexOf("@") == -1)
{
alert("Please enter a valid email address.")
 theform.Email.select(); 
 theform.Email.focus();
  return false;
   }

if(theform.HotelName.selectedIndex==0)
{
alert("Please select the hotel of your choice.");
theform.HotelName.focus();
return false;
}

if(theform.RoomType.selectedIndex==0)
{
alert("Please select the room type.");
theform.RoomType.focus();
return false;
}


if(theform.RoomType.value=="")
{
alert("Please select the room type.");
theform.RoomType.focus();
return false;
}


if(theform.HotelName.selectedIndex==1 && (theform.RoomType.selectedIndex==9 || theform.RoomType.selectedIndex==10 || theform.RoomType.selectedIndex==11 || theform.RoomType.selectedIndex==12 || theform.RoomType.selectedIndex==13 || theform.RoomType.selectedIndex==14 || theform.RoomType.selectedIndex==15 || theform.RoomType.selectedIndex==16))
{
alert("Please select the room type.");
theform.RoomType.focus();
return false;
}

if(theform.HotelName.selectedIndex==3 && (theform.RoomType.selectedIndex==15 || theform.RoomType.selectedIndex==16))
{
alert("Please select the room type.");
theform.RoomType.focus();
return false;
}

//From date validations

if(theform.Dmonth.selectedIndex==0)
{
alert("Select the month.");
theform.Dmonth.focus();
return false;
}

if(theform.Dday.selectedIndex==0)
{
alert("Select the day.");
theform.Dday.focus();
return false;
}

if(theform.Dyear.selectedIndex==0)
{

alert("Select the year.");
theform.Dyear.focus();
return false;
}

if((dtm == 2 || dtm == 4 || dtm == 6 || dtm == 9 || dtm == 11) && dtd == 31)
{
alert("Please select the day again as this month does not have 31 days.");
theform.Dday.focus();
return false;
}

if(dtm == 2 && dtd == 30)
{
alert("Please select the day again as this month does not have 30 days.");
theform.Dday.focus();
return false;
}

if(dtyv %4 !=0 && dtm == 2 && dtd ==29)
{
alert("This is not a leap year.");

theform.Dday.focus();
return false;
}


//Seven days advance booking validation
if(y-dtyv==0  && m-dtmv==0 && (dtdv-d==0 || dtdv-d==1 || dtdv-d==2 || dtdv-d==3))
//if(y-dtyv==0  && m-dtmv==0 && (dtdv-d==0 || dtdv-d==1 || dtdv-d==2 || dtdv-d==3 || dtdv-d==4 || dtdv-d==5 || dtdv-d==6 || dtdv-d==7))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}


//if the  selected day is below  the current day

/*alert("day")
alert(dtdv-d<0)
alert("month")
alert(dtmv-m)
alert("year")
alert(dtyv-y)*/

if(dtyv-y==0 && dtmv-m==0 && dtdv-d<0)
{
alert("Invalid day.");
theform.Dday.focus();
return false;
}

//if the  selected month is below  the current month 
//alert(m-dtmv<0)

if(dtyv-y==0 && m-dtmv>0)
{
alert("Invalid month.");
theform.Dmonth.focus();
return false;
}


//If the  selected year is below  the current year

if(dtyv-y<0)
{
alert("Invalid year.");
theform.Dyear.focus();
return false;
}


//For the month of february

/*if(m == 2 && d == 22 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}


if(m == 2 && d == 23 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}

if(m == 2 && d == 24 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}

if(m == 2 && d == 25 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}*/

if(m == 2 && d == 26 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}

if(m == 2 && d == 27 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}

if(m == 2 && d == 28 && y%4 != 0)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}

if((m == 2))
{
if(theform.Dtmonth.selectedIndex==0)
{
alert("Select the month.");
theform.Dtmonth.focus();
return false;
}


if(theform.Dtday.selectedIndex==0)
{
alert("Select the day.");
theform.Dtday.focus();
return false;
}

if(theform.Dtyear.selectedIndex==0)
{
alert("Select the year.");
theform.Dtyear.focus();
return false;
}

if((dtom == 2 || dtom == 4 || dtom == 6 || dtom == 9 || dtom == 11) && dtod == 31)
{
alert("Please select the day again as this month does not have 31 days.");
theform.Dtday.focus();
return false;
}

if(dtom == 2 && dtod == 30)
{
alert("Please select the day again as this month does not have 30 days.");
theform.Dtday.focus();
return false;
}

if(dtoyv %4 !=0 && dtom == 2 && dtod ==29)
{
alert("This is not a leap year.");
theform.Dtday.focus();
return false;
}

/*if(dtoyv-dtyv==0 && dtomv-dtmv==0 && dtodv-dtdv==0)
{
alert("You have to book the room for atleast one day.");
theform.Dtday.focus();
return false;
}*/


//if the  selected day is below  the current day
if(dtoyv-y==0 && dtomv-dtmv==0 && dtodv-dtdv<0)
{
alert("Invalid day.");
theform.Dtday.focus();
return false;
}


// if the  selected month is below  the current month 
if(dtoyv-y==0 && dtomv-dtmv<0)
{
alert("Invalid month.");
theform.Dtmonth.focus();
return false;
}



//if the selected year is below  the current year 
if(dtoyv-y<0)
{
alert("Invalid year.");
theform.Dtyear.focus();
return false;
}


if(dtoyv-dtyv<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}

}


//For 30 days in a month

/*if((m == 4 || m == 6 || m == 9 || m == 11) && d == 24)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}


if((m == 4 || m == 6 || m == 9 || m == 11) && d == 25)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}



if((m == 4 || m == 6 || m == 9 || m == 11) && d == 26)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}


if((m == 4 || m == 6 || m == 9 || m == 11) && d == 27)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}
*/


if((m == 4 || m == 6 || m == 9 || m == 11) && d == 28)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}



if((m == 4 || m == 6 || m == 9 || m == 11) && d == 29)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}


if((m == 4 || m == 6 || m == 9 || m == 11) && d == 30)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}


if((m == 4 || m == 6 || m == 9 || m == 11))
{
if(theform.Dtmonth.selectedIndex==0)
{
alert("Select the month.");
theform.Dtmonth.focus();
return false;
}


if(theform.Dtday.selectedIndex==0)
{
alert("Select the day.");
theform.Dtday.focus();
return false;
}

if(theform.Dtyear.selectedIndex==0)
{
alert("Select the year.");
theform.Dtyear.focus();
return false;
}
if((dtom == 2 || dtom == 4 || dtom == 6 || dtom == 9 || dtom == 11) && dtod == 31)
{
alert("Please select the day again as this month does not have 31 days.");
theform.Dtday.focus();
return false;
}

if(dtom == 2 && dtod == 30)
{
alert("Please select the day again as this month does not have 30 days.");
theform.Dtday.focus();
return false;
}


if(dtoyv %4 !=0 && dtom == 2 && dtod ==29)
{
alert("This is not a leap year.");
theform.Dtday.focus();
return false;
}

/*if(dtoyv-dtyv==0 && dtomv-dtmv==0 && dtodv-dtdv==0)
{
alert("You have to book the room for atleast one day.");
theform.Dtday.focus();
return false;
}
*/

//if the  selected year is below  the curruent year 
if(dtoyv-y<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}

if(dtoyv-dtyv<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}


// if the  selected month is below  the curruent month 
if(dtoyv-y==0 && dtomv-dtmv<0)
{
alert("Invalid entry.");
theform.Dtmonth.focus();
return false;
}

//if the  selected day is below  the curruent day
if(dtoyv-y==0 && dtomv-dtmv==0 && dtodv-dtdv<0)
{
alert("Invalid entry.");
theform.Dtday.focus();
return false;
}
}

//For 31 days in a month

/*if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 25)

{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}

}

if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 26)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}

if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 27)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}

if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 28)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4))
{
alert("Bookings have to be made a minimum of seven days in advance.");
theform.Dday.focus();
return false;
}
}*/

if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 29)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}


if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 30)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}

if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 31)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}
}


//for 30 days
if((m==1 || m ==3 || m ==5 || m ==7 || m ==8 || m ==10 || m==12)) 
//if((m==1 || m ==3 || m ==5 || m ==7 || m ==8 || m ==10 || m==12) && (d == 30 || d == 29 || d == 28 || d == 27))
{
if(theform.Dtmonth.selectedIndex==0)
{
alert("Select the month.");
theform.Dtmonth.focus();
return false;
}

if(theform.Dtday.selectedIndex==0)
{
alert("Select the day.");
theform.Dtday.focus();
return false;
}

if(theform.Dtyear.selectedIndex==0)
{
alert("Select the year.");
theform.Dtyear.focus();
return false;
}


if((dtom == 2 || dtom == 4 || dtom == 6 || dtom == 9 || dtom == 11) && dtod == 31)
{
alert("Please select the day again as this month does not have 31 days.");
theform.Dtday.focus();
return false;
}

if(dtom == 2 && dtod == 30)
{
alert("Please select the day again as this month does not have 30 days.");
theform.Dtday.focus();
return false;
}


if(dtoyv %4 !=0 && dtom == 2 && dtod ==29)
{
alert("This is not a leap year.");
theform.Dtday.focus();
return false;
}

/*if(dtoyv-dtyv==0 && dtomv-dtmv==0 && dtodv-dtdv==0)
{
alert("You have to book the room for atleast one day.");
theform.Dtday.focus();
return false;
}*/


//if the  selected year is below  the current year 
if(dtoyv-y<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}


if(dtoyv-dtyv<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}


// if the  selected month is below  the current month 
if(dtoyv-y==0 && dtomv-dtmv<0)
{
alert("Invalid entry.");
theform.Dtmonth.focus();
return false;
}

//if the  selected day is below  the current day
if(dtoyv-y==0 && dtomv-dtmv==0 && dtodv-dtdv<0)
{
alert("Invalid entry");
theform.Dtday.focus();
return false;
}
}


if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 31)
{
if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3))
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
{
alert("Bookings have to be made a minimum of three days in advance.");
theform.Dday.focus();
return false;
}


//To date validations for 31 days
if((m==1 || m ==3 || m ==5 || m ==7 || m ==8 || m ==10 || m==12))
{
if(theform.Dtmonth.selectedIndex==0)
{
alert("Select the month.");
theform.Dtmonth.focus();
return false;
}

if(theform.Dtday.selectedIndex==0)
{
alert("Select the day.");
theform.Dtday.focus();
return false;
}

if(theform.Dtyear.selectedIndex==0)
{
alert("Select the year.");
theform.Dtyear.focus();
return false;
}


if((dtom == 2 || dtom == 4 || dtom == 6 || dtom == 9 || dtom == 11) && dtod == 31)
{
alert("Please select the day again as this month does not have 31 days.");
theform.Dtday.focus();
return false;
}

if(dtom == 2 && dtod == 30)
{
alert("Please select the day again as this month does not have 30 days.");
theform.Dtday.focus();
return false;
}


if(dtoyv %4 !=0 && dtom == 2 && dtod ==29)
{
alert("This is not a leap year.");
theform.Dtday.focus();
return false;
}

/*if(dtoyv-dtyv==0 && dtomv-dtmv==0 && dtodv-dtdv==0)
{
alert("You have to book the room for atleast one day.");
theform.Dtday.focus();
return false;
}*/


//if the  selected year is below  the current year 
if(dtoyv-y<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}


if(dtoyv-dtyv<0)
{
alert("Invalid entry.");
theform.Dtyear.focus();
return false;
}


// if the  selected month is below  the current month 
if(dtoyv-y==0 && dtomv-dtmv<0)
{
alert("Invalid entry.");
theform.Dtmonth.focus();
return false;
}

//if the  selected day is below  the current day
if(dtoyv-y==0 && dtomv-dtmv==0 && dtodv-dtdv<0)
{
alert("Invalid entry");
theform.Dtday.focus();
return false;
}
}

//From date validations
// if the  selected day is 1st or 2nd of the month than the order (30 or 31st) day of the last month(leap year)

//if(m == 2 && d == 29)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if(m == 2 && d == 27 && y%4 != 0)
//{
//if(dtyv-y==0 && dtmv-m==1 && dtdv==1)
//{
//alert("The delivery period should be more than two days from the date of order");
//theform.Dday.focus();
//return false;
//}
//}


//if(m == 2 && d == 28 && y%4 != 0)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if(m == 2 && d == 28 && y%4 == 0)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if((m == 4 || m == 6 || m == 9 || m == 11) && d == 29)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if((m == 4 || m == 6 || m == 9 || m == 11) && d == 30)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 29)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 30)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}
//}

//if((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 31)
//{
//if(dtyv-y==0 && dtmv-m==1 && (dtdv==1 || dtdv==2 || dtdv==3 || dtdv==4 || dtdv==5 || dtdv==6 || dtdv==7))
//{
//alert("Bookings cannot be made less than seven days in advance.");
//theform.Dday.focus();
//return false;
//}

}

/*if(theform.Payment.selectedIndex==0)
{
alert("Please select the mode of payment.");
theform.Payment.focus();
return false;
}*/

return true;
}


