

function init() {
	setInterval( 'nextBg()', 20000 );
}

function nextBg() {
	toHide = currentBg;
	toShow = ( currentBg == 4 ) ? 1 : currentBg + 1;
	new Effect.Fade( 'bg_image' + toHide );
	new Effect.Appear( 'bg_image' + toShow );
	currentBg = toShow;
}

function showMap() {
	Shadowbox.init({ skipSetup: true });
	Shadowbox.open({
		content:    '<div id="map_canvas" style="width: 800px; height: 480px;"></div>',
		player:     "html",
		title:      "Green Door",
		width:      800,
		height:     480,
		options: {
			onFinish: function() {
			  var myLatlng  = new google.maps.LatLng(47.487988,19.060614);
			  var myOptions = {
				zoom: 15,
				center: myLatlng,
				mapTypeId: google.maps.MapTypeId.ROADMAP
			  }
			  var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

			  var marker = new google.maps.Marker({
				  position: myLatlng, 
				  map: map, 
				  title:"Green Door"
			  }); 
  			}
		}
	});
}
