//
function miniCart(){
var prdCount = 0, prdString = "", subTotal = (xmlConfig.cartSubTotal > 0)?xmlConfig.cartSubTotal:0;
	if(xmlOHeader.childNodes.length==0) subTotal = 0;
	for(var i=0;i<xmlOHeader.childNodes.length;i++){
		prdCount = prdCount+(parseInt(xmlOHeader.childNodes[i].QuantityAmount));
		};
	prdString += "Number of Items:<strong>&nbsp;" + prdCount + "</strong><br>";
	prdString += "Subtotal:<strong>&nbsp;" + TFormatCurrency(subTotal, objPriCurrency) + "</strong><br><br>";
	prdString += "<a class=\"WAGRUNAV\" href=\"orderform." + xmlConfig.fileExtension + "\">";
	prdString += "<strong>" + '<img src="assets/images/bullet.gif" width="11" height="14" alt="Bullet.gif" border="0" align="absmiddle" hspace="0" vspace="0" class="catnav">' + "Go to the Orderform</strong></a>";
	return(prdString);
	};
//
var TNavDropDownIndent = ".."
//
function NavLinkedDropDownList(){
	return(TNavDropDownList(true));
	};
//
function NavDropDownList(){
	return(TNavDropDownList(false));
	};
//
function storeSearchParameters(optionValueArray){
var xmlSearchEngine = xmlConfig.getFirstItem("SearchEngine");
	if(optionValueArray[0]!="null"&&optionValueArray[0]!="nada"){
		xmlSearchEngine.categoryIndex = optionValueArray[0];
		xmlSearchEngine.categoryId = optionValueArray[2];
		xmlSearchEngine.ByCategory = "1";
		}
	else{
		xmlSearchEngine.categoryIndex = "null";
		xmlSearchEngine.categoryId = "null";
		xmlSearchEngine.ByCategory = "0";
		};
	};
//
function TNavDropDownList(asLink){
var rString = "";
var myNavIndex = "";
	if(asLink) myNavIndex = xmlConfig.navIndex;
	else myNavIndex = xmlConfig.getFirstItem("SearchEngine").categoryIndex;
	if(!(myNavIndex=="null"||myNavIndex=="")){ navigation[parseInt(myNavIndex)].active = true; };
	if(asLink) rString += "<select name=\"navselect\" onChange=\"changeLoc(this[this.selectedIndex].value.split(';;')[0],this[this.selectedIndex].value.split(';;')[1])\">"
	else rString += "<select name=\"navselect\" onChange=\"storeSearchParameters(this[this.selectedIndex].value.split(';;'))\">";
	rString += "<option value=\"nada;;start.htm;;null\">Categories</option>";
	for(var i=0; i<navigation.length; i++){
		if(navigation[i].parentId==null){
			rString += TNavDropDownItem(navigation[i], "");
			};
		};
	rString += "</select>";
	return(rString);
	};
//
function TNavDropDownItem(navItem, cptPreFix){
var rString = "";
	rString += "<option value=\"" + navItem.id + ";;" + navItem.linkUrl + ";;" + navItem.categoryId + "\"";
	if(navItem.active) rString += " selected";
	rString += ">" + cptPreFix + navItem.caption + "</option>";
	for(var i=0; i<navigation.length;i++) if(navigation[i].parentId==navItem.id) rString += TNavDropDownItem(navigation[i], cptPreFix + TNavDropDownIndent);
	return(rString);	
	};
