<!--
function setCurrentDate(){
today = new Date();
themonth = today.getMonth()+1;
theday = today.getDate();
document.Form1.year.selectedIndex = 0;
document.Form1.month.selectedIndex = Number(themonth-1);
setDays(); 
document.Form1.day.selectedIndex = Number(theday-1);
}
function setDays() {
var y = document.Form1.year.options[document.Form1.year.selectedIndex].text;
var m = document.Form1.month.selectedIndex;
var d;
if ( (m == 3) || (m == 5) || (m == 8) || (m == 10) ) {
days = 30;
}

else if (m == 1) {
if ( (Math.floor(y/4) == (y/4)) && ((Math.floor(y/100) != (y/100)) || (Math.floor(y/400) == (y/400))) )
days = 29
else
days = 28
}

else {
days = 31;
}

if (days > document.Form1.day.length) {
for (i = document.Form1.day.length; i < days; i++) {
document.Form1.day.length = days;
document.Form1.day.options[i].text = i + 1;
document.Form1.day.options[i].value = i + 1;
}
}
if (days < document.Form1.day.length) {
document.Form1.day.length = days;
if (document.Form1.day.selectedIndex == -1) 
document.Form1.day.selectedIndex = days - 1;
}
}

function hotelList(x){
var sel_date;
var dep_date;
var dep_mont;
var dep_year;

if(parseInt(document.Form1.day.options[document.Form1.day.selectedIndex].value)<=9){
sel_date = "0"+document.Form1.day.options[document.Form1.day.selectedIndex].value;
}else{
sel_date = document.Form1.day.options[document.Form1.day.selectedIndex].value;
}

dep_date = parseInt(document.Form1.day.options[document.Form1.day.selectedIndex].value) + parseInt(document.Form1.noNights.options[document.Form1.noNights.selectedIndex].text);
dep_mont = parseInt(document.Form1.month.selectedIndex)+1;
dep_year = parseInt(document.Form1.year.options[document.Form1.year.selectedIndex].value);

if (dep_date > calcDays(dep_mont)){
dep_date = dep_date - parseInt(calcDays(dep_mont));
dep_mont = dep_mont+1;
}

if (dep_mont > 12){
dep_mont = 1;
dep_year = dep_year+1;
}

if(dep_date < 10){
dep_date = "0"+dep_date+"";
}
if(dep_mont < 10){
dep_mont = "0"+dep_mont+"";
}

var dep_day = dep_date+"/"+dep_mont+"/"+dep_year+"-00:00";
var sel_day = sel_date+"/"+document.Form1.month.options[document.Form1.month.selectedIndex].value+"/"+document.Form1.year.options[document.Form1.year.selectedIndex].value+"-00:00";

var todayDay = new Date();
    var SelectedDay = new Date(""+document.Form1.month.options[document.Form1.month.selectedIndex].text+" "+document.Form1.day.options[document.Form1.day.selectedIndex].text+", "+document.Form1.year.options[document.Form1.year.selectedIndex].value+" 23:59:59");//" 23:59:59"); INSERT ME TO BOOK ON THE SAME DAY
    if (SelectedDay<todayDay){
	 alert("You may only search from Today's Date\nPlease check the date and try again."); //CHANGE MESSAGE IF ALLOWING SAME DAY BOOKINGS
	 document.Form1.month.focus()
     return;
    }

top.location='http://www1.roomsnet.com/servlets/DUBHOT2_Res_Search_Servlet2_New_AFF?Sql_in=&Start_in=1&End_in=10&City=DUB&State=-&Price_range=0-9999&Country=-&Hotel=-&Date_S='+sel_day+'&Date_O='+dep_day+'&G_Type=1&Rooms='+document.Form1.noRooms.options[document.Form1.noRooms.selectedIndex].text+'&Persones=-&Adults=0&Children=0&Duration='+document.Form1.noNights.options[document.Form1.noNights.selectedIndex].text+'&Room_Type_Code=0&Room_Cat_Code=0&Hotel_Type=All&Hotel_Cat_Code=0&Uesr_Type=IU1&Industry_Code=-&Username=DemoIu1&stat=1&Logo=-&Step_Bar=-&Hot_Info=-&Fo_Icon=-&Vi_Icon=-&Step_Bar_font=-&Hot_Info_font=-&Fo_Icon_font=-&Vi_Icon_font=-&MyAffiliateCode=DUBH&Hot_stat=B&room_person=R';
}

function getCallender(){
window.open('http://www1.roomsnet.com/servlets/DUBHOT2_Callender_All_1?Value=0&Property_Name=Qhot','ID','width=235,height=350,statusbar=no,toolbar=no,addressbar=no,top=200,left=580');
}

function calcDays(month){
var m = parseInt(month)-1;
var days;
var y = document.Form1.year.options[document.Form1.year.selectedIndex].text;
if ( (m == 3) || (m == 5) || (m == 8) || (m == 10) ) {
days = 30;
}
else if (m == 1) {
if ( (Math.floor(y/4) == (y/4)) && ((Math.floor(y/100) != (y/100)) || (Math.floor(y/400) == (y/400))) )
days = 29
else
days = 28
}
else {
days = 31;
}
return days;
}
-->
