//
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(33)","pi-436010182.htm",0,"CLEAR");
navigation[2] = new navElem(2,"FLICKER FREE DISCOUNTS&nbsp(1)","pi1126361182.htm",0,"HELJANSALE");
navigation[3] = new navElem(3,"DIECAST MODELS","pi735330877.htm",null,"Diecast");
navigation[4] = new navElem(4,"BASE TOYS&nbsp(24)","pi1193351046.htm",3,"BASE");
navigation[5] = new navElem(5,"BRITBUS&nbsp(3)","pi-694650075.htm",3,"BRITBUS");
navigation[6] = new navElem(6,"CLASSIX POCKETBOND&nbsp(77)","pi1207578562.htm",3,"CLASSIX");
navigation[7] = new navElem(7,"CORGI DIECAST","pi1079391485.htm",3,"CorDiecast");
navigation[8] = new navElem(8,"9 Double 9&nbsp(1)","pi1078498696.htm",7,"999");
navigation[9] = new navElem(9,"Collectors Club&nbsp(2)","pi1083308667.htm",7,"Collectors");
navigation[10] = new navElem(10,"Hauliers of Renown&nbsp(10)","pi1072222260.htm",7,"HR");
navigation[11] = new navElem(11,"Original Omnibus&nbsp(84)","pi1878741285.htm",7,"OOC");
navigation[12] = new navElem(12,"Roadscene&nbsp(3)","pi1164533843.htm",7,"ROADSCENE");
navigation[13] = new navElem(13,"Trackside&nbsp(124)","pi1072291837.htm",7,"Trackside");
navigation[14] = new navElem(14,"Vanguards&nbsp(2)","pi1130785341.htm",7,"VANG");
navigation[15] = new navElem(15,"CREATIVE MASTER NORTHCORD LTD&nbsp(11)","pi-1685814140.htm",3,"CMNL");
navigation[16] = new navElem(16,"EXCLUSIVE FIRST EDITIONS (EFE)","pi-788357510.htm",3,"EFEDiecast");
navigation[17] = new navElem(17,"Commercial Vehicles&nbsp(40)","pi1091802243.htm",16,"Commercial");
navigation[18] = new navElem(18,"Diecast Buses 1:76 scale&nbsp(281)","pi-900431486.htm",16,"EFE");
navigation[19] = new navElem(19,"Gilbow Railway Collection&nbsp(20)","pi1464030927.htm",16,"Gilbow");
navigation[20] = new navElem(20,"OXFORD DIECAST","pi1213178164.htm",3,"OXFORD");
navigation[21] = new navElem(21,"1:76 MODELS (OO SCALE)&nbsp(98)","pi1222812391.htm",20,"OX176");
navigation[22] = new navElem(22,"1:148 MODELS (N SCALE)&nbsp(22)","pi-453890916.htm",20,"OXN");
navigation[23] = new navElem(23,"SUNSTAR","pi1084399302.htm",3,"Sunstar");
navigation[24] = new navElem(24,"BEDFORD OB&nbsp(3)","pi313473541.htm",23,"ssbEDFORD");
navigation[25] = new navElem(25,"SUNSTAR ROUTEMASTER&nbsp(2)","pi-818299251.htm",23,"SunRoute");
navigation[26] = new navElem(26,"SUNSTAR RT&nbsp(3)","pi-116447579.htm",23,"SSRT");
navigation[27] = new navElem(27,"MODEL RAILWAYS","pi1959419588.htm",null,"ModelRail");
navigation[28] = new navElem(28,"Heat-Shrink Sleeving and Solder&nbsp(5)","pi1101769066.htm",27,"Shrink");
navigation[29] = new navElem(29,"LEDs, Resistors, Loco Lamps and Flicker Free&nbsp(42)","pi1095800705.htm",27,"LED");
navigation[30] = new navElem(30,"Switches, Connectors and Wire&nbsp(21)","pi-995955304.htm",27,"Switches");
navigation[31] = new navElem(31,"Tools, Screws. Etc.&nbsp(12)","pi1089380691.htm",27,"Tools");
navigation[32] = new navElem(32,"Loco Storage and Maintenance&nbsp(9)","pi1249986791.htm",27,"LOCOSTORE");
navigation[33] = new navElem(33,"Trackside","pi1089747624.htm",27,"Tracksid");
navigation[34] = new navElem(34,"Accessories&nbsp(27)","pi14492119.htm",33,"TrackAcc");
navigation[35] = new navElem(35,"Station Lamps&nbsp(9)","pi822787775.htm",33,"STATION");
navigation[36] = new navElem(36,"Traintronics Signals&nbsp(12)","pi1195119023.htm",33,"SIGNALS");
navigation[37] = new navElem(37,"Trees&nbsp(22)","pi-176967290.htm",33,"Trees");
navigation[38] = new navElem(38,"Trackbed and accessories&nbsp(26)","pi1174314350.htm",27,"MASTERSCEN");
navigation[39] = new navElem(39,"Track Cleaning","pi851316667.htm",27,"TRACKCL");
navigation[40] = new navElem(40,"CENTERLINE Rail Cleaning Products&nbsp(5)","pi1111419269.htm",39,"Centerline");
navigation[41] = new navElem(41,"CMX Track Cleaners&nbsp(4)","pi894092768.htm",39,"CMX");
navigation[42] = new navElem(42,"CIRCUITRON&nbsp(5)","pi594092105.htm",27,"CIRCUITRON");
navigation[43] = new navElem(43,"DCC CONCEPTS&nbsp(69)","pi1256140589.htm",27,"DCCCONCEPT");
navigation[44] = new navElem(44,"DUHA&nbsp(21)","pi1243884572.htm",27,"DUHA");
navigation[45] = new navElem(45,"GAUGEMASTER","pi2046802461.htm",27,"GAUGEMASTE");
navigation[46] = new navElem(46,"Seep Point Motors&nbsp(4)","pi-1325769981.htm",45,"SEEP");
navigation[47] = new navElem(47,"DCC Hardware&nbsp(2)","pi1260906629.htm",45,"GMDCC");
navigation[48] = new navElem(48,"ITTC","pi1086702637.htm",27,"ITTC");
navigation[49] = new navElem(49,"IR Detector&nbsp(1)","pi1091729327.htm",48,"Detectors");
navigation[50] = new navElem(50,"Sound Modules&nbsp(63)","pi1086961876.htm",48,"ITTCSound");
navigation[51] = new navElem(51,"KADEE","pi-129521426.htm",27,"KADEE");
navigation[52] = new navElem(52,"Kadee Accessories&nbsp(2)","pi-203269155.htm",51,"KADEEACC");
navigation[53] = new navElem(53,"Kadee Couplings&nbsp(5)","pi-1550666790.htm",51,"KADEECOUP");
navigation[54] = new navElem(54,"Kadee Rolling Stock&nbsp(2)","pi1427943628.htm",51,"KADEERS");
navigation[55] = new navElem(55,"Kadee Uncouplers&nbsp(6)","pi467568087.htm",51,"KADEEUNC");
navigation[56] = new navElem(56,"LOGIC RAIL&nbsp(6)","pi1241702312.htm",27,"LOGICRAIL");
navigation[57] = new navElem(57,"NEW RAIL MODELS","pi1405194979.htm",27,"NEWRAIL");
navigation[58] = new navElem(58,"Accessories&nbsp(2)","pi-983274168.htm",57,"NRMACC");
navigation[59] = new navElem(59,"Blue Points&nbsp(13)","pi1161188161.htm",57,"BluePoints");
navigation[60] = new navElem(60,"Detail Kits&nbsp(7)","pi195698115.htm",57,"NRMDETAIL");
navigation[61] = new navElem(61,"Structure Kits&nbsp(2)","pi-528900086.htm",57,"NRMSTRUC");
navigation[62] = new navElem(62,"SEUTHE SMOKE UNITS&nbsp(4)","pi-488495942.htm",27,"Seuthe");
navigation[63] = new navElem(63,"DIGITAL COMMAND CONTROL","pi-906647335.htm",27,"DCCMaster");
navigation[64] = new navElem(64,"DCC DISCOUNTS","pi-1540248416.htm",63,"DDISCOUNTS");
navigation[65] = new navElem(65,"OTHER DCC DISCOUNTS&nbsp(1)","pi-1209075312.htm",64,"OTHRDCCDIS");
navigation[66] = new navElem(66,"HORNBY DCC&nbsp(6)","pi-283007962.htm",63,"HORNBYDCC");
navigation[67] = new navElem(67,"DIGITRAX","pi1190190877.htm",63,"DIGITRAX");
navigation[68] = new navElem(68,"Digitrax DCC Controllers&nbsp(11)","pi1190239485.htm",67,"DXCONTROL");
navigation[69] = new navElem(69,"Digitrax OO/HO Loco Decoders&nbsp(14)","pi1191071234.htm",67,"DXHODEC");
navigation[70] = new navElem(70,"Digitrax N and Z Scale Loco Decoders&nbsp(24)","pi1190242754.htm",67,"DXNZ");
navigation[71] = new navElem(71,"Digitrax Large Scale Loco Decoders&nbsp(4)","pi1190140806.htm",67,"DXLARGE");
navigation[72] = new navElem(72,"Digitrax Sound Decoders&nbsp(8)","pi1261180342.htm",67,"DXSOUND");
navigation[73] = new navElem(73,"Digitrax Turnout Decoders&nbsp(4)","pi-1405311793.htm",67,"DXTURN");
navigation[74] = new navElem(74,"Signal Decoders and Block Detectors&nbsp(11)","pi1191070817.htm",67,"DXSIG");
navigation[75] = new navElem(75,"Digitrax Spares, Accessories and Harnesses&nbsp(9)","pi16070268.htm",67,"DXSPARE");
navigation[76] = new navElem(76,"ESU","pi255446626.htm",63,"ESU");
navigation[77] = new navElem(77,"ECoS&nbsp(3)","pi1179956888.htm",76,"ECoS");
navigation[78] = new navElem(78,"LokSound 3.5 Decoders&nbsp(226)","pi653306041.htm",76,"LOKSOUND");
navigation[79] = new navElem(79,"LokSound Micro Decoders&nbsp(135)","pi1206018033.htm",76,"LoksoundMi");
navigation[80] = new navElem(80,"LokPilot Decoders&nbsp(3)","pi1629740678.htm",76,"LOKPILOT");
navigation[81] = new navElem(81,"ESU Speakers & Accessories&nbsp(8)","pi1051189775.htm",76,"ESUSPEAK");
navigation[82] = new navElem(82,"MRC","pi1213024957.htm",63,"MRC");
navigation[83] = new navElem(83,"DCC Control Systems&nbsp(2)","pi-453250758.htm",82,"MRCCONT");
navigation[84] = new navElem(84,"NCE DCC EQUIPMENT","pi695645099.htm",63,"NCE");
navigation[85] = new navElem(85,"DCC Controllers&nbsp(3)","pi-1022806256.htm",84,"Starter");
navigation[86] = new navElem(86,"DCC System Components&nbsp(11)","pi68619729.htm",84,"Comps");
navigation[87] = new navElem(87,"Walk Around Throttles&nbsp(4)","pi-1917373506.htm",84,"Throttles");
navigation[88] = new navElem(88,"HO and S Scale Decoders&nbsp(10)","pi993053799.htm",84,"HODec");
navigation[89] = new navElem(89,"N Scale Decoders&nbsp(2)","pi-1778878436.htm",84,"NDec");
navigation[90] = new navElem(90,"O and G Scale Decoders&nbsp(4)","pi328615149.htm",84,"ODec");
navigation[91] = new navElem(91,"Turnout Decoders&nbsp(3)","pi-845739094.htm",84,"TurDec");
navigation[92] = new navElem(92,"Signal Decoders and Block Detectors&nbsp(4)","pi-259536669.htm",84,"SigDec");
navigation[93] = new navElem(93,"Cab bus wiring aids&nbsp(9)","pi1343898088.htm",84,"CabsW");
navigation[94] = new navElem(94,"Accessories&nbsp(5)","pi-1647049271.htm",84,"Access");
navigation[95] = new navElem(95,"QSI Solutions&nbsp(1)","pi1189546413.htm",63,"QSI");
navigation[96] = new navElem(96,"SOUNDTRAXX","pi-955070361.htm",63,"SOUNDTRAXX");
navigation[97] = new navElem(97,"LC Decoders&nbsp(12)","pi2077605069.htm",96,"STXXLC");
navigation[98] = new navElem(98,"Sound Only Decoders&nbsp(2)","pi469651256.htm",96,"STXXSO");
navigation[99] = new navElem(99,"Tsunami&nbsp(28)","pi1163678433.htm",96,"TSUNAMI");
navigation[100] = new navElem(100,"TAM VALLEY DEPOT","pi-1827141676.htm",63,"TAMVALLEY");
navigation[101] = new navElem(101,"TEAM DIGITAL DCC ACCESSORIES&nbsp(8)","pi-279313351.htm",63,"TD");
navigation[102] = new navElem(102,"TRAIN CONTROL SYSTEMS (TCS) DCC DECODERS&nbsp(38)","pi880516271.htm",63,"TCSDCC");
navigation[103] = new navElem(103,"Harnesses & Spares&nbsp(17)","pi1960803941.htm",102,"TCS Harn");
navigation[104] = new navElem(104,"UMELEC&nbsp(1)","pi1170193797.htm",63,"UMELEC");
navigation[105] = new navElem(105,"ZIMO DCC","pi-1169072806.htm",63,"ZIMO");
navigation[106] = new navElem(106,"DCC Controllers&nbsp(1)","pi1068409657.htm",105,"ZimoCon");
navigation[107] = new navElem(107,"Systems and Accessories&nbsp(3)","pi1156675715.htm",105,"Accessorie");
navigation[108] = new navElem(108,"Accessory Decoders&nbsp(5)","pi266185496.htm",105,"ZimoAc");
navigation[109] = new navElem(109,"Loco Decoders&nbsp(12)","pi-290700077.htm",105,"ZIMODEC");
navigation[110] = new navElem(110,"OTHER DCC ACCESSORIES","pi1163618013.htm",63,"OTHERDCC");
navigation[111] = new navElem(111,"DCC POWER SUPPLY MONITORING&nbsp(2)","pi1975231194.htm",110,"POWERTEST");
navigation[112] = new navElem(112,"DCC SPECIALTIES&nbsp(8)","pi264658873.htm",110,"ONGUARD");
navigation[113] = new navElem(113,"MINIATRONICS&nbsp(6)","pi1171725801.htm",110,"MINIATRONI");
navigation[114] = new navElem(114,"MINIATURE SPEAKERS&nbsp(23)","pi-1541843420.htm",110,"MIN SPKRS");
navigation[115] = new navElem(115,"CABLES AND DCC CONVERTERS&nbsp(2)","pi1183291845.htm",110,"RJCABLE");
navigation[116] = new navElem(116,"HELJAN","pi1116109229.htm",27,"Heljan");
navigation[117] = new navElem(117,"Heljan Locos&nbsp(38)","pi2124874005.htm",116,"HJLOCOS");
navigation[118] = new navElem(118,"Heljan Wagons&nbsp(13)","pi-1789695224.htm",116,"HJWAG");
navigation[119] = new navElem(119,"Heljan Accessories&nbsp(4)","pi91443461.htm",116,"HJACC");
navigation[120] = new navElem(120,"HORNBY","pi-732465293.htm",27,"Hornby");
navigation[121] = new navElem(121,"Hornby DCC&nbsp(6)","pi-2007120561.htm",120,"DCC");
navigation[122] = new navElem(122,"Hornby Carriages&nbsp(26)","pi389825002.htm",120,"HornbyCarr");
navigation[123] = new navElem(123,"Hornby Rolling Stock&nbsp(36)","pi-1588604381.htm",120,"HornbyRoll");
navigation[124] = new navElem(124,"Hornby Steam Locos&nbsp(36)","pi1074353244.htm",120,"HornbyStea");
navigation[125] = new navElem(125,"Hornby Diesel Locos&nbsp(43)","pi-294749139.htm",120,"HornbyDies");
navigation[126] = new navElem(126,"Hornby Accessories&nbsp(25)","pi1109459963.htm",120,"HAccess");
navigation[127] = new navElem(127,"Hornby Skaledale","pi1118079955.htm",120,"Skaledale");
navigation[128] = new navElem(128,"Skaledale&nbsp(89)","pi1522168691.htm",127,"SKALD");
navigation[129] = new navElem(129,"Skale Autos&nbsp(15)","pi1862258490.htm",127,"SKALAUT");
navigation[130] = new navElem(130,"Skale Lighting&nbsp(6)","pi-2086303437.htm",127,"SKALELIGHT");
navigation[131] = new navElem(131,"ATHEARN","pi1194165569.htm",27,"ATHEARN");
navigation[132] = new navElem(132,"Canadian National&nbsp(3)","pi-711749471.htm",131,"CN");
navigation[133] = new navElem(133,"Canadian Pacific","pi871944814.htm",131,"CPLOCO");
navigation[134] = new navElem(134,"ATLAS","pi1216195940.htm",27,"ATLAS");
navigation[135] = new navElem(135,"GP38&nbsp(1)","pi215962261.htm",134,"ATGP38");
navigation[136] = new navElem(136,"GP40&nbsp(1)","pi1672700466.htm",134,"ATGP40");
navigation[137] = new navElem(137,"MP15DC&nbsp(1)","pi1225215647.htm",134,"MP15DC");
navigation[138] = new navElem(138,"PROTO 2000","pi-744101705.htm",27,"PROTO2000");
navigation[139] = new navElem(139,"Union Pacific Locos&nbsp(1)","pi503206444.htm",138,"UP");
navigation[140] = new navElem(140,"GIFT IDEAS","pi1478417285.htm",null,"GIFTS");
navigation[141] = new navElem(141,"GIFT VOUCHERS&nbsp(3)","pi1136329947.htm",140,"VOUCHER");
navigation[142] = new navElem(142,"MUGS&nbsp(3)","pi1055265890.htm",140,"MUGS");

// 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"));

