function notifyMoreRooms(theBox)
{
    if (theBox[theBox.selectedIndex].value == 9)
    {
        var msg = '';
        msg = 'If you need to book more than 9 rooms, please call\nthe hotel directly, 1-800-MEETING, or visit\nwww.meetings.ichotelsgroup.com. Bookings\nfor more than 9 rooms by the same guest or group\nfrom this current page will not be honored.\n';
        alert(msg);
    }
}
function showObject(id) {
   document.getElementById('error').style.visibility = "visible";
}
function hideObject(id) {
	document.getElementById('error').style.visibility = "hidden";
}
function cal_in_pop() {
	openFPCalendarCheckInQuickRes(document.searchForm, 'hi', '1', 'en', 'MM/dd/yyyy', 'false');
	document.getElementById('checkInTextBox').value = "";
	return false;
}
function cal_out_pop() {
	openFPCalendarCheckOutQuickRes(document.searchForm, 'hi', '1', 'en', 'MM/dd/yyyy', 'false');
	document.getElementById('checkOutTextBox').value = "";
	return false;
}
function gotStates(value) {
 	var ccode = value;
	if (ccode == "0001") {
		document.getElementById('quickResStateLabel').innerHTML = "State:";
	}
	else if (ccode == "0260") {
		document.getElementById('quickResStateLabel').innerHTML = "Province:";
	}
	
	// defect #34010 - following if/else block modified to call setVisible and setHidden functions
	// for controlling visibility of state dropdown and label for all browsers
	
	if (ccode == "0001" || ccode == "0260") {
		var dropdownObj =  document.getElementById('quickResState');
		var labelObj = document.getElementById('quickResStateLabel');
		setVisible(dropdownObj);
		setVisible(labelObj);
		return false;
	}
	else{
		var dropdownObj =  document.getElementById('quickResState');
		var labelObj = document.getElementById('quickResStateLabel');
		setHidden(dropdownObj);
		setHidden(labelObj);
		return false;
	}
}
// Defect #34010 - need to correctly set visibility for state dropdown and label for Safari browsers
//                 or older browsers which do not support a modern DOM
function setVisible(pageItem) {
	if( pageItem.style ) { //DOM & proprietary DOM
		pageItem.style.visibility = 'visible';
	} else {
		if( pageItem.visibility ) { //Netscape style
			pageItem.visibility = 'show';
		}
	}
}
// Defect #34010 - need to correctly set visibility for state dropdown and label for Safari browsers
//                 or older browsers which do not support a modern DOM
function setHidden (pageItem) {
	if( pageItem.style ) { //DOM & proprietary DOM
		pageItem.style.visibility = 'hidden';
	} else {
		if( pageItem.visibility ) { //Netscape style
			pageItem.visibility = 'hide';
		}
	}
}
function nudge(amt){
	var nudge = amt;
	var divArray = new Array("destinationChoices", "quickResRight");
	var calArray = new Array("quickResCheckInCalendar", "quickResCheckOutCalendar");
	for (var i=0; i<divArray.length; i++){
		var startPosition = document.getElementById(divArray[i]).offsetTop;
		//startPosition = startPosition.substring(0,(startPosition.length-2))
		var endPosition = Number(startPosition) + Number(nudge);
		endPosition = endPosition + "px";
		document.getElementById(divArray[i]).style.top = endPosition;
		}
	for (var i=0; i<calArray.length; i++){
		var startPosition = document.getElementById(calArray[i]).offsetTop;
		var endPosition = Number(startPosition) + Number(nudge);
		endPosition = endPosition + "px";
		document.getElementById(calArray[i]).style.top = endPosition;
		}
	}
function clearCity() {
	document.searchForm.city.value='';
	document.searchForm.stateId.value='';
	document.searchForm.countryId.value='';
	document.getElementById('quickResState').style.visibility= 'hidden';
	var formArray = new Array("address", "attractionName", "airportCode");
	for (var j=0; j<formArray.length; j++) {
		if (document.searchForm.elements[formArray[j]]) {
			document.searchForm.elements[formArray[j]].value = '';
			}
		}
}
// The Javascript method added to fix Defect#31589
function clearCity2() {
	if(document.searchForm.address)
		document.searchForm.address.value='';
	if(document.searchForm.airportCode)
		document.searchForm.airportCode.value='';
	if(document.searchForm.attractionName)
		document.searchForm.attractionName.value='';
	document.searchForm.city.value='';
	document.searchForm.stateId.value='';
}
function clearTPI() {
	for (var i=0; i<7; i++) {
		document.searchForm.radioCity[i].checked = false;
	}
}
function clearFaveDest() {
	if (document.searchForm.favDest) {
		document.searchForm.favDest.value='';
	}
}
function showError() {
	document.getElementById('hdAvailError').style.display ="block";
}
function hideError() {
	document.getElementById('hdAvailError').style.display = "none";
}