// The function to sniff out a browser that can do image-swaps

function getAppVersion(){

	appname= navigator.appName;

	appversion = navigator.appVersion;

	majorver = appversion.substring(0, 1);

	if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 1;

	if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;

	return 0;

} // end function getAppVersion



// The function that does the image-swap

function chgImg(path,section,state) {

	if (getAppVersion()) {

		document[section].src = path + section + "_" + state + ".gif"; 

	}

} // end function chgImg









function loadNav(section) {

	//preloadSubNav(section);

	arNav = new Array;

	arNav[0] = new Array("aboutUs");

	arNav[1] = new Array("products");

	arNav[2] = new Array("military");

	arNav[3] = new Array("event");

	arNav[4] = new Array("construction");

	

	expandSection = -1;

	

	for (i=0; i < arNav.length; i++) {

		for(j=0; j < arNav[i].length; j++) {

			if (section == arNav[i][j]) {

				expandSection = i;

			}

		}

	} j=0; i=0;

	

	for (i=0; i < arNav.length; i++) {

		for(j=0; j < arNav[i].length; j++) {

			if (j == 0) { // main nav item

				path = "images/mainNav_";

				isMainNav = true;

			} else { // sub nav item

				path = "images/subNav_";

				isMainNav = false;

			}

			

			arImg = new Array();

			arImg[0] = new Image();

			arImg[0].src = path + arNav[i][j] + "_off.gif";

			arImg[1] = new Image();

			arImg[1].src = path + arNav[i][j] + "_on.gif";

			arImg[2] = new Image();

			arImg[2].src = path + arNav[i][j] + "_over.gif";

			onLoadState = new Image();

			if (section == arNav[i][j] || (expandSection == i && isMainNav == true)) {

				onLoadState.src = arImg[1].src; // on-state

				offState = "on";

				overState = "on";

			} else {

				onLoadState.src = arImg[0].src; // off-state

				offState = "off";

				overState = "over";

			}

			if (section == arNav[i][0] || isMainNav == true || expandSection == i) {

				if (arNav[i][j] == "construction") {

					output = "<td valign='top'><a href='" + arNav[i][j] + ".html' onmouseover=\"chgImg('" + path + "','" + arNav[i][j] + "','" + overState + "');window.status='" + arNav[i][j] + "';return true\" onmouseout=\"chgImg('" + path + "','" + arNav[i][j] + "','" + offState + "');window.status=' ';return true\"><img src='" + onLoadState.src + "' name='" + arNav[i][j] + "' border='0' alt='" + arNav[i][j] + "'></a></td>";

				} else if (arNav[i][j] == "whatsTheBuzz") {

					output = "<td valign='top'><a href='" + arNav[i][j] + ".php' onmouseover=\"chgImg('" + path + "','" + arNav[i][j] + "','" + overState + "');window.status='" + arNav[i][j] + "';return true\" onmouseout=\"chgImg('" + path + "','" + arNav[i][j] + "','" + offState + "');window.status=' ';return true\"><img src='" + onLoadState.src + "' name='" + arNav[i][j] + "' border='0' alt='" + arNav[i][j] + "'></a></td><td><img src='images/mainNav_divider.gif'></td>";

				} else {

					output = "<td valign='top'><a href='" + arNav[i][j] + ".html' onmouseover=\"chgImg('" + path + "','" + arNav[i][j] + "','" + overState + "');window.status='" + arNav[i][j] + "';return true\" onmouseout=\"chgImg('" + path + "','" + arNav[i][j] + "','" + offState + "');window.status=' ';return true\"><img src='" + onLoadState.src + "' name='" + arNav[i][j] + "' border='0' alt='" + arNav[i][j] + "'></a></td><td><img src='images/mainNav_divider.gif'></td>";

				}



				document.write(output);

			} // end if

		} // end for

	} // end for

		





} // end function loadNav







function loadSubNav(subsection) {



			

	if (subsection == "who") {

		output = "<div style='padding-top:10px;'><table bgcolor='#9999CC' width='100%' height='25'><tr>";

		output = output + "<td Style='padding-left:40px;padding-top:5px;padding-bottom:5px;'>";

		output = output + "<a href='who_philosophy.html'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Philosophy</span></a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; ";

		output = output + "<a href='who_people.html'><span style='font-family:Arial; font-size:10px; font-weight:bold; 	color:#260260;'>People</span></a></td>";

		output = output + "</tr></table></div>";

	} else if (subsection == "whatWeDo") {

		output = "<div style='padding-top:10px;'><table bgcolor='#9999CC' width='100%' height='25'><tr>";

		output = output + "<td Style='padding-left:40px;padding-top:5px;padding-bottom:5px;'><a href='whatWeDo_offerings.html'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Services</span></a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; ";

		//output = output + "<a href='whatWeDo_industries.html'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Industries</span></a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; ";

		output = output + "<a href='whatWeDo_caseStudies.html'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Case Studies</span></a></td>";

		output = output + "</tr></table></div>";

	} else if (subsection == "whatsTheBuzz") {

		output = "<div style='padding-top:10px;'><table bgcolor='#9999CC' width='100%' height='25'><tr>";

		output = output + "<td Style='padding-left:40px;padding-top:5px;padding-bottom:5px;'><a href='whatsTheBuzz_news.php'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>News/Releases</span></a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; ";

		output = output + "<a href='whatsTheBuzz_awards.html'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Awards</span></a></td>";

		output = output + "</tr></table></div>";

	} else if (subsection == "reporters") {

		output = "<div style='padding-top:10px;'><table bgcolor='#9999CC' width='100%' height='25'><tr>";

		output = output + "<td Style='padding-left:40px;padding-top:5px;padding-bottom:5px;'><a href='reporters_research.php'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Research</span></a> &nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp; ";

		output = output + "<a href='reporters_video.php'><span style='font-family:Arial; font-size:10px; font-weight:bold; color:#260260;'>Scripts &amp; Video</span></a></td>";

		output = output + "</tr></table></div>";

	}





				document.write(output);

			





} // end function loadSubNav



