function makeIntoAValidFileName(inString)
{
// filters out ¬`!"£$%^&*()_+}{~@:<>?/.,;'#[]|\ from a given string.
	outString="";
	for (Countx=0 ; Countx<inString.length ; Countx++)
	{
		StripThis = inString.substring(Countx,Countx+1)
		switch(StripThis)
		{
			case "¬":
				TempChar = "";
				break;
			case "`":
				TempChar = "";
				break;
			case "!":
				TempChar = "";
				break;
			case '"':
				TempChar = "";
				break;
			case "£":
				TempChar = "";
				break;
			case "$":
				TempChar = "";
				break;
			case "%":
				TempChar = "";
				break;
			case "^":
				TempChar = "";
				break;
			case "&":
				TempChar = "";
				break;
			case "*":
				TempChar = "";
				break;
			case "(":
				TempChar = "";
				break;
			case ")":
				TempChar = "";
				break;
			case "_":
				TempChar = "";
				break;
			case "+":
				TempChar = "";
				break;
			case "}":
				TempChar = "";
				break;
			case "{":
				TempChar = "";
				break;
			case "~":
				TempChar = "";
				break;
			case "@":
				TempChar = "";
				break;
			case ":":
				TempChar = "";
				break;
			case "<":
				TempChar = "";
				break;
			case ">":
				TempChar = "";
				break;
			case "?":
				TempChar = "";
				break;
			case "/":
				TempChar = "";
				break;
			case ".":
				TempChar = "";
				break;
			case ",":
				TempChar = "";
				break;
			case ";":
				TempChar = "";
				break;
			case "#":
				TempChar = "";
				break;
			case "[":
				TempChar = "";
				break;
			case "]":
				TempChar = "";
				break;
			case "|":
				TempChar = "";
				break;
			case " ":
				TempChar = "";
				break;
			default:
				TempChar = StripThis;
				break;
			}
		outString += TempChar;
	}
	return outString;
}

function gotoUrl(where,sString)
{
	where = makeIntoAValidFileName(where).toLowerCase();
	if(window.document.navForm.subMenu.selectedIndex != 0 && where && where!="")
	{
		location.href = where + ".htm?"+ sString;
	}
	else
	{
		window.document.navForm.subMenu.selectedIndex = 0;
	}
}

/*
parts stolen from webmonkey.com for the brilliant script below. absolutely fanastic.
*/

var introduction = new Array("Please Make A Selection"	,""		,""		,""		,""			,""				,""				,"");
var rotating = new Array("Rotating Seals Menu"		,"PRR"	,"EPR"	,"DR"	,"MLE"		,"NBP / NBR"	,"NAP / NAR"	,"");
var stationary = new Array("Stationary Seats Menu"	,"TAR"	,"LAR"	,"LTAR"	,"L"	,"IN"			,"LBR"			,"TBR");

var theArrays = new Array('introduction','rotating','stationary','automotive');

function swapOptions(sIndex)

{
	//alert();
  if(sIndex==0)
  {
	location.href = "./cyclam.htm";
  	//gotoUrl("cyclam");
  } else {
	  if(sIndex==3)
	  {
		location.href = "./automotive.htm";
	  } else {
		  the_array_name = theArrays[sIndex];
		  done = 1;
		  var numbers_select = window.document.navForm.subMenu;
		  var the_array = eval(the_array_name);
		  setOptionText(window.document.navForm.subMenu, the_array);
		  window.document.navForm.subMenu.selectedIndex = 0;
		  //window.document.navForm.initMenu.value = the_array_name;
	  }
  }
}

function setOptionText(the_select, the_array)
{
  for (loop=0; loop < the_select.options.length; loop++)
  {
    the_select.options[loop].text = the_array[loop];
  }
}