var photo = ["", "panorama_1", "panorama_2", "panorama_3", "panorama_4"];
var content = ["", "content_1", "content_2", "content_3", "content_4"];
var current_slide = 1;

function fadeIn(theId) {
	if(theId != current_slide) {
				
		document.getElementById('nav_home_' + current_slide).className = "off";
		document.getElementById('nav_home_' + theId).className = "on";
		
		document.getElementById(photo[current_slide]).style.zIndex = 5;
		document.getElementById(photo[theId]).style.zIndex = 6;
		new Effect.Appear(photo[theId], {duration:.5, from:0, to:1.0});
		new Effect.Fade(photo[current_slide], {duration:.5, from:1.0, to:0});
		
		document.getElementById(content[current_slide]).style.zIndex = 7;
		document.getElementById(content[theId]).style.zIndex = 8;
		new Effect.Appear(content[theId], {duration:.5, from:0, to:1.0});
		new Effect.Fade(content[current_slide], {duration:.5, from:1.0, to:0});
		
		current_slide = theId;
	}
}

window.onload = hide_all_content = function() {
		for(i = 2; i < content.length; i++) {
			var object1 = document.getElementById(content[i]).style;
			object1.opacity = (0 / 100);
			object1.MozOpacity = (0 / 100);
			object1.KhtmlOpacity = (0 / 100);
			object1.filter = "alpha(opacity=" + 0 + ")";
			object1.visibility = "visible";
			
			var object2 = document.getElementById(photo[i]).style;
			object2.opacity = (0 / 100);
			object2.MozOpacity = (0 / 100);
			object2.KhtmlOpacity = (0 / 100);
			object2.filter = "alpha(opacity=" + 0 + ")";
			object2.visibility = "visible";
		}
}