function checkFields_book( ){
var hotelid = document.fm_booking.hotelid.value;
var datein = document.fm_booking.liveInDate.value;
var length = document.fm_booking.length1.selectedIndex+1;

var rooms = 1; //document.fm_booking.rooms.selectedIndex+1;
var adults = document.fm_booking.adults.selectedIndex;
var child = document.fm_booking.children.selectedIndex;
var date = datein.split("/");
var month=date[0];

if (month == 1){
	month = "JAN";	
}
if (month == 2){
	month = "FEB";	
}
if (month == 3){
	month = "MAR";	
}
if (month == 4){
	month = "APR";	
}
if (month == 5){
	month = "MAY";	
}
if (month == 6){
	month = "JUN";	
}
if (month == 7){
	month = "JUL";	
}
if (month == 8){
	month = "AUG";	
}
if (month == 9){
	month = "SEP";	
}
if (month == 10){
	month = "OCT";	
}
if (month == 11){
	month = "NOV";	
}
if (month == 12){
	month = "DEC";	
}

var date_input = new Date(month + " " + date[1]+", "+date[2]);
date_input.setDate(date_input.getDate() + length);

var out_date = date_input.getDate();
var out_month = date_input.getMonth()+1;
var out_year = date_input.getFullYear();

if (out_month == 1){
	out_month = "JAN";	
}
if (out_month == 2){
	out_month = "FEB";	
}
if (out_month == 3){
	out_month = "MAR";	
}
if (out_month == 4){
	out_month = "APR";	
}
if (out_month == 5){
	out_month = "MAY";	
}
if (out_month == 6){
	out_month = "JUN";	
}
if (out_month == 7){
	out_month = "JUL";	
}
if (out_month == 8){
	out_month = "AUG";	
}
if (out_month == 9){
	out_month = "SEP";	
}
if (out_month == 10){
	out_month = "OCT";	
}
if (out_month == 11){
	out_month = "NOV";	
}
if (out_month == 12){
	out_month = "DEC";	
}

if (document.fm_booking.hotelid.value=="0"){
	alert("Please select a hotel");
	document.fm_booking.hotelid.focus();
	return false ;
}

else if (document.fm_booking.datein.value==""){
	alert("Please select a date");
	document.fm_booking.datein.focus();
	return false ;
}

window.open("https://booking.ihotelier.com/istay/istay.jsp?Hotelid="+hotelid+"&Datein="+datein+"&Length="+length+"&Rooms="+rooms+"&Adults="+adults+"&Children="+child+"&Languageid=1");

return false;
}