var arrATypes = new Array("* Showa SSMA, SMA, SMD & YMAS Pumps","* Hoses & Fittings","* Showa Electric Continuous Lubricators MLA & MV",
	"* Meter / Control Units","* Manual Lubricator & Mist Coolant Systems","* Junctions, Adapters & Connectors",
	"* Reservoirs","* Grease Systems","* Filters & Gauges","* Motors Only",
	"* Trabon & Lubriquip");
var arrAURLs = new Array("../american/cyclicpumps.html","../american/shoa4new-usa.html","../american/continuouspumps.html",
	"../american/shoa3new-usa.html","../american/shoa2new-usa.html","../american/shoa5new-usa.html",
	"../american/reservoirs.html","../american/grease.html","../american/shoa6new-usa.html","../american/motors.html",
	"../american/trabon.htm");
var arrFTypes = new Array("Automatic Cyclic Pumps","Automatic Continuous Pumps","Manual Pumps",
	"Meter / Control Units","Grease Systems"," Showa Piston Distributors"," Vogel Piston Distributors", "Lube Corp MO, MG & MGI Valves", "Hoses & Fittings",
	"Reservoirs","Motors Only","Adapters, Check Valves & Connectors","Filters & Gauges",
	"Types Not Listed");
var arrFURLs = new Array("../foreign/newjap1.html","../foreign/shoa-jap1new.html","../foreign/newjap2.html",
	"../foreign/newjap3.html","../foreign/grease.html","../foreign/shoa-jap2new.html","../foreign/vogelpistondist.htm","../foreign/lubecorpvalves.htm","../foreign/shoa-jap3new.html",
	"../foreign/reservoirs.html","../foreign/motors.html","../foreign/shoa-jap4new.html","../foreign/newjap4.html",
	"../profile/contact.html");
var arrMfgs = new Array("Showa","Bijur","Lube","Vogel");
var arrMURLs = new Array(".",".",".",".");
var selectedItem = 0;

function showHeader(){
	var headerText;
	var leftMenuText;

	headerText = "<div style='position:absolute;width:100%;height:80px;left:120px;top:0;background-color:ffffff;'>";
	headerText += "<table width=667 border=0 cellpadding=0 cellspacing=0>";
	headerText += "<tr>";
    headerText += "<th valign=middle rowspan=2>";
    headerText += "  <div align=center><img src=../images/home_header.jpg width=763 height=66></div>";
    headerText += "</th>";

	headerText += "</tr>";
	headerText += "</table>";
	headerText += "<br/>";
	headerText += "</div>";

	leftMenuText = "<div style='position:absolute;width:90;height:100%-80px;left:5;top:80;color:ffffff;font-size:14;'>";
	leftMenuText += "<br/>";
	leftMenuText += "<a style='font-size:14;' onmouseover='menuMouseOver(this);' onmouseout='menuMouseOut(this);' "
		+ "onclick='toggleSubMenu(div1);'>American</a>";
	leftMenuText += "<br/>";
	leftMenuText += "<div id=div1 style='display:none'>";
	for (i=0; i<arrATypes.length; i++)
	{
		leftMenuText += "<a id=A" + i + " class='level2' onmouseover='menuMouseOver(this);' "
			+ "onmouseout='menuMouseOut(this);' href='" + arrAURLs[i] + "'>" + arrATypes[i] + "</a><br/>";
	}
	leftMenuText += "</div>";
	leftMenuText += "<br/>";
	leftMenuText += "<a style='font-size:14;' onmouseover='menuMouseOver(this);' onmouseout='menuMouseOut(this);' "
		+ "onclick='toggleSubMenu(div3);'>Foreign</a>";
	leftMenuText += "<br/>";
	leftMenuText += "<div id=div3 style='display:none'>";
	for (i=0; i<arrFTypes.length; i++)
	{
		leftMenuText += "<a id=F" + i + " class='level2' onmouseover='menuMouseOver(this);' "
			+ "onmouseout='menuMouseOut(this);' href='" + arrFURLs[i] + "'>" + arrFTypes[i] + "</a><br/>";
	}
	leftMenuText += "</div>";
	leftMenuText += "<br/>";
	leftMenuText += "<a style='font-size:14;' class='header' onmouseover='menuMouseOver(this);' onmouseout='menuMouseOut(this);'" 
		+ " onclick='gotoSiteMap();'>Site Map</a>";
	leftMenuText += "</div>";

	document.write(headerText);
	document.write(leftMenuText);
}

function gotoSiteMap(){
	document.location="../nav/sitemap.html";
}

function showFooter(){
	var footerText;
	var leftMenuText;

	footerText = "<table border=0 cellpadding=0 cellspacing=0 align=center>";
	footerText += "<tr>";
    footerText += "<th>";
    footerText += "<font face=Arial,Helvetica,sans-serif><b><font size=2><a href=../home/home.html>home</a> | ";
    footerText += "<a href=../american/american.html>american</a> | ";
    footerText += "<a href=../foreign/foreign.html>foreign</a> | ";
	footerText += "<a href=../profile/aboutus.html>profile</a> | ";
	footerText += "<a href=../profile/contact.html>contact</a>";
    footerText += "</font></b></font>";
    footerText += "</th></tr></table>";
    footerText += "<br/>";
	  
	document.write(footerText);
}

function menuMouseOver(a){
	a.style.color = "white";
}

function menuMouseOut(a){
	if (a.id == selectedItem.id)
	{
		a.style.color = "yellow";
	} else {
		a.style.color = "white";
	}
}

function toggleSubMenu(id){
	if (id.style.display=="none")
	{
		id.style.display="inline";
	} else {
		id.style.display="none";
	}
}

function selectMenuItem(a){
	selectedItem = a;
	a.style.color = "yellow";
}

showHeader();
