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;
		//Get all the links in the list
		var nav = document.getElementById("nav-supp");
		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];
				if (!document.getElementById(sectionId)) continue; //if nothing left in string continue to next
				if ((window.location.href == "http://www.markbsuproperties.com/" || window.location.href == "http://markbsuproperties.com/" || window.location.href.split("/")[3] == "index.php" || window.location.href == "http://www.markbsuproperties.com/index.php#1501" || window.location.href.split("/")[3] == "#1501") && sectionId == "1501") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1413" || window.location.href.split("/")[3] == "#1413") && sectionId == "1413") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1312" || window.location.href.split("/")[3] == "#1312") && sectionId == "1312") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#901" || window.location.href.split("/")[3] == "#901") && sectionId == "901") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1009" || window.location.href.split("/")[3] == "#1009") && sectionId == "1009") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1212" || window.location.href.split("/")[3] == "#1212") && sectionId == "1212") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1129" || window.location.href.split("/")[3] == "#1129") && sectionId == "1129") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1604" || window.location.href.split("/")[3] == "#1604") && sectionId == "1604") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1708" || window.location.href.split("/")[3] == "#1708") && sectionId == "1708") {
					document.getElementById(sectionId).style.display = "display";
				} else if ((window.location.href.split("/")[3] == "index.php#1800" || window.location.href.split("/")[3] == "#1800") && sectionId == "1800") {
					document.getElementById(sectionId).style.display = "display";
				} else {
					document.getElementById(sectionId).style.display = "none";
				}
				links[i].destination = sectionId;
				links[i].onmousedown = function() {
						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);

