function GetMonth(nMonth) {
		var Months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
		return Months[nMonth];
	}

function writeCalendar() {
	var sToday = new Date();
	var sCurrentDay = sToday.getDate();
	var sNextDay = sToday.getDate()+1;
	var sCurrentMonth = sToday.getMonth();
	var sCurrentYear = sToday.getFullYear();
	var sNextYear = sCurrentYear+1;

	document.write("<select name='startDay' class='vsmall'>");

	for (var i=1; i<32; i++) {
		document.write("<option value='" + i + "'");
		var sI = "" + i;
		if (sI==sNextDay) {
			document.write(" SELECTED");
		}
		document.write(">");
		var sI = "" + i;
		if (sI.length==1) {
			document.write("0" + i);
		} else {
			document.write("" + i);
		}
	}
	document.write("</select>");
	document.write("&nbsp;");
	document.write("<select name='startMonthYearCombi' class='vsmall'>");
	for (var i=sCurrentMonth; i<12; i++) {
		var iOptionI = i+1;
		document.write("<option value='" + iOptionI + "|" + sCurrentYear + "'");
		if (iOptionI==sCurrentMonth) {
			document.write(" SELECTED");
		}
		document.write(">");
		document.write(GetMonth(i) + " " + sCurrentYear.toString().substring(2,4));
	}

	for (var i=0; i<sCurrentMonth; i++) {
		var iOptionI = i+1;
		document.write("<option value='" + iOptionI + "|" + sNextYear + "'>");
		document.write(GetMonth(i) + " " + sNextYear.toString().substring(2,4));
	}

	document.write("</select>");
}

function validateInt(iString) {
    // no leading 0s allowed
    return (("" + parseInt(iString)) == iString);
}

function submitAvailability() {
	sId = document.BookingForm.hotels.value;
	document.BookingForm.groupid.value = sId;
	document.BookingForm.hotelcode.value = sId;
	if (!validateInt(sId)) {
		document.BookingForm.content.value = 'QSOutput';
		document.BookingForm.type.value = 'location';
		document.BookingForm.query.value = sId;
	} else {
		document.BookingForm.content.value = 'availabilityByHotel';
		document.BookingForm.type.value = '';
		document.BookingForm.query.value = '';
	}
	document.BookingForm.submit();
}