//
	function openItem(itemId){
	var objActiveItem = null;
		if(itemId!=null){
			objActiveItem = navigation[itemId];
			if(objActiveItem!=null){
				objActiveItem.open = true;
				openItem(objActiveItem.parentId);
				};
			};
		};
		
	function activateItem(itemId){
	var objActiveItem = null;
		if(itemId!=null){
			objActiveItem = navigation[itemId];
			if(objActiveItem!=null){
				objActiveItem.active = true;
				openItem(objActiveItem.parentId);
				};
			};
		};
		
	function itemHasSubelems(itemId){
		for(var i=0; i<navigation.length;i++) if(navigation[i].parentId==itemId) return(true);
		return(false);
		};
	
	function TNavLinkList(){
	var strHTML = "";
		for(var i=0; i<navigation.length; i++) if(navigation[i].parentId==null) strHTML += printItem(navigation[i], 0);
		return(strHTML);
		};	
		
	function printItem(navItem, depth){
	var strHTML = "";
	var elemWidth = 1;
		strHTML += '<table width="100%" class="CATLINKS1STPARENT" border="0" cellpadding="0" cellspacing="0" >';
		strHTML += "<tr>"
		for(var i=0; i<depth; i++){
			strHTML += "<td";
			if(navItem.active) strHTML += " class=\"ACTIVECATEGORY\""
			else strHTML += " class=\"CATLINKS1STBULLET\"";
			strHTML += ' width="1%"><img src="assets/images/spacer.gif" width="11" height="1" height="1" alt="" border="0"></td>';
			};
		if(navItem.active) strHTML += '<td width="1%" class="ACTIVECATEGORY"><img src="assets/images/bulletcatact.gif" width="11" height="14" alt="BulletCatAct.gif" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else if(navItem.open&&itemHasSubelems(navItem.id)) strHTML += '<td width="1%" class="CATLINKS1STBULLET"><img src="assets/images/bulletcat1stcls.gif" width="11" height="14" alt="BulletCat1stCls.gif" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else strHTML += '<td width=\"1%\"><img src="assets/images/bulletcat1st.gif" width="11" height="14" alt="BulletCat1st.gif" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		strHTML += "<td";
		if(navItem.active) strHTML += " class=\"ACTIVECATEGORY\""
		else strHTML += " class=\"CATLINKS1STBULLET\"";
		strHTML += "width=\"" + ( 100 - ( depth + 1 ) ) + "%\">"
			+ "<a href=\"" + navItem.linkUrl + "?categoryId=" + escape(navItem.id) + "\" class=\"WAGRUNAV\">"
			+ navItem.caption
			+ "</a>"
			+ "</td>";
		strHTML += "</tr>"
		strHTML += "</table>"
		depth++;
		if(navItem.active||navItem.open){
			for(var i=0; i<navigation.length;i++) if(navigation[i].parentId==navItem.id) strHTML += printItem(navigation[i], depth);
			};
		return(strHTML);
		};


//

// navElem
	function navElem(id,caption,linkUrl,parentId,categoryId){
		this.id = id;
		this.caption = caption;
		this.linkUrl = linkUrl;
		this.parentId = parentId;
		this.active = false;
		this.open = true;
		this.categoryId = categoryId;
		};
