function prepareSlideshow() {
		//Make sure the browser understands the DOM methods
		if (!document.getElementsByTagName) return false;
		if (!document.getElementById) return false;
		//Make sure the elements exist
		if (!document.getElementById("nav-supp")) return false;
		//Generate html
		var slideshow = document.createElement("div");
		slideshow.setAttribute("id","slideshow");
		var frame = document.createElement("img");
		frame.setAttribute("src","imgs/frame2.png");
		frame.setAttribute("alt","");
		frame.setAttribute("id","frame");
		frame.setAttribute("height","0px");
		frame.setAttribute("width","0px");
		slideshow.appendChild(frame);
		var preview = document.createElement("img");
		preview.setAttribute("src","imgs/siteshow3.png");
		preview.setAttribute("alt","Preview of Sites created by Micah Cantrell!");
		preview.setAttribute("id","preview");
		preview.setAttribute("height","200px");
		preview.setAttribute("width","2800px");
		slideshow.appendChild(preview);
		var title = document.getElementById("side-title");
		var nav = document.getElementById("nav-supp");
		insertAfter(slideshow,nav);
		//Get all the links in the list
		var links = nav.getElementsByTagName("a");
		//Attach the animation behavior to the mouseover event
		for (var i=0; i<links.length; i++) {
				//split the href attr into a usable string
				var sectionId = links[i].getAttribute("href").split(".")[1];
				sectionId = sectionId.split(".")[0];
				if (!document.getElementById(sectionId)) continue; //if nothing left in string continue to next
				document.getElementById(sectionId).style.display = "none";
				links[i].destination = sectionId;
				links[i].onmouseover = function() {
						var destination = this.getAttribute("href");
						if (destination.indexOf("http://www.wildcat-studios.com") != -1) {
								moveElement("preview",0,0,10);
							}
						if (destination.indexOf("http://www.righttrackframe.com") != -1) {
								moveElement("preview",-400,0,10);
							}
						if (destination.indexOf("http://www.micahcantrell.com/oneearth") != -1) {
								moveElement("preview",-800,0,10);
							}
						if (destination.indexOf("http://www.tlcatbsu.org") != -1) {
								moveElement("preview",-1200,0,10);
							}
						if (destination.indexOf("http://www.wrightglobaltechnologies.com") != -1) {
								moveElement("preview",-1600,0,10);
							}
						if (destination.indexOf("http://www.cantrellfamily.org") != -1) {
								moveElement("preview",-2000,0,10);
							}
						if (destination.indexOf("http://jts.is-a-geek.com") != -1) {
								moveElement("preview",-2400,0,10);
							}
						showSection(this.destination);
						return false;
					}
			}	
	}
	
function showSection(id) {
		var divs = document.getElementsByTagName("div");
		for (var i=0; i<divs.length; i++) {
				if (divs[i].className.indexOf("section") == -1) continue;
				if (divs[i].getAttribute("id") != id) {
						divs[i].style.display = "none";
					} else {
							divs[i].style.display = "block";
						}
			}			
	}
	
addLoadEvent(prepareSlideshow);
