var menuUrls = new Array;

sm0 = new Array;
sm0[0] = "1934 1/2 Scout";
sm0[1] = "/mod/1934_S.html";

sm1 = new Array;
sm1[0] = "1935 Chief";
sm1[1] = "/mod/1935_C.html";
sm1[2] = "1935 Four";
sm1[3] = "/mod/1935_F.html";
sm1[4] = "1935 Scout";
sm1[5] = "/mod/1935_S.html";

sm2 = new Array;
sm2[0] = "1936 Chief";
sm2[1] = "/mod/1936_C.html";
sm2[2] = "1936 Four";
sm2[3] = "/mod/1936_F.html";
sm2[4] = "1936 Scout";
sm2[5] = "/mod/1936_S.html";

sm3 = new Array;
sm3[0] = "1937-9 Chief";
sm3[1] = "/mod/1937_C.html";
sm3[2] = "1937-9 Four";
sm3[3] = "/mod/1937_F.html";
sm3[4] = "1937-9 Scout";
sm3[5] = "/mod/1937_S.html";

sm4 = new Array;
sm4[0] = "1940 Chief";
sm4[1] = "/mod/1940_C.html";
sm4[2] = "1940 Four";
sm4[3] = "/mod/1940_F.html";
sm4[4] = "1940 Scout";
sm4[5] = "/mod/1940_S.html";

sm5 = new Array;
sm5[0] = "1941-2 Chief";
sm5[1] = "/mod/1941_C.html";
sm5[2] = "1941-2 Four";
sm5[3] = "/mod/1941_F.html";
sm5[4] = "1941-2 Scout";
sm5[5] = "/mod/1941_S.html";

sm6 = new Array;
sm6[0] = "1946-7 Chief";
sm6[1] = "/mod/1946_C.html";

sm7 = new Array;
sm7[0] = "1948 Chief";
sm7[1] = "/mod/1948_C.html";

sm8 = new Array;
sm8[0] = "1950-1 Chief";
sm8[1] = "/mod/1950_C.html";

sm9 = new Array;
sm9[0] = "1952-3 Chief";
sm9[1] = "/mod/1952_C.html";

theSubmenuCollection = new Array("", "", sm0, sm1, sm2, sm3, sm4, sm5, sm6, sm7, sm8, sm9);

// Populate theSubmenu captions and values based on index passed in
function ChangeSubmenuTo(theIndex, sub)
{
	if ((theIndex == 0) || (theIndex == 1))
	{
		sub.options.length = 1;
		sub.options[0].text = "Please first select a Model Year.";
		sub.options[0].value = "";
		return;
	}

	var cnt, subIdx = 0;

	var newLen = theSubmenuCollection[theIndex].length / 2;
	newLen+=2; // to accomodate the blank on the top

	sub.options.length = newLen;
	sub.options[0].text = "Please select...";
	sub.options[0].value = "";
	sub.options[1].text = "----------------";
	sub.options[1].value = "";
	sub.selectedIndex = 0;
	for (cnt = 2; cnt < newLen; cnt++)
	{
		sub.options[cnt].text = theSubmenuCollection[theIndex][subIdx++];
		sub.options[cnt].value = theSubmenuCollection[theIndex][subIdx++];
	}
}

// Want to go to URL automatically on change
function DoSelection(theIndex, sub)
{
	if (sub.options[theIndex].value == "") return;

	window.location = sub.options[theIndex].value;
}

function ReloadHandler(menuToFix)
{
	if (document.all) // only do this for IE
	{
		var menuObj = eval("document.all." + menuToFix);
		menuObj.options.selectedIndex = 0;
	}
}