// navigation
var navigation = new Array();
//
navigation[0] = new navElem(0,"CURRENT SALE ITEMS","pi1096796488.htm",null,"Sales");
navigation[1] = new navElem(1,"DIECAST CLEARANCE ITEMS&nbsp(32)","pi-436010182.htm",0,"CLEAR");
navigation[2] = new navElem(2,"HELJAN WAGON CLEAROUT&nbsp(2)","pi-1339561564.htm",0,"DIECASTS");
navigation[3] = new navElem(3,"BUS BARGAIN BASEMENT&nbsp(64)","pi-955806973.htm",0,"HORNBYSALE");
navigation[4] = new navElem(4,"HORNBY CLEARANCE&nbsp(5)","pi1127406288.htm",0,"WartimeS");
navigation[5] = new navElem(5,"DIECAST MODELS","pi735330877.htm",null,"Diecast");
navigation[6] = new navElem(6,"BASE TOYS&nbsp(50)","pi1193351046.htm",5,"BASE");
navigation[7] = new navElem(7,"BRITBUS&nbsp(3)","pi-694650075.htm",5,"BRITBUS");
navigation[8] = new navElem(8,"CLASSIX POCKETBOND&nbsp(97)","pi1207578562.htm",5,"CLASSIX");
navigation[9] = new navElem(9,"CORGI DIECAST","pi1079391485.htm",5,"CorDiecast");
navigation[10] = new navElem(10,"9 Double 9&nbsp(1)","pi1078498696.htm",9,"999");
navigation[11] = new navElem(11,"Collectors Club&nbsp(2)","pi1083308667.htm",9,"Collectors");
navigation[12] = new navElem(12,"Original Omnibus&nbsp(59)","pi1878741285.htm",9,"OOC");
navigation[13] = new navElem(13,"Trackside&nbsp(78)","pi1072291837.htm",9,"Trackside");
navigation[14] = new navElem(14,"Vanguards&nbsp(2)","pi1130785341.htm",9,"VANG");
navigation[15] = new navElem(15,"CREATIVE MASTER NORTHCORD LTD&nbsp(9)","pi-1685814140.htm",5,"CMNL");
navigation[16] = new navElem(16,"EXCLUSIVE FIRST EDITIONS (EFE)","pi-788357510.htm",5,"EFEDiecast");
navigation[17] = new navElem(17,"Commercial Vehicles&nbsp(49)","pi1091802243.htm",16,"Commercial");
navigation[18] = new navElem(18,"Diecast Buses 1:76 scale&nbsp(300)","pi-900431486.htm",16,"EFE");
navigation[19] = new navElem(19,"Gilbow Railway Collection&nbsp(18)","pi1464030927.htm",16,"Gilbow");
navigation[20] = new navElem(20,"OXFORD DIECAST","pi1213178164.htm",5,"OXFORD");
navigation[21] = new navElem(21,"1:76 MODELS (OO SCALE)&nbsp(93)","pi1222812391.htm",20,"OX176");
navigation[22] = new navElem(22,"1:148 MODELS (N SCALE)&nbsp(19)","pi-453890916.htm",20,"OXN");
navigation[23] = new navElem(23,"MODEL RAILWAYS","pi1959419588.htm",null,"ModelRail");
navigation[24] = new navElem(24,"Heat-Shrink Sleeving and Solder&nbsp(5)","pi1101769066.htm",23,"Shrink");
navigation[25] = new navElem(25,"LEDs, Resistors, Loco and Coach Lamps and Flicker Free&nbsp(48)","pi1095800705.htm",23,"LED");
navigation[26] = new navElem(26,"Power Supply, Switches, Connectors and Wire&nbsp(16)","pi-995955304.htm",23,"Switches");
navigation[27] = new navElem(27,"Tools, Screws. Etc.&nbsp(11)","pi1089380691.htm",23,"Tools");
navigation[28] = new navElem(28,"Loco Storage, Maintenance and Lubrication","pi1249986791.htm",23,"LOCOSTORE");
navigation[29] = new navElem(29,"Loco Storage and Maintenance&nbsp(9)","pi1276297768.htm",28,"STOR");
navigation[30] = new navElem(30,"Lubrication&nbsp(4)","pi-71560951.htm",28,"LUB");
navigation[31] = new navElem(31,"Trackside","pi1089747624.htm",23,"Tracksid");
navigation[32] = new navElem(32,"Accessories&nbsp(30)","pi14492119.htm",31,"TrackAcc");
navigation[33] = new navElem(33,"Station Lamps and Bufferstops&nbsp(20)","pi822787775.htm",31,"STATION");
navigation[34] = new navElem(34,"Traintronics Signals&nbsp(13)","pi1195119023.htm",31,"SIGNALS");
navigation[35] = new navElem(35,"Trackbed and accessories&nbsp(27)","pi1174314350.htm",23,"MASTERSCEN");
navigation[36] = new navElem(36,"Track Cleaning","pi851316667.htm",23,"TRACKCL");
navigation[37] = new navElem(37,"CENTERLINE Rail Cleaning Products&nbsp(1)","pi1111419269.htm",36,"Centerline");
navigation[38] = new navElem(38,"CMX Track Cleaners&nbsp(2)","pi894092768.htm",36,"CMX");
navigation[39] = new navElem(39,"ATHEARN","pi1194165569.htm",23,"ATHEARN");
navigation[40] = new navElem(40,"Rolling Stock&nbsp(2)","pi-1909692461.htm",39,"ATHROLL");
navigation[41] = new navElem(41,"ATLAS","pi1216195940.htm",23,"ATLAS");
navigation[42] = new navElem(42,"GP38&nbsp(1)","pi215962261.htm",41,"ATGP38");
navigation[43] = new navElem(43,"MP15DC&nbsp(1)","pi1225215647.htm",41,"MP15DC");
navigation[44] = new navElem(44,"CIRCUITRON&nbsp(2)","pi594092105.htm",23,"CIRCUITRON");
navigation[45] = new navElem(45,"CON-COR","pi1272121565.htm",23,"CONCOR");
navigation[46] = new navElem(46,"Con-Cor Rolling Stock&nbsp(5)","pi1302092691.htm",45,"CONCORRS");
navigation[47] = new navElem(47,"Con-Cor Locos&nbsp(1)","pi1686252248.htm",45,"CONCORLOCO");
navigation[48] = new navElem(48,"DCC CONCEPTS","pi1256140589.htm",23,"DCCCONCEPT");
navigation[49] = new navElem(49,"Cobalt Point Motors&nbsp(11)","pi1826313866.htm",48,"COBALT");
navigation[50] = new navElem(50,"Connectors and DCC Accessories&nbsp(4)","pi-895191315.htm",48,"ACCESORIES");
navigation[51] = new navElem(51,"Flicker Free&nbsp(4)","pi-454576898.htm",48,"FLICKER");
navigation[52] = new navElem(52,"LEDs&nbsp(35)","pi978548068.htm",48,"LEDDCC");
navigation[53] = new navElem(53,"Loco Decoders&nbsp(37)","pi-1386027000.htm",48,"DCCLoco");
navigation[54] = new navElem(54,"Loco and Coach Lamps&nbsp(6)","pi-1464003630.htm",48,"LOCOLAMPS");
navigation[55] = new navElem(55,"MASTERSWITCH Products&nbsp(1)","pi371107448.htm",48,"MASTERSW");
navigation[56] = new navElem(56,"Rolling Road and MPD&nbsp(4)","pi448804653.htm",48,"ROLLINGROA");
navigation[57] = new navElem(57,"Soldering&nbsp(4)","pi1419936662.htm",48,"SOLDER");
navigation[58] = new navElem(58,"Station Lamps and Bufferstops&nbsp(20)","pi-1996295423.htm",48,"STATIONLAM");
navigation[59] = new navElem(59,"Tools, Screws, etc&nbsp(11)","pi1276767525.htm",48,"TOOLSETC");
navigation[60] = new navElem(60,"DIGITAL COMMAND CONTROL","pi-906647335.htm",23,"DCCMaster");
navigation[61] = new navElem(61,"DCC DISCOUNTS","pi-1540248416.htm",60,"DDISCOUNTS");
navigation[62] = new navElem(62,"DIGITRAX DISCOUNTS&nbsp(11)","pi1128249900.htm",61,"BEDFORD");
navigation[63] = new navElem(63,"OTHER DCC DISCOUNTS&nbsp(11)","pi-1209075312.htm",61,"OTHRDCCDIS");
navigation[64] = new navElem(64,"DCC CONCEPTS DCC PRODUCTS","pi1292841072.htm",60,"DCCCONCDCC");
navigation[65] = new navElem(65,"Cobalt DCC&nbsp(5)","pi-401729525.htm",64,"DCCCOBALT");
navigation[66] = new navElem(66,"Loco Decoders&nbsp(37)","pi1432521009.htm",64,"DCCLOCODEC");
navigation[67] = new navElem(67,"DCC Accessories&nbsp(2)","pi2144607216.htm",64,"DCCACCES");
navigation[68] = new navElem(68,"DIGITRAX","pi1190190877.htm",60,"DIGITRAX");
navigation[69] = new navElem(69,"Digitrax DCC Controllers&nbsp(2)","pi1190239485.htm",68,"DXCONTROL");
navigation[70] = new navElem(70,"Digitrax OO/HO Loco Decoders&nbsp(13)","pi1191071234.htm",68,"DXHODEC");
navigation[71] = new navElem(71,"Digitrax N and Z Scale Loco Decoders&nbsp(18)","pi1190242754.htm",68,"DXNZ");
navigation[72] = new navElem(72,"Digitrax Large Scale Loco Decoders&nbsp(4)","pi1190140806.htm",68,"DXLARGE");
navigation[73] = new navElem(73,"Digitrax Sound Decoders&nbsp(5)","pi1261180342.htm",68,"DXSOUND");
navigation[74] = new navElem(74,"Digitrax Turnout Decoders&nbsp(3)","pi-1405311793.htm",68,"DXTURN");
navigation[75] = new navElem(75,"Signal Decoders and Block Detectors&nbsp(8)","pi1191070817.htm",68,"DXSIG");
navigation[76] = new navElem(76,"Digitrax Spares, Accessories and Harnesses&nbsp(5)","pi16070268.htm",68,"DXSPARE");
navigation[77] = new navElem(77,"ESU","pi255446626.htm",60,"ESU");
navigation[78] = new navElem(78,"ESU Speakers & Accessories&nbsp(4)","pi1051189775.htm",77,"ESUSPEAK");
navigation[79] = new navElem(79,"GAUGEMASTER DCC","pi708589961.htm",60,"GAUGEMDCC");
navigation[80] = new navElem(80,"DCC Controllers&nbsp(2)","pi1309271505.htm",79,"GAUGEDCC");
navigation[81] = new navElem(81,"DCC Accessory Decoders&nbsp(1)","pi-1149817922.htm",79,"GAUGEACC");
navigation[82] = new navElem(82,"Tran$ave Loco Decoders&nbsp(1)","pi-1094753177.htm",79,"TRAINSAVE");
navigation[83] = new navElem(83,"HORNBY DCC&nbsp(3)","pi-283007962.htm",60,"HORNBYDCC");
navigation[84] = new navElem(84,"MRC","pi1213024957.htm",60,"MRC");
navigation[85] = new navElem(85,"DCC Control Systems&nbsp(1)","pi-453250758.htm",84,"MRCCONT");
navigation[86] = new navElem(86,"NCE DCC EQUIPMENT","pi695645099.htm",60,"NCE");
navigation[87] = new navElem(87,"DCC Controllers&nbsp(3)","pi-1022806256.htm",86,"Starter");
navigation[88] = new navElem(88,"DCC System Components&nbsp(9)","pi68619729.htm",86,"Comps");
navigation[89] = new navElem(89,"Walk Around Throttles&nbsp(5)","pi-1917373506.htm",86,"Throttles");
navigation[90] = new navElem(90,"HO and S Scale Decoders&nbsp(10)","pi993053799.htm",86,"HODec");
navigation[91] = new navElem(91,"N and Z Scale Decoders&nbsp(3)","pi-1778878436.htm",86,"NDec");
navigation[92] = new navElem(92,"O and G Scale Decoders&nbsp(3)","pi328615149.htm",86,"ODec");
navigation[93] = new navElem(93,"Turnout Decoders and Autoreverser&nbsp(5)","pi-845739094.htm",86,"TurDec");
navigation[94] = new navElem(94,"Signal Decoders and Block Detectors&nbsp(3)","pi-259536669.htm",86,"SigDec");
navigation[95] = new navElem(95,"Cab bus wiring aids&nbsp(11)","pi1343898088.htm",86,"CabsW");
navigation[96] = new navElem(96,"Accessories&nbsp(4)","pi-1647049271.htm",86,"Access");
navigation[97] = new navElem(97,"QSI Solutions&nbsp(1)","pi1189546413.htm",60,"QSI");
navigation[98] = new navElem(98,"SOUNDTRAXX","pi-955070361.htm",60,"SOUNDTRAXX");
navigation[99] = new navElem(99,"Tsunami&nbsp(21)","pi1163678433.htm",98,"TSUNAMI");
navigation[100] = new navElem(100,"TAM VALLEY DEPOT&nbsp(10)","pi-1827141676.htm",60,"TAMVALLEY");
navigation[101] = new navElem(101,"TEAM DIGITAL DCC ACCESSORIES&nbsp(9)","pi-279313351.htm",60,"TD");
navigation[102] = new navElem(102,"TRAIN CONTROL SYSTEMS (TCS) DCC DECODERS&nbsp(18)","pi880516271.htm",60,"TCSDCC");
navigation[103] = new navElem(103,"21 pin Decoders and Accessories&nbsp(4)","pi1285065654.htm",102,"TCS21");
navigation[104] = new navElem(104,"Harnesses & Spares&nbsp(15)","pi1960803941.htm",102,"TCS Harn");
navigation[105] = new navElem(105,"Keep Alive&nbsp(2)","pi1328176838.htm",102,"tcskeep");
navigation[106] = new navElem(106,"Lighting only decoders (FL)&nbsp(3)","pi1276674988.htm",102,"FL");
navigation[107] = new navElem(107,"N scale Decoders and Replacement boards&nbsp(18)","pi-676133802.htm",102,"REPLACEN");
navigation[108] = new navElem(108,"Replacement boards - OO/HO scale&nbsp(2)","pi-1408227953.htm",102,"REPLACEOO");
navigation[109] = new navElem(109,"TRAINTRONICS&nbsp(14)","pi-1858276590.htm",60,"TRAINTRONC");
navigation[110] = new navElem(110,"UMELEC&nbsp(1)","pi1170193797.htm",60,"UMELEC");
navigation[111] = new navElem(111,"ZIMO DCC","pi-1169072806.htm",60,"ZIMO");
navigation[112] = new navElem(112,"DCC Controllers","pi1068409657.htm",111,"ZimoCon");
navigation[113] = new navElem(113,"Systems and Accessories&nbsp(1)","pi1156675715.htm",111,"Accessorie");
navigation[114] = new navElem(114,"Accessory Decoders&nbsp(4)","pi266185496.htm",111,"ZimoAc");
navigation[115] = new navElem(115,"Loco Decoders&nbsp(4)","pi-290700077.htm",111,"ZIMODEC");
navigation[116] = new navElem(116,"OTHER DCC ACCESSORIES","pi1163618013.htm",60,"OTHERDCC");
navigation[117] = new navElem(117,"DCC POWER SUPPLY MONITORING&nbsp(2)","pi1975231194.htm",116,"POWERTEST");
navigation[118] = new navElem(118,"DCC SPECIALTIES&nbsp(7)","pi264658873.htm",116,"ONGUARD");
navigation[119] = new navElem(119,"MINIATRONICS&nbsp(5)","pi1171725801.htm",116,"MINIATRONI");
navigation[120] = new navElem(120,"MINIATURE SPEAKERS&nbsp(24)","pi-1541843420.htm",116,"MIN SPKRS");
navigation[121] = new navElem(121,"CABLES AND DCC CONVERTERS&nbsp(1)","pi1183291845.htm",116,"RJCABLE");
navigation[122] = new navElem(122,"DUHA&nbsp(20)","pi1243884572.htm",23,"DUHA");
navigation[123] = new navElem(123,"ELECTROTREN&nbsp(1)","pi-1526575500.htm",23,"ELECTROTEN");
navigation[124] = new navElem(124,"EXACTRAIL&nbsp(15)","pi1305369716.htm",23,"EXACTRAIL");
navigation[125] = new navElem(125,"GAUGEMASTER","pi2046802461.htm",23,"GAUGEMASTE");
navigation[126] = new navElem(126,"Seep Point Motors&nbsp(2)","pi-1325769981.htm",125,"SEEP");
navigation[127] = new navElem(127,"HELJAN","pi1116109229.htm",23,"Heljan");
navigation[128] = new navElem(128,"Heljan Locos&nbsp(21)","pi2124874005.htm",127,"HJLOCOS");
navigation[129] = new navElem(129,"Heljan Wagons&nbsp(2)","pi-1789695224.htm",127,"HJWAG");
navigation[130] = new navElem(130,"Heljan Accessories&nbsp(1)","pi91443461.htm",127,"HJACC");
navigation[131] = new navElem(131,"HORNBY","pi-732465293.htm",23,"Hornby");
navigation[132] = new navElem(132,"Hornby DCC&nbsp(3)","pi-2007120561.htm",131,"DCC");
navigation[133] = new navElem(133,"Hornby Carriages&nbsp(12)","pi389825002.htm",131,"HornbyCarr");
navigation[134] = new navElem(134,"Hornby Rolling Stock&nbsp(16)","pi-1588604381.htm",131,"HornbyRoll");
navigation[135] = new navElem(135,"Hornby Steam Locos&nbsp(15)","pi1074353244.htm",131,"HornbyStea");
navigation[136] = new navElem(136,"Hornby Diesel/Electric Locos&nbsp(23)","pi-294749139.htm",131,"HornbyDies");
navigation[137] = new navElem(137,"Hornby Accessories&nbsp(17)","pi1109459963.htm",131,"HAccess");
navigation[138] = new navElem(138,"Hornby Skaledale","pi1118079955.htm",131,"Skaledale");
navigation[139] = new navElem(139,"Skaledale&nbsp(49)","pi1522168691.htm",138,"SKALD");
navigation[140] = new navElem(140,"Skale Autos&nbsp(4)","pi1862258490.htm",138,"SKALAUT");
navigation[141] = new navElem(141,"Skale Lighting&nbsp(6)","pi-2086303437.htm",138,"SKALELIGHT");
navigation[142] = new navElem(142,"ITTC","pi1086702637.htm",23,"ITTC");
navigation[143] = new navElem(143,"IR Detector&nbsp(1)","pi1091729327.htm",142,"Detectors");
navigation[144] = new navElem(144,"Sound Modules&nbsp(75)","pi1086961876.htm",142,"ITTCSound");
navigation[145] = new navElem(145,"KADEE","pi-129521426.htm",23,"KADEE");
navigation[146] = new navElem(146,"Kadee Accessories&nbsp(3)","pi-203269155.htm",145,"KADEEACC");
navigation[147] = new navElem(147,"Kadee Couplings&nbsp(4)","pi-1550666790.htm",145,"KADEECOUP");
navigation[148] = new navElem(148,"Kadee Rolling Stock&nbsp(1)","pi1427943628.htm",145,"KADEERS");
navigation[149] = new navElem(149,"Kadee Uncouplers&nbsp(6)","pi467568087.htm",145,"KADEEUNC");
navigation[150] = new navElem(150,"LOGIC RAIL&nbsp(6)","pi1241702312.htm",23,"LOGICRAIL");
navigation[151] = new navElem(151,"NEW RAIL MODELS","pi1405194979.htm",23,"NEWRAIL");
navigation[152] = new navElem(152,"Accessories&nbsp(2)","pi-983274168.htm",151,"NRMACC");
navigation[153] = new navElem(153,"Blue Points&nbsp(11)","pi1161188161.htm",151,"BluePoints");
navigation[154] = new navElem(154,"Detail Kits&nbsp(6)","pi195698115.htm",151,"NRMDETAIL");
navigation[155] = new navElem(155,"Structure Kits&nbsp(2)","pi-528900086.htm",151,"NRMSTRUC");
navigation[156] = new navElem(156,"ONTRACKS","pi-965652168.htm",23,"Bachmann");
navigation[157] = new navElem(157,"Rolling Stock&nbsp(1)","pi349471327.htm",156,"BachRoll");
navigation[158] = new navElem(158,"PROTO 2000","pi-744101705.htm",23,"PROTO2000");
navigation[159] = new navElem(159,"SEUTHE SMOKE UNITS&nbsp(3)","pi-488495942.htm",23,"Seuthe");
navigation[160] = new navElem(160,"VITRAINS&nbsp(1)","pi1268661193.htm",23,"VITRAINS");
navigation[161] = new navElem(161,"WALTHERS","pi1312385482.htm",23,"WALTHERS");
navigation[162] = new navElem(162,"Cornerstone Series&nbsp(2)","pi1436750979.htm",161,"WALTHCORNE");

