// JavaScript Document

<!--
/* ----------------------------------------------------------------------------
INTERNET EXPLORER ROLLOVER EVENTS
-----------------------------------------------------------------------------*/
iehover= function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
// ->

<!--
/* ----------------------------------------------------------------------------
EXTERNAL LINKS BY KEVIN YANK
-----------------------------------------------------------------------------*/
<!--
externalLinks = function() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
// -->


<!--
/* ----------------------------------------------------------------------------
ONLOAD EVENTS
-----------------------------------------------------------------------------*/
function start() {
  externalLinks();
	iehover();
}
window.onload = start;
// -->


<!--
/* ----------------------------------------------------------------------------
JQUERY IMAGE ROLLOVER ON HOME PAGE
-----------------------------------------------------------------------------*/
$(document).ready(function(){
	if($("body").attr("id") == "home") {
		var defurl = "/images/fileCabinet/homepage/home.jpg";
		$("#homeContent").append("<img id=\"home_body_image\" src=\"" + defurl + "\"/>");
		$("#nav li").mouseover(function() {
			var basehref = "/DBimages/Home/Large/";
			var output = "Error!";
			var reqimg = $(this).attr("class");
			reqimg = reqimg.replace(" over","");
			switch (reqimg) {
				case "home": //home
					output = "home.jpg";
					break;
				case "pg18": //company profile
					output = "profile.jpg";
					break;
				case "pg2": //design and build
					output = "design.jpg";
					break;
				case "pg3": //landscape maintenance
					output = "landscape.jpg";
					break;
				case "pg4": //portfolio
					output = "portfolio.jpg";
					break;
				case "pg19": //testimonials
					output = "testimonials.jpg";
					break;
				case "pg17": //news
					output = "news.jpg";
					break;
				case "pg23": //links
					output = "links.jpg";
					break;
				case "pg6": //contact
					output = "contact.jpg";
					break;
			}
			if (output != "Error!") {
				getimg = basehref + "/" + output;
				$("#home_body_image").attr("src",getimg);
			}
		});
	}
});
// -->



<!--
/* ----------------------------------------------------------------------------
SLIDESHOW POPUP WINDOW
-----------------------------------------------------------------------------*/
function displayWindow(url) {
	settings='fullWindow,fullscreen,scrollbars=no,addressbar=no';
	slideshow=window.open(url,"",settings);
}
-->
