		var curOverviewImage = 1;
		


		function navOver(name) {
			//alert("navOver: '" + name + "'");

			var elID = "mainNav_" + name;
			var obj = document.getElementById(elID);
			obj.style.cursor = "pointer";
			obj.style.backgroundColor = "#929090";
		}


		function navOut(name) {
			//alert("navOut: '" + name + "'");
			var elID = "mainNav_" + name;
			var obj = document.getElementById(elID);
			obj.style.cursor = "auto";
			obj.style.backgroundColor = "transparent";
		}




		function navClick(name) {

			var target;

			if(name == "overview") {
				target = "../overview/index.php";

			} else if(name == "technology") {
				target = "../technology/technology-overview.php";
			
			} else if(name == "company-info") {
				target = "../company-info/philosophy.php";
			
			} else if(name == "contact-us") {
				target = "../contact-us/index.php";
			}

			location.href = target;
		
		}


		function loadMe(name, page) {
			
			preloadCommonImages();
			
			if(name == "overview") {
				preloadOverviewImages();
				//setTimeout("overviewTransition()", 8000);	

				setTimeout("goTest1()", 5000);

			}

			//alert("loadme");
		}


		function goTest1() {

			// Figure out which img is currently displaying:
			var fadeMeOut = "midPicImg";
			var fadeMeIn = "midPicImg2";
			if(curOverviewImage % 2 == 0) {
				fadeMeOut = "midPicImg2";
				fadeMeIn = "midPicImg";
			}

			//alert("fOut = " + fadeMeOut + ", fIn = " + fadeMeIn);

			// Fade the old image out.
			Effect.Fade(fadeMeOut, { duration: 2.0 });
			//var obj = document.getElementById("fadeMeOut");
			//obj.style.zIndex = "1";

			// Fade the new image in.
			//setTimeout("ovTrans2()", 1100);


			// Set the display to none
			var obj = document.getElementById(fadeMeIn);
			//obj.style.display = "none";
			//obj.style.zIndex = "5";
			

			// Compute new src string
			var newImageNum = curOverviewImage + 1;
			if(newImageNum > 4) { // reset
				newImageNum = 1;
			}
			curOverviewImage = newImageNum;
			var srcStr = "./images/" + newImageNum + ".jpg";

			// Set new src string
			obj.src = "" + srcStr;

			// Bring up the next image
			Effect.Appear(fadeMeIn, { duration: 2.0 });

			// Do this all again
			setTimeout("goTest1()", 5000);
				
		}


		function goTest2() {
			// Set the display to none
			var obj = document.getElementById("midPicImg");
			obj.style.display = "none";
			
			// Compute new src string
			var newImageNum = curOverviewImage + 1;
			if(newImageNum > 4) { // reset
				newImageNum = 1;
			}
			curOverviewImage = newImageNum;
			var srcStr = "./images/" + newImageNum + ".jpg";

			// Set new src string
			obj.src = "" + srcStr;

			// Bring up the next image
			Effect.Appear('midPicImg', { queue: 'end', duration: 2.0 });

			// Do this all again
			setTimeout("goTest1()", 8000);
		}


		function overviewTransition() {			
			
			// Fade the old image out.
			Effect.Fade('midPicImg', { queue: 'front', duration: 0.85 });
			
			// After 250ms to make sure the old image is gone, 
			setTimeout("ovTrans2()", 1100);
		}

		function ovTrans2() {
			// Set the display to none
			var obj = document.getElementById("midPicImg");
			obj.style.display = "none";
			
			// Compute new src string
			var newImageNum = curOverviewImage + 1;
			if(newImageNum > 4) { // reset
				newImageNum = 1;
			}
			curOverviewImage = newImageNum;
			var srcStr = "./images/" + newImageNum + ".jpg";

			// Set new src string
			obj.src = "" + srcStr;

			// Bring up the next image
			Effect.Appear('midPicImg', { queue: 'end', duration: 2.0 });

			// Do this all again
			setTimeout("overviewTransition()", 8000);
		}



		function preloadCommonImages() {
			//pic1 = new Image(804,345); 
			//pic1.src = "./images/midpic_1.jpg";
		}


		function preloadOverviewImages() {
			pic1 = new Image(804,345); 
			pic1.src = "./images/1.jpg";

			pic2 = new Image(804,345); 
			pic2.src = "./images/2.jpg";

			pic3 = new Image(804,345); 
			pic3.src = "./images/3.jpg";

			pic4 = new Image(804,345); 
			pic4.src = "./images/4.jpg";

		}

		

