<!--

if(v){a=new Array(22);}

function disable() {
	var x=document.f2.searchstring
	 if (document.f1.m1.value == "*")
	  {
		 x.disabled=true
	  }
	 else
	  {
		 x.disabled=false
		}
}

function getFormNum (formName) {
	var formNum =-1;
	for (i=0;i<document.forms.length;i++){
		tempForm = document.forms[i];
		if (formName == tempForm) {
			formNum = i;
			break;
		}
	}
	return formNum;
}

function put2()
{
txt2=document.forms['f2'].searchstring.options[document.forms['f2'].searchstring.selectedIndex].text
document.forms['f2'].searchtitle.value=txt2
}

function formValidator()
{
 if (document.forms['f2'].searchstring.value == "*") 
 {
  return (false);
 }
  else
 {
  return (true);
 }
}

var catsIndex = -1;
var itemsIndex;

if (v) { // ns 2 fix
function newCat(){
	catsIndex++;
	a[catsIndex] = new Array();
	itemsIndex = 0;
}

function O(txt,str) {
	a[catsIndex][itemsIndex]=new myOptions(txt,str);
	itemsIndex++;
}

function myOptions(text,str){
	this.text = text;
	this.value = str;
}

// fill array

newCat();

O("- Choose Category - ","*");

//---------- universal below

newCat();
	
O("Railway Stations","faller ¬ho¬ building station");
O("Railway Buildings","faller ¬ho¬ building railway");
O("Commerce, Trade, Industry","faller ¬ho¬ building indust");
O("Town, Village, Country","faller ¬ho¬ building town");
O("Housing","faller ¬ho¬ building hous");
//none O("Building Sets","faller ¬ho¬ buildings bset");
O("Bridges, Viaducts","faller ¬ho¬ building bridge");
O("Fencing, Accessories","faller ¬ho¬ building fenc");
O("Portals, Retaining Walls","faller ¬ho¬ building tunnel");
O("Accessories","faller ¬ho¬ access");
	
newCat();
	
O("Rides","faller ¬ho¬ fairground rides");
O("Vehicles, Accessories","faller ¬ho¬ fairground access");
	
newCat();
	
O("Starter Sets","faller ¬ho¬ car system start");
O("Vehicles","faller ¬ho¬ car system vehicle");
// only one item left 6/3/09 O("Playstreet","faller ¬ho¬ car system play");
O("Spares, Accessories","faller ¬ho¬ car system spares");
O("Roadway Construction","faller ¬ho¬ car system roadway");
	
newCat();
	
O("Decor Cards, Roadway","faller ¬ho¬ scenic roadway");
O("Layout, Terrain Construction","faller ¬ho¬ scenic construction");
O("Grass Mats","faller ¬ho¬ scenic mat");
O("Scatter Materials","faller ¬ho¬ scenic scatter");
O("Trees, Shrubs","faller ¬ho¬ scenic tree");
O("Backscenes","faller ¬ho¬ scenic backscene");
//O("Premium Trees, Shrubs","faller ¬ho¬ scenic prem trees");
//O("Premium Scatters","faller ¬ho¬ scenics prem scatter");
//O("Premium Terrain Construction","faller ¬ho¬ scenics prem construction");
	
newCat();
	
O("Railway Personnel","faller ¬ho¬ figure railway");
O("Passengers","faller ¬ho¬ figures passenge");
O("Town, Village, Country","faller ¬ho¬ figure town");
O("Commerce, Trade, Industry","faller ¬ho¬ figure indust");
O("Emergency Services","faller ¬ho¬ figure emergen");
O("Agriculture & Rural","faller ¬ho¬ figure agricul");
O("Animals","faller ¬ho¬ figures animal");
O("Leisure, Sports","faller ¬ho¬ figure sport");
O("Military","faller ¬ho¬ figure military");
	
newCat();
	
O("Barracks","faller ¬ho¬ military barrack");
O("Infantry Figures","faller ¬ho¬ military figure infantry");
O("Crews, Other Figures","faller ¬ho¬ military figure crew");
O("Dioramas","faller ¬ho¬ military diorama");

newCat();
	
O("Electricals for HO","faller ¬ho¬ electrical");

newCat();

O("- - - - - - - - - - - -","*");

//--------n gauge below

newCat();

O("Railway Stations","faller ¬n¬ building station");
O("Railway Buildings","faller ¬n¬ building railway");
O("Commerce, Trade, Industry","faller ¬n¬ building industry");
O("Town, Village, Country","faller ¬n¬ building towns");
O("Portals, Retaining Walls","faller ¬n¬ building tunnel");
O("Bridges, Viaducts","faller ¬n¬ building bridge");

newCat();

O("Rides","faller ¬n¬ fairground ride");
O("Accessories","faller ¬n¬ fairground access");

newCat();

O("Starter Sets","faller ¬n¬ car system start");
O("Vehicles","faller ¬n¬ car system vehicle");

newCat();

O("Decor Cards, Roadway","faller ¬n¬ scenic roadway");
O("Premium Trees, Shrubs","faller ¬n¬ scenic prem tree");
O("Premium Scatters","faller ¬n¬ scenic prem scatter");
O("Premium Terrain Construction","faller ¬n¬ scenic prem construction");
O("Grass Mats","faller ¬n¬ scenic mat");
O("Scatter Materials","faller ¬n¬ scenic scatter");
O("Trees, Shrubs","faller ¬n¬ scenic tree");
O("Backscenes","faller ¬n¬ scenic backscene");

newCat();

O("Railway Personnel","faller ¬n¬ figure railway");
O("Passengers","faller ¬n¬ figure passenger");
O("Town, Village, Country","faller ¬n¬ figure town");
O("Commerce, Trade, Industry","faller ¬n¬ figure industry");
O("Emergency Services","faller ¬n¬ figure emergency");
O("Leisure, Sports","faller ¬n¬ figure sport");
O("Animals, Agriculture, Rural","faller ¬n¬ figure animal");	

newCat();
	
O("Electricals for N","faller ¬n¬ electrical");

newCat();

O("- - - - - - - - - - - -","*");

//--------z gauge below

newCat();

O("Railway Stations","faller ¬z¬ building station");
O("Railway Buildings","faller ¬z¬ building railway");
O("Town, Village, Country","faller ¬z¬ building town");
O("Portals, Retaining Walls","faller ¬z¬ building tunnel");
O("Bridges, Viaducts","faller ¬z¬ building bridge");

newCat();

O("Premium Scatters","faller ¬z¬ scenic prem scatter");
O("Decor Cards, Roadway","faller ¬z¬ scenic roadway");
O("Grass Mats","faller ¬z¬ scenic mat");
O("Scatter Materials","faller ¬z¬ scenic scatter");
O("Trees, Shrubs","faller ¬z¬ scenic trees");

newCat();

O("All Categories","faller ¬z¬ figure");

newCat();

O("Electricals for Z","faller ¬z¬ electrical");

newCat();

O("- - - - - - - - - - - -","*");

newCat();

O("All TT Scale","faller ¬tt¬");
O("Buildings and Accessories","faller ¬tt¬ building");
O("Figures","faller ¬tt¬ figures");

newCat();

O("- - - - - - - - - - - -","*");

//---------- universal below

newCat();
	
O("Common Electricals","faller electrical");
O("Tools","faller tool");
O("Adhesives","faller adhesive");
O("Lubricants","faller lubricant");
O("Paints","faller paint");
O("Publications","faller publication");
O("Catalogues","faller catalog");

} // if (v)

function relate(formName,elementNum,j) {
if(v){
var formNum = getFormNum(formName);
 if (formNum>=0) {
	formNum++; // reference next form, assume it follows in HTML
	with (document.forms[formNum].elements[elementNum]) {
		for(i=options.length-1;i>0;i--) options[i] = null; // null out in reverse order (bug workarnd)
		for(i=0;i<a[j].length;i++){
			options[i] = new Option(a[j][i].text,a[j][i].value); 
		}
		options[0].selected = true;
	}
 } else {
jmp(formName,elementNum);
}
}
}

function IEsetup(){
	if(!document.all) return;
	IE5 = navigator.appVersion.indexOf("5.")!=-1;
	if(!IE5) {
		for (i=0;i<document.forms.length;i++) {
			document.forms[i].reset();
		}
	}
}

window.onload = IEsetup;

//-->