function preloader() {
  homeImage = new Image(); 
  homeImage.src = "images/top_home.gif";
  homeImageOn = new Image(); 
  homeImageOn.src = "images/top_home_on.gif";

  newsImage = new Image(); 
  newsImage.src = "images/top_news.gif";
  newsImageOn = new Image(); 
  newsImageOn.src = "images/top_news_on.gif";

  applyImage = new Image(); 
  applyImage.src = "images/top_apply.gif";
  applyImageOn = new Image(); 
  applyImageOn.src = "images/top_apply_on.gif";

  contactImage = new Image(); 
  contactImage.src = "images/top_contact.gif";
  contactImageOn = new Image(); 
  contactImageOn.src = "images/top_contact_on.gif";

  contactImage = new Image(); 
  contactImage.src = "images/top_trucking.gif";
  contactImageOn = new Image(); 
  contactImageOn.src = "images/top_trucking_on.gif";
  
  tabImage = new Image();
  tabImage.src = "images/tab.gif";
  tabImageOn = new Image();
  tabImageOn.src = "images/tab_on.gif";
}

function randomImage() {
  var randImage = new Array();
  randImage[0] = "headerGraphicHome1";
  randImage[1] = "headerGraphicHome2";
  randImage[2] = "headerGraphicHome3";
  var randNumber=Math.floor(Math.random()*3); 
  document.getElementById("headerGraphic").id = randImage[randNumber];
}

// Added for dropdown on main navigation.

sfHover = function() {
	var sfEls = document.getElementById("navBar").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

