var loadMessage = '<h2 class="country-header">Finding the Hotels for you...</h2>';
var headerVisible = true;
var FF; if (navigator.userAgent.indexOf("Firefox")!=-1){FF=true;}

function get_state(country)
{
		new Ajax.Request('get-state.php',
		  {
			method:'get',
			parameters: {country: country},
			onSuccess: function(transport){
			  var response = transport.responseText || '<div id="search-result">No content for this category</div>';
			  $('state').innerHTML = response;
			  $('city').innerHTML = '<select name="city" disabled><option value="">City/Area</option></select>';
			},
			onFailure: function(){$('state').innerHTML = '<h2>Error connecting to server</h2>';}
		  });
}
function get_city(state,country)
{
	new Ajax.Request('get-city.php',
	  {
		method:'get',
		parameters: {country: country,state: state},
		onSuccess: function(transport){
		  var response = transport.responseText || "No content for this category";
		  $('city').innerHTML = response;
		  
		},
		onFailure: function(){$('city').innerHTML = '<h2>Error connecting to server</h2>';}
	  });
}
function get_content(country,state,city)
{
	if(country!='' && state!='' && city!='')
	{
		new Ajax.Request('get-content.php',
		{
			method:'get',
			parameters: {country:country, state: state, city:city},
			onSuccess: function(transport){
			  var response = transport.responseText || "No content for this category";
			$('result').innerHTML = response;
			$('title_bar').innerHTML = city.toUpperCase();
			},
			onFailure: function(){$('result').innerHTML = '<h2>Error connecting to server</h2>';}
		});	
	}
	else {
		alert('Please select a country, state and city');
	}
}
function photoPopup(propID) {
	window.open('http://www.starwoodhotels.com/preferredguest/property/photos/popup.html?propertyID='+propID,'photosPopUp','width=600,height=416,resizable=no,scrollbars=no,status=no');
}