function writeQuickAvailability() {
	
document.write("<!-- QUICK AVAILABILITY START -->");
document.write("<td width='180' style='background-color:7291C8;' valign='top'>");
document.write("<table cellpadding='0' cellspacing='0' border='0' width='180'>");
document.write("<tr>");
document.write("<td><img src='images/side_search.jpg'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td align='center'>");
document.write("<br>");
document.write("<table cellpadding='1' cellspacing='1' border='0'  style='padding-left: 5px; border-top: 1px solid #353A8B;border-left: 1px solid #353A8B;border-bottom: 1px solid #353A8B;border-right: 1px solid #353A8B;' width='160'>");
document.write("<tr>");
document.write("<td class='textonextradarkvsmall' align='right'>");
document.write("<form action='http://www.superbreak.com/home.cfm' method='post' id='BookingForm' name='BookingForm'>");
document.write("<input type='hidden' name='content' value='availabilityByHotel' />");
document.write("<input type='hidden' name='company' value='IM234' />");
document.write("<input type='hidden' name='groupid' value='' />");
document.write("<input type='hidden' name='hotelcode' value='' />");
document.write("<input type='hidden' name='type' value='' />");
document.write("<input type='hidden' name='query' value='' />");
document.write("<input type='hidden' name='calURL' value='http://www.superbreak.com/go/IM234/behaviour/calendar.htm' />");
document.write("<input type='hidden' name='calMaxDate' value='April 30, 2007' />");
document.write("<select name='hotels' class='vsmall'>");
document.write("<option value=''>Choose an area or hotel...");
document.write("<option value=''>====ON THE RIVER====");
document.write("<option value='4112'>New Inn Hotel");
document.write("<option value='4056'>Oxford Four Pillars");
document.write("<option value='4050'>Shillingford Bridge Hotel");
document.write("<option value='1957'>The Swan at Streatley");
document.write("<option value='1964'>Reading Holiday Inn");
document.write("<option value='1904'>Danesfield House Hotel");
document.write("<option value='1903'>Compleat Angler");
document.write("<option value='1900'>Crown Plaza Marlow");
document.write("<option value='1979'>Cliveden Spa");
document.write("<option value='1916'>Oakley Court Hotel");
document.write("<option value='1959'>Christopher Wren's House");
document.write("<option value='1908'>Runnymede Hotel & Spa");
document.write("<option value='1931'>Macdonald Thames Lodge");
document.write("<option value='Ascot'>=======ASCOT=======");
document.write("<option value='1935'>Macdonald Berystede Hotel");
document.write("<option value='1917'>Royal Berkshire Ramada");
document.write("<option value='Bracknell'>=====BRACKNELL=====");
document.write("<option value='1929'>Coppid Beech Hotel");
document.write("<option value='1940'>Corus hotel Bracknell");
document.write("<option value='1966'>Grange Bracknell Hotel");
document.write("<option value='Burford'>======BURFORD======");
document.write("<option value='4157'>Bay Tree Classic Hotel");
document.write("<option value='Chipping Norton'>==CHIPPING NORTON==");
document.write("<option value='4134'>Heythrop Park");
document.write("<option value='Heathrow'>=====HEATHROW=====");
document.write("<option value='1550'>Jurys Inn Heathrow");
document.write("<option value='1517'>Ramada Heathrow");
document.write("<option value='1520'>St Giles Hotel Heathrow");
document.write("<option value='1527'>Travelodge Heathrow");
document.write("<option value='Kingham'>======KINGHAM======");
document.write("<option value='4000'>Mill House Hotel");
document.write("<option value='Kingston upon Thames'>======KINGSTON=====");
document.write("<option value='1017'>Swallow Kingston Lodge");
document.write("<option value='Maidenhead'>====MAIDENHEAD====");
document.write("<option value='1954'>Holiday Inn Maidenhead");
document.write("<option value='Newbury (Nr)'>====NEWBURY (Nr)====");
document.write("<option value='1957'>Ramada Hotel");
document.write("<option value='1924'>Regency Park Hotel");
document.write("<option value='Oxfordshire'>======OXFORD======");
document.write("<option value='4157'>Bay Tree Classic Hotel");
document.write("<option value='4061'>Cotswold Lodge Hotel");
document.write("<option value='4011'>Cromwell Lodge Hotel");
document.write("<option value='4059'>Hawkwell House Hotel");
document.write("<option value='4134'>Heythrop Park");
document.write("<option value='4052'>Linton Lodge Hotel");
document.write("<option value='4013'>Macdonald Bear Hotel");
document.write("<option value='4051'>Macdonald Eastgate");
document.write("<option value='4054'>Macdonald Randolph Hotel");
document.write("<option value='4009'>Macdonald Whately Hall");
document.write("<option value='4062'>Malmaison Oxford");
document.write("<option value='4000'>Mill House Hotel");
document.write("<option value='4053'>Oxford Belfry");
document.write("<option value='4048'>Paramount Oxford Hotel");
document.write("<option value='4049'>Spires Four Pillars");
document.write("<option value='4023'>The Swan Classic Hotel");
document.write("<option value='Reading'>======READING======");
document.write("<option value='1982'>Abbey House Hotel");
document.write("<option value='1972'>Comfort Inn Reading");
document.write("<option value='1912'>Kirtons Farm Hotel");
document.write("<option value='1915'>Quality Hotel Reading");
document.write("<option value='1963'>Reading Moat House");
document.write("<option value='1907'>Renaissance Reading Hotel");
document.write("<option value='Richmond'>=====RICHMOND=====");
document.write("<option value='1014'>The Richmond Gate Hotel");
document.write("<option value='1015'>The Richmond Hill Hotel");
document.write("<option value='1007'>The Richmond Park Hotel");
document.write("<option value='Surbiton'>=====SURBITON=====");
document.write("<option value='1981'>Travelodge Chessington");
document.write("<option value='Windsor'>======WINDSOR=====");
document.write("<option value='1958'>The Christopher Hotel");
document.write("<option value='1955'>Grovefield House Hotel");
document.write("<option value='1934'>Macdonald Castle Hotel");
document.write("<option value='1941'>Royal Adelaide Hotel");
document.write("<option value='Witney'>======WITNEY=======");
document.write("<option value='4001'>Witney Four Pillars Hotel");
document.write("<option value='Woodstock'>====WOODSTOCK=====");
document.write("<option value='7967'>Woodstock Hotel");


document.write("</select>");
document.write("</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td class='textonextradarkvsmall' align='right'>");
document.write("Arrival:");
document.write("<script language='javascript'>");
document.write("writeCalendar();");
document.write("</script>");
document.write("</td></tr>");
document.write("<tr>");
document.write("<td class='textonextradarkvsmall' align='right'>");
document.write("Nights:");
document.write("<select name='nights' class='vsmall'>");
document.write("<option value='1' selected='selected'>1</option>");
document.write("<option value='2'>2</option>");
document.write("<option value='3'>3</option>");
document.write("<option value='4'>4</option>");
document.write("<option value='5'>5</option>");
document.write("<option value='6'>6</option>");
document.write("<option value='7'>7</option>");
document.write("<option value='8'>8</option>");
document.write("<option value='9'>9</option>");
document.write("</select>");
document.write("Adults:");
document.write("<select name='adults' class='vsmall'>");
document.write("<option value='0'>0</option>");
document.write("<option value='1'>1</option>");
document.write("<option value='2' selected='selected'>2</option>");
document.write("<option value='3'>3</option>");
document.write("<option value='4'>4</option>");
document.write("<option value='5'>5</option>");
document.write("<option value='6'>6</option>");
document.write("<option value='7'>7</option>");
document.write("<option value='8'>8</option>");
document.write("<option value='9'>9</option>");
document.write("</select>");
document.write("</td></tr>");
document.write("<tr>");
document.write("<td class='textonextradarkvsmall' align='right'>");
document.write("<a href='javascript:submitAvailability();'><img src='images/buttons/submit.gif' alt='Search' border=''></a>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("<br>");
document.write("<table cellpadding='0' cellspacing='0' border='0' width='170'  style='padding-left: 5px; border-top: 1px solid #353A8B;border-left: 1px solid #353A8B;border-bottom: 1px solid #353A8B;border-right: 1px solid #353A8B;'>");
document.write("<tr>");
document.write("<td colspan='2' align='center' class='textonextradark'><b>Books Inspired by<br>the Thames</b><br><br></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td valign='top'><a href='http://www.amazon.co.uk/exec/obidos/ASIN/0192837869/thecompleatan-21%22%3EThe%20Compleat%20Angler%20(Oxford%20World%27s...' target='_blank'><img src='images/books/book_compleat.jpg' border='0' alt='' height='80' ></a></td>");
document.write("<td class='textonextradarkvsmall' style='padding:5px;'>");
document.write("<b>The Compleat Angler</b><br>");
document.write("<i>by Isaak Walton</i><br><br>");
document.write("The greatest classic of angling literature and a unique celebration of English countryside...<br><a href='http://www.amazon.co.uk/exec/obidos/ASIN/0192837869/thecompleatan-21%22%3EThe%20Compleat%20Angler%20(Oxford%20World%27s...' target='_blank'> more &raquo;</a><br>");
document.write("<br>");
document.write("</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td colspan='2' align='left' class='textonextradarkvsmall' style='border-top: 1px dotted #353A8B;'>&nbsp;</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td valign='top' style='padding-top:5px;'><a href='http://www.booksamillion.com' target='_blank'><img src='images/books/book_threemeninaboat.jpg' border='0' alt='' height='80' ></a></td>");
document.write("<td class='textonextradarkvsmall' style='padding:5px;'>");
document.write("<b>Three Men in a Boat</b><br>");
document.write("<i>by Jerome K. Jerome</i><br><br>");
document.write("This famous book has made people laugh all over the world for a hundred years... and they are still laughing... <a href='http://www.booksamillion.com' target='_blank'>more &raquo;</a><br><br>");
document.write("</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td colspan='2' align='left' class='textonextradarkvsmall' style='border-top: 1px dotted #353A8B;'>&nbsp;</td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td valign='top' style='padding-top:5px;'><a href='http://www.booksamillion.com' target='_blank'><img src='images/books/book_wind.jpg' border='0' alt='' height='80' ></a></td>");
document.write("<td class='textonextradarkvsmall' style='padding:5px;'>");
document.write("<b>Wind in the Willows</b><br>");
document.write("<i>by Kenneth Graham</i><br><br>");
document.write("The tales of Ratty, Mole, Badger and Toad. When Mole goes boating with the Water Rat instead of spring-cleaning, he discovers... <a href='http://www.booksamillion.com' target='_blank'>more &raquo;</a><br><br>");
document.write("</td>");
document.write("</tr>");
document.write("</table>");
document.write("<br>");
document.write("</td>");
document.write("<!-- QUICK AVAILABILITY END -->");	
}

function writeBaseNav() {
document.write("<!-- BASE NAVIGATION START -->");
document.write("<tr>");
document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
document.write("<td align='center' style='background-color:7CAADB; padding:10px;'><font color='#205CA5'>&nbsp;&nbsp;<a href='index.html' class='textondarklink'>Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='links.html' class='textondarklink'>Links</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='http://www.newyorkcitytheatre.com' class='textondarklink'>New York City Theatre</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='http://www.peterfreebody.com' class='textondarklink'>Henley Regatta</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='http://www.cornburyfestival.com' class='textondarklink'>Cornbury Music Festival 2006</a></font>");
document.write("</td>");
document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
document.write("</tr>");
document.write("<!-- BASE NAVIGATION END -->");
}

function writeHeader(iPrim) {
<!-- HEADING START -->
document.write("<tr>");
document.write("<td colspan='3'><a href='http://www.thecompleatangler.com'><img src='images/heading_top.gif' border='0' alt='The Compleat Angler'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
document.write("<td>");
document.write("<table cellpadding='0' cellspacing='0' border='0' width='720'>");
document.write("<tr>");

switch (iPrim) {
	case 1:
		document.write("<td valign='top'><img src='images/nav/1_wheretostay_white.gif' border='0'></td>");
		document.write("<td valign='top'><a href='compleat_wheretoeat_finedining.html'><img src='images/nav/1_wheretoeat.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_ontheriver_dayontheriver.html'><img src='images/nav/1_ontheriver.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_whattosee_events.html'><img src='images/nav/1_whattosee.gif' border='0'></a></td>");
		document.write("</tr>");
		document.write("</table>");
		document.write("</td>");
		document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
		document.write("</tr>");
		document.write("<tr>");
		document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
		document.write("<td>");
		document.write("<table cellpadding='0' cellspacing='0' border='0' width='720'>");
		document.write("<tr>");
		document.write("<td style='background-color:4B58A3;' valign='left'>");
		document.write("<a href='compleat_wheretostay_ontheriver.html'><img src='images/nav/hotels_river.gif' border='0'></a>");
		document.write("<a href='compleat_wheretostay_inthearea.html'><img src='images/nav/hotels_area.gif' border='0'></a>");
		document.write("<a href='compleat_wheretostay_bedandbreakfast.html'><img src='images/nav/hotels_bb.gif' border='0'></a>");
		document.write("<a href='compleat_wheretostay_rentahouse.html'><img src='images/nav/hotels_rent.gif' border='0'></a>");
	break;
	case 2:
		document.write("<td valign='top'><a href='compleat_wheretostay_ontheriver.html'><img src='images/nav/1_wheretostay.gif' border='0'></a></td>");
		document.write("<td valign='top'><img src='images/nav/1_wheretoeat_white.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_ontheriver_dayontheriver.html'><img src='images/nav/1_ontheriver.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_whattosee_events.html'><img src='images/nav/1_whattosee.gif' border='0'></a></td>");
		document.write("</tr>");
		document.write("</table>");
		document.write("</td>");
		document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
		document.write("</tr>");
		document.write("<tr>");
		document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
		document.write("<td>");
		document.write("<table cellpadding='0' cellspacing='0' border='0' width='720'>");
		document.write("<tr>");
		document.write("<td style='background-color:4B58A3;' valign='left'>");
		document.write("<a href='compleat_wheretoeat_finedining.html'><img src='images/nav/eat_finedining.gif' border='0'></a>");
		document.write("<a href='compleat_wheretoeat_bytheriver.html'><img src='images/nav/eat_river.gif' border='0'></a>");
		document.write("<a href='compleat_wheretoeat_perfectpub.html'><img src='images/nav/eat_pub.gif' border='0'></a>");
	break;
	case 3:
		document.write("<td valign='top'><a href='compleat_wheretostay_ontheriver.html'><img src='images/nav/1_wheretostay.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_wheretoeat_finedining.html'><img src='images/nav/1_wheretoeat.gif' border='0'></a></td>");
		document.write("<td valign='top'><img src='images/nav/1_ontheriver_white.gif' border='0'></td>");
		document.write("<td valign='top'><a href='compleat_whattosee_events.html'><img src='images/nav/1_whattosee.gif' border='0'></a></td>");
		document.write("</tr>");
		document.write("</table>");
		document.write("</td>");
		document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
		document.write("</tr>");
		document.write("<tr>");
		document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
		document.write("<td>");
		document.write("<table cellpadding='0' cellspacing='0' border='0' width='720'>");
		document.write("<tr>");
		document.write("<td style='background-color:4B58A3;' valign='left'>");
		document.write("<a href='compleat_ontheriver_dayontheriver.html'><img src='images/nav/river_day.gif' border='0'></a>");
		document.write("<a href='compleat_ontheriver_holidaysafloat.html'><img src='images/nav/river_afloat.gif' border='0'></a>");
		document.write("<a href='compleat_ontheriver_classicboats.html'><img src='images/nav/river_classicboats.gif' border='0'></a>");
		//document.write("<a href='compleat_ontheriver_events.html'><img src='images/nav/river_events.gif' border='0'></a>");
		document.write("<a href='compleat_ontheriver_entertaining.html'><img src='images/nav/river_entertaining.gif' border='0'></a>");
	break;
	case 4:
		document.write("<td valign='top'><a href='compleat_wheretostay_ontheriver.html'><img src='images/nav/1_wheretostay.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_wheretoeat_finedining.html'><img src='images/nav/1_wheretoeat.gif' border='0'></a></td>");
		document.write("<td valign='top'><a href='compleat_ontheriver_dayontheriver.html'><img src='images/nav/1_ontheriver.gif' border='0'></a></td>");
		document.write("<td valign='top'><img src='images/nav/1_whattosee_white.gif' border='0'></td>");
		document.write("</tr>");
		document.write("</table>");
		document.write("</td>");
		document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
		document.write("</tr>");
		document.write("<tr>");
		document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
		document.write("<td>");
		document.write("<table cellpadding='0' cellspacing='0' border='0' width='720'>");
		document.write("<tr>");
		document.write("<td style='background-color:4B58A3;' valign='left'>");
		document.write("<a href='compleat_whattosee_events.html'><img src='images/nav/see_events.gif' border='0'></a>");
		document.write("<a href='compleat_whattosee_housegardens.html'><img src='images/nav/see_houses.gif' border='0'></a>");
		document.write("<a href='compleat_whattosee_placesofinterest.html'><img src='images/nav/see_interest.gif' border='0'></a>");
	break;
}
document.write("</tr>");
document.write("</table>");
document.write("</td>");
document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td align='left' style='background-color:7CAADB; padding-left:14px;'></td>");
document.write("<td>");
document.write("<table cellpadding='0' cellspacing='0' border='0' width='720'>");
document.write("<tr>");
document.write("<td valign='top'><img src='images/main_wheretostay_45.jpg'></td>");
document.write("<td valign='top'><img src='images/main_wheretoeat_45.jpg'></td>");
document.write("<td valign='top'><img src='images/main_ontheriver_45.jpg'></td>");
document.write("<td valign='top'><img src='images/main_whattosee_45.jpg'></td>");
document.write("</tr>");
document.write("</table>");
document.write("</td>");
document.write("<td align='left' style='background-color:7CAADB; padding-right:16px;'></td>");
document.write("</tr>");
document.write("<tr>");
document.write("<td align='left' colspan='3' style='background-color:7CAADB;'><img src='images/spacer.gif' border='0' alt='' height='8'></td>");
document.write("</tr>");
document.write("<!-- HEADING END -->");

}