function PopupGuarantee()
{
	window.open('/Common/Popups/Guarantee.cfm', 'Guarantee','toolbar=no,width=500,height=315,left=300,top=300,status=no,scrollbars=yes,resize=yes');
}

function PopupFreeRooms()
{
	window.open('/Common/Popups/FreeRooms.cfm', 'FreeRooms','toolbar=no,width=500,height=255,left=300,top=300,status=no,scrollbars=yes,resize=yes');
}

function PopupDemoGroup() 
{
	popupDemoGroup = window.open('http://www.HotelPlanner.com/Common/Popups/DemoGroup.cfm', 'DemoGroup','location=yes,scrollbars=yes,width=805,height=730,left=5,top=5,status=no,toolbar=no,location=no,resizable=yes'); 
} 
	
function checkEnter(e, theForm)
{ 
	var characterCode;
	
	if (e && e.which)
	{ //if which property of event object is supported (NN4)
		e = e;
		characterCode = e.which; //character code is contained in NN4's which property
	}
	else
	{
		e = event;
		characterCode = e.keyCode; //character code is contained in IE's keyCode property
	}
	
	if (characterCode == 13)
	{ 
		//if generated character code is equal to ascii 13 (if enter key)
		theForm.submit(); //submit the form
		return false;
	}
	else
	{
		return true; 
	}
}

function checkIfGroup(NumRooms, GroupTypes)
{ 
	if ( parseInt(NumRooms.value) <= 5 )
	{ 
		GroupTypes.disabled = true;
		if (GroupTypes.selectedIndex == 0)
		{
			GroupTypes.options[1].selected=true;
		}
	}
	else
	{
		GroupTypes.disabled = false;
		if (GroupTypes.selectedIndex == 1)
		{
			GroupTypes.options[0].selected=true;
		}
	}
}