var sctn = new Array();	// name of each section
var sctD = new Array();	// Directory for each section
sctn[0] = "Home";		sctD[0] = "home";
sctn[1] = "Services";	sctD[1] = "services";
sctn[2] = "Coverage";	sctD[2] = "coverage";
sctn[3] = "Web Tools";	sctD[3] = "tracking";
sctn[4] = "Resources";	sctD[4] = "resources";
sctn[5] = "Contacts";	sctD[5] = "contacts";

var subn = new Array();	// name of each sub-section
var subF = new Array();	// File name of each sub-section

function submenu_values(subnumber) {
	subn = [];
	subF = [];
	switch (subnumber)
	{
	case 0:
		subn[0] = "";		subF[0] = "";
		break;

	case 1:
		subn[0] = "Trucking";		subF[0] = "index";
		subn[1] = "Air Freight";	subF[1] = "air";
		subn[2] = "Ocean";			subF[2] = "ocean";
		subn[3] = "Warehouse";		subF[3] = "warehouse";
		break;

	case 2:
		subn[0] = "Direct next day";	subF[0] = "index";
		subn[1] = "Reliance network";	subF[1] = "reliance";
		subn[2] = "Reliance map";	subF[2] = "reliancemap";
		subn[3] = "Points list";	subF[3] = "serviceArea";
		break;

	case 3:
		subn[0] = "Sign up";			subF[0] = "index";
		subn[1] = "Tracing and More";	subF[1] = "tools";
		subn[2] = "Claim form";			subF[2] = "claim";
		subn[3] = "Facebook";			subF[3] = "facebook";
		break;

	case 4:
		subn[0] = "Weather";	subF[0] = "index";
		subn[1] = "News";		subF[1] = "news";
		subn[2] = "About";		subF[2] = "about";
		subn[3] = "Forms";		subF[3] = "forms";
		break;

	case 5:
		subn[0] = "Corporate";	subF[0] = "index";
		subn[1] = "Terminals";	subF[1] = "terminals";
		subn[2] = "Employment";	subF[2] = "jobs";
		subn[3] = "Send note";	subF[3] = "sendNote";
		break;
	}
}

document.write("<div id='nav' style='background-color:#000000; width:768px;'>\r");

document.write("<table width='100%' cellspacing=0 cellpadding=0><tr id='mainnav'>\r");
for (i=0; i<6; i++)
{
	if(i == mySctn) document.write("<td class='sctS'>"+sctn[i]+"</td>\r");
	else document.write("<td class='sctn'><a href='../"+sctD[i]+"/index.html' target='_top'>"+sctn[i]+"</a></td>\r");
}
document.write("</tr>\r<tr>\r");
for (i=0; i<6; i++)
{
	c = (i == mySctn) ? "triangleOrg.gif" : "triangleBlk.gif";
	document.write("<td class='bkor'><img src='../include/"+c+"'></td>\r");
}
document.write("<td class='bkor' width=100><img src='../include/triangleBlk.gif'></td>\r");
document.write("</tr></table>\r");

document.write("<div id='subnav'>\r");

for (active_subnum=0; active_subnum <= 5; active_subnum++) {
	submenu_values(active_subnum);

	space = 60 * active_subnum - 50;
	if (space < 0) space = 0;

	if(active_subnum == mySctn) {
		document.write("<table cellspacing=0 cellpadding=0><tr><td width="+space+" class='subn'>&nbsp;</td>\r");
	} else {
		document.write("<table cellspacing=0 cellpadding=0 style='display: none;'><tr><td width="+space+" class='subn'>&nbsp;</td>\r");
	}

	for (i=0; i<subn.length; i++)
	{
		if(active_subnum == mySctn && i == mySubn) document.write("<td class='subS'>"+subn[i]+"</td>\r");
		else
			document.write("<td class='subn'><a href='../"+sctD[active_subnum]+"/"+subF[i]+".html'>"+subn[i]+"</a></td>\r");
	}
	document.write("</tr></table>\r");

}
document.write("</div>\r");

document.write("</div>\r");

if (typeof jQuery != 'undefined') {
	$(document).ready(function(){
		$('#mainnav td').mouseover(function(){
			hoverindex = $('#mainnav td').index(this);
			$('#subnav table').hide();
			$($('#subnav table').get(hoverindex)).show();
		});
	});
}


function getForm() {
    with (document.forms["formGo"]) {
	for(i=0; i<document.forms.formGo.length-1; i++) {
	    if (sel[i].checked) {
		pageURL = "pdfForms/pdfDownloader.html#" + sel[i].value
		w = window.open(pageURL, "downl", "'toolbar=no,location=no,directories=no,status=no,menubar=no'");
		w.focus();
		return true;
	    }
	}
	alert("Please choose the form you need by clicking the radio button next to its name. Then click the 'Get Forms' button.");
    }
    return true;
}
		function logincheck() {
			if(document.forms["trace"].wlogin.value == "inside" || document.forms["trace"].wlogin.value == "outside") {
				setCookie('userLocated',document.forms["trace"].wlogin.value, expireLater);
				alert("Your Freight Trace access is set to " + document.forms["trace"].wlogin.value + " a Land Air building.\n\n(Name keywords are inside and outside)");
				window.location.reload();
				return false;
			}
			if(document.forms["trace"].wlogin.value.length<2 || document.forms["trace"].wpword.value.length<4) {
				alert("'Detailed Trace' reqires a user name of at least 2 characters and password of at least 4 characters.");
				return false;
			}
			setCookie('LAXVusername',document.forms["trace"].wlogin.value, expireLater);
			setCookie('LAXVuserpswd',"");
			return true;
		}
