<!--

	var activeImage = document.getElementById("image_1");
	var activeCopy = document.getElementById("copy_1");
	var activeNavigationLink = document.getElementById("nav_1"); 
		activeNavigationLink.style.color = "#eab720";
	var backButton = 1;
	var current_opacity_IE = 100;
	var manual_navigation = "false";
	var autoAdvancePosition = 0;
	
	function autoAdvance() { // autopush until it gets to number one again. pause for 7 seconds (variable) after onclick
		var interval = 7000;
		if (auotrepeat) {
			clearTimeout(auotrepeat);
		}
		if ( manual_navigation == "false" ) {
			if ( autoAdvancePosition == 6 ) {
				return;
			}
			autoAdvancePosition > 0 ? switchImageNext() : autoAdvancePosition = 0;
			autoAdvancePosition++;
			//autoAdvancePosition == 5 ? clearTimeout(auotrepeat) : var auotrepeat = setTimeout(autoAdvance,interval);			
			var auotrepeat = setTimeout(autoAdvance,interval)
		}
	}
	
	function setManualNavigation() {
		manual_navigation = "true";
	}

	function switchImage(clickedImage) {
		
		// Set the current location for previous/next function.
		backButton = clickedImage;
	
		// Set the Navigation Colors.
		var onDeckNavigationLink = document.getElementById("nav_" + clickedImage);
		
		if ( onDeckNavigationLink != activeNavigationLink ) {
			onDeckNavigationLink.style.color = "#eab720";
			activeNavigationLink.style.color = "";
			activeNavigationLink = onDeckNavigationLink;
		}

		// Set up the divs and begin the move.
		onDeckImage = document.getElementById("image_" + clickedImage);
		onDeckCopy = document.getElementById("copy_" + clickedImage);

		if ( (onDeckImage != activeImage) && (onDeckCopy != activeCopy) ) {

			activeImage.style.zIndex = 30;
			activeCopy.style.zIndex = 30;
			
			onDeckImage.style.zIndex = 20;
			onDeckCopy.style.zIndex = 20;
			
			onDeckImage.style.right = 336 + "px";
			onDeckCopy.style.left = 380 + "px";

			//moveImageSlide();
			moveImageFade();
		}
	}
	
	function moveImageFade() {
		var interval = 1; // Lower number = faster fade
		var fadeSpeedMultilpier = 5;

		if (activeImage.filters) {
			var new_opacity_IE = current_opacity_IE - fadeSpeedMultilpier;
			activeImage.style.filter = activeCopy.style.filter = "alpha(opacity=" + new_opacity_IE + ")";
			current_opacity_IE = new_opacity_IE;
		}
		else if (activeImage.style.MozOpacity) {
			var current_opacity = activeImage.style.MozOpacity;
		}
		else if (activeImage.style.KhtmlOpacity) {
			var current_opacity = activeImage.style.KhtmlOpacity;
		}
		else if (activeImage.style.opacity && !activeImage.filters) {
			var current_opacity = activeImage.style.opacity;
		}

		if (fadeout) {
			clearTimeout(fadeout);
		}
		if ( current_opacity <= 0 || current_opacity_IE <= 0 ) {

			onDeckImage.style.zIndex = 40;
			onDeckCopy.style.zIndex = 40;
			
			activeImage.style.zIndex = 10;
			activeCopy.style.zIndex = 10;

			current_opacity_IE = 100;
			activeImage.style.filter = activeCopy.style.filter = "alpha(opacity=100)";
			activeImage.style.MozOpacity = activeCopy.style.MozOpacity = 1;
			activeImage.style.KhtmlOpacity = activeCopy.style.KhtmlOpacity = 1;
			activeImage.style.opacity = activeCopy.style.opacity = 1;
							
			activeImage = onDeckImage;
			activeCopy = onDeckCopy;
			
			onDeckImage;
			onDeckCopy;
			
			return true;
		}
		else {
			if (activeImage.filters) {
				var new_opacity_IE = current_opacity_IE - fadeSpeedMultilpier;
				activeImage.style.filter = activeCopy.style.filter = "alpha(opacity=" + new_opacity_IE + ")";
				current_opacity_IE = new_opacity_IE;
			}
			else if (activeImage.style.MozOpacity) {
				var current_opacity = ((activeImage.style.MozOpacity * 100) - fadeSpeedMultilpier)/100;
				activeImage.style.MozOpacity = activeCopy.style.MozOpacity = current_opacity;
			}
			else if (activeImage.style.KhtmlOpacity) {
				var current_opacity = ((activeImage.style.KhtmlOpacity * 100) - fadeSpeedMultilpier)/100;
				activeImage.style.KhtmlOpacity = activeCopy.style.KhtmlOpacity = current_opacity;
			}
			else if (activeImage.style.opacity && !activeImage.filters) {
				var current_opacity = ((activeImage.style.opacity * 100) - fadeSpeedMultilpier)/100;
				activeImage.style.opacity = activeCopy.style.opacity = current_opacity;
			}
		}
		var fadeout = setTimeout(moveImageFade,interval);
	}

	function moveImageSlide() {
		var final_pos = 717;
		var interval = 1;
		var leftSpeedMultilpier = 10;
		var rightSpeedMultilpier = 8;

		var pos_image = parseInt(activeImage.style.right);
		var pos_copy = parseInt(activeCopy.style.left);
		
		if (movement) {
			clearTimeout(movement);
		}
		if ( pos_image >= final_pos ) {
			onDeckImage.style.zIndex = 40;
			onDeckCopy.style.zIndex = 40;
			
			activeImage.style.zIndex = 10;
			activeCopy.style.zIndex = 10;
			
			activeImage.style.right = 336 + "px";
			activeCopy.style.left = 380 + "px";
			
			activeImage = onDeckImage;
			activeCopy = onDeckCopy;
			
			onDeckImage;
			onDeckCopy;
			
			return true;
		}
		else {
			activeImage.style.right = pos_image + leftSpeedMultilpier + "px";
			activeCopy.style.left = pos_copy + rightSpeedMultilpier + "px";
			pos_image++;
			pos_copy++;
		}
		var movement = setTimeout(moveImageSlide,interval);
	}

	function switchImagePrevious() {
		backButton == 1 ? clickedImage = 5 : clickedImage = parseInt(backButton) - 1;
		switchImage(clickedImage);
	}
	
	function switchImageNext() {
		backButton == 5 ? clickedImage = 1 : clickedImage = parseInt(backButton) + 1;
		switchImage(clickedImage);
	}

	function changeActiveLayerTo(state) {
		if (state == "content" ) {
			activeLayer = document.getElementById("main_splash_wrapper");
			inactiveLayer = document.getElementById("main_content_wrapper");
	//		layerFadeOut();
		}
		if (state == "splash" ) {
			activeLayer = document.getElementById("main_content_wrapper");
			inactiveLayer = document.getElementById("main_splash_wrapper");
	//		layerFadeOut();
		}
		inactiveLayer.style.display = "block";
		activeLayer.style.display = "none";
	}

