// JavaScript Document

var revert = new Array();
var inames = new Array('aboutus', 'industryexpertise', 'differentiators', 'subcontractors', 'whatsnew', 'portfolio', 'career', 'contact');
var imgs = new Array();

//pre-load the images


window.onload = function() {
	var links = document.getElementsByClassName("nav_link");
	for (var i = 0; i <= links.length -1 ; i++) {
		links[i].onmouseover = function() {
			
			this.style.backgroundColor = "#174d80";
			this.style.textDecoration = "Underline";
		}
		links[i].onmouseout = function() {
			this.style.backgroundColor = "";
			this.style.textDecoration = "";
		}
	}
	for(i=0; i< inames.length; i++) {
		img1 = new Image();
		img1.src = "/images/nav/nav_"+inames[i]+"_on.gif";
		imgs.push(img1);
		img2 = new Image();
		img2.src = "/images/nav/nav_"+inames[i]+"_off.gif";
		imgs.push(img2);
	}
	
	
}
// Preload Images for Mouseover

  var flipped = new Array();
  for(i=0; i< inames.length; i++) {
    flipped[i] = new Image();
    flipped[i].src = "/images/nav/nav_"+inames[i]+"_on.gif";
  }

//window.onload=show;
var currentMenu = null;


function show(id, id2) {
	
	if (currentMenu != null && currentMenu.id == id) {
	
	} else {
		if (currentMenu != null) currentMenu.style.display ="none";
		currentMenu = document.getElementById(id);
		if (currentMenu != null) currentMenu.style.display = "block";
	}
	if (id == '' && currentMenu != null) {
		currentMenu.style.display="none";
		return;
	}  

}

// Mouseover function for image flip

function over(num) {
    
    revert[num] = document.getElementById(inames[num]).src;
    document.getElementById(inames[num]).src = flipped[num].src;
}

// Mouseout function for image revert

function out(num) {

    document.getElementById(inames[num]).src = revert[num];
   
}



