function showSlide(el_sh) {
	El = document.getElementById("slide_"+el_sh);
	if (El.style.display == "none" || El.style.display=="") {
		for (i = 0; i <= 3; i++) {
			if (document.getElementById("slide_"+i)) document.getElementById("slide_"+i).style.display = "none";
			document.getElementById("nav_"+i).className = "hidden";
		}
		El.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity = 0)";
		El.style.opacity = 0;
		El.style.display = "block";
		for (i=1; i<=10; i++){
			o = 0.1*i;
			ie_o = Math.round(o*100);
			t = i*25;
			setTimeout('El.style.opacity = '+o, t);
			setTimeout("El.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity="+ie_o+")'", t);
		}
		document.getElementById("nav_"+el_sh).className = "";
	}
}

function showPhoto(el_sh) {
	El = document.getElementById("photo_"+el_sh);
	if (El.style.display == "none" || El.style.display=="") {
		for (i = 0; i <= 5; i++) {
			if (document.getElementById("photo_"+i)) document.getElementById("photo_"+i).style.display = "none";
		}
		El.style.filter = "progid:DXImageTransform.Microsoft.Alpha(Opacity = 0)";
		El.style.opacity = 0;
		El.style.display = "block";
		for (i=1; i<=10; i++){
			o = 0.1*i;
			ie_o = Math.round(o*100);
			t = i*25;
			setTimeout('El.style.opacity = '+o, t);
			setTimeout("El.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity="+ie_o+")'", t);
		}
	}
}

var n=0;
var menuTimeout;
var slideInterval;

function slideShow() {
	var sl = document.getElementById("slideshow");
	var mn = document.getElementById("menu");
	
	slideInterval = setInterval(function() {
			if (n==3) n=0;
			else n++;
			showSlide(n);
	}, 5000);
	
	sl.onmouseover = function() {
		clearInterval(slideInterval);
	}
	
	sl.onmouseout = function() {
		slideShow();
	}
}

window.onload = function() {
	showSlide(0);
	slideShow();
}