// getNavElementByCatID
function getNavElementByCatID(categoryId){
	for(var i=0; i<navigation.length; i++){
		if(navigation[i].categoryId==categoryId){
			return(navigation[i]);
			break;
			};
		};
		return(null);
	};
// changeLoc
function changeLoc(id,linkUrl){
	if(id!="nada"){
		xmlConfig.navIndex = id.toString();
		if(xmlConfig.getFirstItem("SearchEngine").ByCategory == "1"){
			if(id=="null") xmlConfig.getFirstItem("SearchEngine").categoryId = "null"
			else xmlConfig.getFirstItem("SearchEngine").categoryId = navigation[id].categoryId;
			xmlConfig.getFirstItem("SearchEngine").categoryIndex = id;
			}
		else{
			xmlConfig.getFirstItem("SearchEngine").categoryId = "null";
			xmlConfig.getFirstItem("SearchEngine").categoryIndex = "null";
			};
		safeData();
		location.href = linkUrl + "?categoryId=" + id.toString();
		};
	};
// searchOnEnterNavi
function searchOnEnterNavi(){
	if(window.event.keyCode==13){
		xmlConfig.getFirstItem('SearchEngine').term=document.searchEngine.searchTerm.value;
		location.href = "search.htm";
		};
	};
// activates entries for categories
activateItem(getParameterFromURL("categoryId"));


