
var over_menu = 1;
var out_menu_button = 0;



		function fillElement( src, dest, button, buttonOnText, buttonOffText )
		{
			if ( document.getElementById( dest ).innerHTML == "" )
			{
				document.getElementById( dest ).innerHTML = document.getElementById( src ).innerHTML;
				
				if ( button )
					document.getElementById( button ).innerHTML = buttonOnText;
			}
			else 
			{
				document.getElementById( dest ).innerHTML = "";
				document.getElementById( button ).innerHTML = buttonOffText;
			}
		}




// CONTENT STUFF

function set_content_height()
{
	var menu 		= document.getElementById ( "menu" );
	var content = document.getElementById ( "content" );
	var info 		= document.getElementById ( "info" );

	var seperator = document.getElementById ( "seperator" );

	var height = Math.max ( menu.offsetHeight, Math.max ( content.offsetHeight, info.offsetHeight ) ) - 10;

	seperator.innerHTML = "<img src=\"images/grad_vert.jpg\" width=\"1\" height=\"" + height + "\" alt=\"\" />";
}

function switch_hotel ( index )
{
	if ( current_index == index )
		return;
	else
		current_index = index;

	var new_hotel = document.getElementById ( "hotel_" + index );
	var hotel = document.getElementById ( "hotel_information" )
	
	hotel.innerHTML = new_hotel.innerHTML;
}


function delay_then_call( function_call, delay )
{
	setTimeout( function_call, delay );
}

function set_mouseout_delay(obj_id)
{
	if ( out_menu_button == 0 )
  {
		var delay = 1200;
		var function_call = "check_mouseout(\"" + obj_id  + "\");";
		setTimeout( function_call, delay );
	}
}

function check_mouseout(obj_id)
{
	if ( over_menu == 1 && out_menu_button == 0 )
	{
		change_element( obj_id, "hidden" );
	}
}

function check_and_change( obj_id, new_visibility )
{
	if ( out_menu_button == 1 && over_menu == 1)
		change_element ( obj_id, new_visibility );
}

function change_element( obj_id, new_visibility)
{
    var obj = document.getElementById(obj_id);
    obj.style.visibility = new_visibility;
    
    var alt_visibility = "hidden";

    if ( new_visibility == "hidden" )
    	alt_visibility = "visible";
    
    if ( document.big_form )
		{
			document.big_form.num_rooms.style.visibility = alt_visibility;
			document.big_form.num_adults.style.visibility = alt_visibility;
			document.big_form.num_children.style.visibility = alt_visibility;
		}
}

function change_status ( type, status )
{
	if ( type == "over_menu" )
		over_menu = status;
	else if ( type == "out_menu_button" )
		out_menu_button = status;
}

function open_popup( url, name, type )
{
    var mywindow;
    
    mywindow=open(url, name, type);
    
    mywindow.location.href = url;
    
    if (mywindow.opener == null) mywindow.opener = self;
    
    mywindow.focus();
}

// Set the horizontal and vertical position for the popup

PositionX = 200;
PositionY = 200;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 400;
defaultHeight = 400;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
function popImage(imageURL,imageTitle){
if (isNN){imgWin=window.open('about:blank','',optNN);}
if (isIE){imgWin=window.open('about:blank','',optIE);}
with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
writeln('width=100-(document.body.clientWidth-document.images[0].width);');
writeln('height=100-(document.body.clientHeight-document.images[0].height);');
writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
close();		
}}



