// JavaScript Document
	
	//check Internet Explorer for window height to solve scrollbar jump issue
	//reset this property in slideShow() function
	if (document.documentElement.clientHeight > 700) {
		document.documentElement.style.overflow = "hidden";
	}
	
	var opacity = 0;
	var fadeInOpacity = 0;
	var fadeOutOpacity = 1;
	var currentImg = 1;
	var nextImg;
	
	var pics = new Array();
	pics[0] = "assets/background_1.jpg";
	pics[1] = "assets/background_2.jpg";
	pics[2] = "assets/background_3.jpg";
	pics[3] = "assets/background_4.jpg";
	pics[4] = "assets/background_5.jpg";
	pics[5] = "assets/background_6.jpg";
	
	
	//put starting point here
	var currentPic = 0;
	
	function firstFade() {
		
		document.placeholder1.src = pics[currentPic];
		document.placeholder1.style.opacity = opacity;
		document.placeholder1.style.filter = 'alpha(opacity=' + (opacity*100) + ')';
		
		opacity += .05;
		
		if (opacity <= 1) {
			setTimeout("firstFade()", 150);
		} else {
			document.placeholder1.style.opacity = 1;
			document.placeholder1.style.filter = 'alpha(opacity=100)';
			currentPic++;
			document.placeholder2.src = pics[currentPic];
			setTimeout("slideShow(1)", 5000);
		}
	}
	
	var fadeOut = "placeholder1";
	var fadeIn = "placeholder2";

	function slideShow(image) {
		
		document.documentElement.style.overflow = "auto";
		
		currentImage = image;
		document.getElementById(fadeOut).style.opacity = fadeOutOpacity;
		document.getElementById(fadeOut).style.filter = 'alpha(opacity=' + (fadeOutOpacity*100) + ')';
		document.getElementById(fadeIn).style.opacity = fadeInOpacity;
		document.getElementById(fadeIn).style.filter = 'alpha(opacity=' + (fadeInOpacity*100) + ')';
		
		
		if (fadeOutOpacity >= 0) {
			fadeOutOpacity -= .05;
			fadeInOpacity = 1 - fadeOutOpacity;
			setTimeout("slideShow()", 150);
		} else {
			document.getElementById(fadeOut).style.opacity = 0;
			document.getElementById(fadeOut).style.filter = 'alpha(opacity=0)';
			document.getElementById(fadeIn).style.opacity = 1;
			document.getElementById(fadeIn).style.filter = 'alpha(opacity=100)';
			fadeInOpacity = 0;
			fadeOutOpacity = 1;
			currentPic++;
			if (currentPic == pics.length) {
				currentPic = 0;
			}
			nextImg = currentImg + 1;
			if (nextImg > 2) {
				nextImg = 1;
			}
			if (fadeOut == "placeholder1") {
				fadeOut = "placeholder2";
				fadeIn = "placeholder1";
				document.placeholder1.src = pics[currentPic];
			} else {
				fadeOut = "placeholder1";
				fadeIn = "placeholder2";
				document.placeholder2.src = pics[currentPic];
			}
			setTimeout("slideShow(1)", 5000);
		}
	}
