	var current_departure = 0;
	var departure_board = [{"name":"The","location":"London","date":"27 Nov 2009","room":"Deluxe City","rate":"279.00","info_url":"\/luxury-hotels\/united-kingdom\/london\/the-metropolitan-london\/","book_url":"\/book\/the-metropolitan-london"},{"name":"Hotel Lumen","location":"Paris","date":"27 Nov 2009","room":"Saint Roch","rate":"178.24","info_url":"\/luxury-hotels\/france\/paris\/hotel-lumen\/","book_url":"\/book\/hotel-lumen"},{"name":"Hotel de","location":"Rome","date":"27 Nov 2009","room":"Best available","rate":"614.94","info_url":"\/luxury-hotels\/italy\/rome\/hotel-de-russie\/","book_url":"\/book\/hotel-de-russie"},{"name":"Ace Hotel New","location":"New York","date":"27 Nov 2009","room":"Bunk Room","rate":"162.96","info_url":"\/luxury-hotels\/united-states\/new-york\/ace-hotel-new-york\/","book_url":"\/book\/ace-hotel-new-york"},{"name":"ABaC","location":"Barcelona","date":"27 Nov 2009","room":"Standard Room","rate":"193.55","info_url":"\/luxury-hotels\/spain\/barcelona\/abac-restaurant-and-hotel\/","book_url":"\/book-hotels\/abac-restaurant-and-hotel"}];
	var lateAvail = false;
	
	function next_departure()
	{
		current_departure = (current_departure + 1) % (departure_board.length);
		//alert(current_departure);
		populate_departure(current_departure);
	}
	
	function prev_departure()
	{
		current_departure = (current_departure + departure_board.length - 1) % (departure_board.length);
		//alert(current_departure);
		populate_departure(current_departure);
	}
	
	function populate_departure(key)
	{
		values = departure_board[key];
		$('departure_location').update(values.location);
		$('departure_date').update(values.date);
		$('departure_name').update(values.name);
		$('departure_room').update(values.room);
		$('departure_rate').update('£' + values.rate + ' per night');
		$('departure_info').writeAttribute("href",values.info_url);
		$('departure_book').writeAttribute("action",values.book_url);
		//alert(values.location);
	}
	Event.observe(window, 'load', function() {
		lateAvail = new PeriodicalExecuter(next_departure, 3);
	});
	
	