/*

	function layerFadeOut() {
		var interval = 1; // Lower number = faster fade
		var fadeSpeedMultilpier = 5;
		
		if (activeLayer.filters) {
			var new_opacity_IE = current_opacity_IE - fadeSpeedMultilpier;
			activeLayer.style.filter = "alpha(opacity=" + new_opacity_IE + ")";
			current_opacity_IE = new_opacity_IE;
		}
		else if (activeLayer.style.MozOpacity) {
			var current_opacity = activeLayer.style.MozOpacity;
		}
		else if (activeLayer.style.KhtmlOpacity) {
			var current_opacity = activeLayer.style.KhtmlOpacity;
		}
		else if (activeLayer.style.opacity && !activeLayer.filters) {
			var current_opacity = activeLayer.style.opacity;
		}

		if (fadeout) {
			clearTimeout(fadeout);
		}
		if ( current_opacity <= 0 || current_opacity_IE <= 0 ) {

			current_opacity_IE = 100;
			activeLayer.style.filter = "alpha(opacity=0)";
			activeLayer.style.MozOpacity = 0;
			activeLayer.style.KhtmlOpacity = 0;
			activeLayer.style.opacity = 0;

			inactiveLayer.style.display = "block";
			activeLayer.style.display = "none";

			layerFadeIn();

			return true;
		}
		else {	
			if (activeImage.filters) {
				var new_opacity_IE = current_opacity_IE - fadeSpeedMultilpier;
				activeLayer.style.filter = "alpha(opacity=" + new_opacity_IE + ")";
				current_opacity_IE = new_opacity_IE;
			}
			else if (activeLayer.style.MozOpacity) {
				var current_opacity = ((activeLayer.style.MozOpacity * 100) - fadeSpeedMultilpier)/100;
				activeLayer.style.MozOpacity = current_opacity;
			}
			else if (activeLayer.style.KhtmlOpacity) {
				var current_opacity = ((activeLayer.style.KhtmlOpacity * 100) - fadeSpeedMultilpier)/100;
				activeLayer.style.KhtmlOpacity = current_opacity;
			}
			else if (activeLayer.style.opacity && !activeLayer.filters) {
				var current_opacity = ((activeLayer.style.opacity * 100) - fadeSpeedMultilpier)/100;
				activeLayer.style.opacity = current_opacity;
			}
		}
		var fadeout = setTimeout(layerFadeOut,interval);
	}

	function layerFadeIn() {
		var interval = 1; // Lower number = faster fade
		var fadeSpeedMultilpier = 5;
		
		if (activeLayer.filters) {
			var new_opacity_IE = current_opacity_IE + fadeSpeedMultilpier;
			activeLayer.style.filter = "alpha(opacity=" + new_opacity_IE + ")";
			current_opacity_IE = new_opacity_IE;
		}
		else if (activeLayer.style.MozOpacity) {
			var current_opacity = activeLayer.style.MozOpacity;
		}
		else if (activeLayer.style.KhtmlOpacity) {
			var current_opacity = activeLayer.style.KhtmlOpacity;
		}
		else if (activeLayer.style.opacity && !activeLayer.filters) {
			var current_opacity = activeLayer.style.opacity;
		}

		if (fadeout) {
			clearTimeout(fadeout);
		}
		if ( current_opacity >= 100 || current_opacity_IE >= 100 ) {

			current_opacity_IE = 0;
			activeLayer.style.filter = "alpha(opacity=100)";
			activeLayer.style.MozOpacity = 1;
			activeLayer.style.KhtmlOpacity = 1;
			activeLayer.style.opacity = 1;

			return true;
		}
		else {
			if (activeImage.filters) {
				var new_opacity_IE = current_opacity_IE - fadeSpeedMultilpier;
				activeLayer.style.filter = "alpha(opacity=" + new_opacity_IE + ")";
				current_opacity_IE = new_opacity_IE;
			}
			else if (activeLayer.style.MozOpacity) {
				var current_opacity = ((activeLayer.style.MozOpacity * 100) + fadeSpeedMultilpier)/100;
				activeLayer.style.MozOpacity = current_opacity;
			}
			else if (activeLayer.style.KhtmlOpacity) {
				var current_opacity = ((activeLayer.style.KhtmlOpacity * 100) + fadeSpeedMultilpier)/100;
				activeLayer.style.KhtmlOpacity = current_opacity;
			}
			else if (activeLayer.style.opacity && !activeLayer.filters) {
				var current_opacity = ((activeLayer.style.opacity * 100) + fadeSpeedMultilpier)/100;
				activeLayer.style.opacity = current_opacity;
			}
		}
		var fadeout = setTimeout(layerFadeIn,interval);
	}

*/

//-->