//
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 += "Produkte:<strong>&nbsp;" + prdCount + "</strong><br>";
	prdString += "Summe:<strong>&nbsp;" + TFormatCurrency(subTotal, objPriCurrency) + "</strong><br><br>";
	prdString += "<a class=\"WAGRUNAV\" href=\"orderform." + xmlConfig.fileExtension + "\">";
	prdString += '<img src="assets/images/bulletcat1st.gif" width="13" height="14" alt="Bullet.gif" border="0" align="absmiddle" hspace="0" vspace="0" class="catnav">' + "Zum Bestellschein</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\">Produkt-Katalog</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);
		};


<!--  24.05.2004: "lenght mit lenght-1" ersetzt damit letzte Warengruppenliste nicht angezeigt wird  -->	
	function TNavLinkList(){
	var strHTML = "";
		for(var i=0; i<navigation.length-1; 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="1" 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="13" height="1" height="1" alt="" border="0"></td>';
			};
		if(navItem.active) strHTML += '<td width="1%" class="ACTIVECATEGORY"><img src="assets/images/bulletcatact.gif" width="13" 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="13" 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="13" 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 = false;
		this.categoryId = categoryId;
		};
// navigation
var navigation = new Array();
//
navigation[0] = new navElem(0,"Kataloge/Infoschriften","pi-2079793928.htm",null,"00-010");
navigation[1] = new navElem(1,"Aktuelle Neuheiten","pi-825155691.htm",null,"00-100");
navigation[2] = new navElem(2,"GPS-Geräte","pi-884414257.htm",null,"01-0");
navigation[3] = new navElem(3,"Strassennavigation","pi-1311221867.htm",2,"1-100");
navigation[4] = new navElem(4,"nüvi 465","pi1250323358.htm",3,"1-110");
navigation[5] = new navElem(5,"Zubehör","pi802217671.htm",4,"1-465-Z");
navigation[6] = new navElem(6,"nüvi 550","pi1074728778.htm",3,"1-112");
navigation[7] = new navElem(7,"Zubehör","pi-1211083513.htm",6,"1-450-Z");
navigation[8] = new navElem(8,"nüvi 1240/13xx/1490","pi1245490437.htm",3,"1-121");
navigation[9] = new navElem(9,"Zubehör","pi2019354594.htm",8,"1-140-Z");
navigation[10] = new navElem(10,"nüvi 1690","pi1260030453.htm",3,"1-122");
navigation[11] = new navElem(11,"Zubehör","pi2145148434.htm",10,"1-142-Z");
navigation[12] = new navElem(12,"nüvi 3700","pi-40710222.htm",3,"1-130");
navigation[13] = new navElem(13,"Zubehör","pi-1665499769.htm",12,"1-130-Z");
navigation[14] = new navElem(14,"nüvi 7x5","pi-1428018173.htm",3,"1-140");
navigation[15] = new navElem(15,"Zubehör","pi576518661.htm",14,"1-460-Z");
navigation[16] = new navElem(16,"zümo","pi1157365527.htm",3,"1-150");
navigation[17] = new navElem(17,"Zubehör","pi440041740.htm",16,"1-6000-Z");
navigation[18] = new navElem(18,"Mobile PC","pi-1809227932.htm",3,"1-750");
navigation[19] = new navElem(19,"Outdoor & Freizeit","pi-1514477980.htm",2,"1-200");
navigation[20] = new navElem(20,"Oregon","pi1218723566.htm",19,"1-1010");
navigation[21] = new navElem(21,"Zubehör","pi-353836073.htm",20,"1-1026-Z");
navigation[22] = new navElem(22,"Dakota","pi1249644376.htm",19,"1-1012");
navigation[23] = new navElem(23,"Zubehör","pi-1416117639.htm",22,"1-1012-Z");
navigation[24] = new navElem(24,"etrex","pi424535014.htm",19,"1-1020");
navigation[25] = new navElem(25,"Zubehör","pi1150248742.htm",24,"1-102-2");
navigation[26] = new navElem(26,"nüvi 550","pi1242295258.htm",19,"1-1030");
navigation[27] = new navElem(27,"Zubehör","pi-293711533.htm",26,"1-1030-Z");
navigation[28] = new navElem(28,"GPS 60-Reihe","pi1074173921.htm",19,"1-1040");
navigation[29] = new navElem(29,"Zubehör","pi-2133010290.htm",28,"1-1046-1");
navigation[30] = new navElem(30,"GPS 62-Reihe","pi1754463910.htm",19,"1-1050");
navigation[31] = new navElem(31,"Zubehör","pi1579149103.htm",30,"1-1050-Z");
navigation[32] = new navElem(32,"GPS 72/78-Reihe","pi1274177045.htm",19,"1-1080");
navigation[33] = new navElem(33,"Zubehör","pi-993237721.htm",32,"1-1080-Z");
navigation[34] = new navElem(34,"Sport & Fitness","pi191928604.htm",2,"1-300");
navigation[35] = new navElem(35,"Edge","pi1208382501.htm",34,"1-201");
navigation[36] = new navElem(36,"Zubehör","pi-2051299198.htm",35,"1-201-Z");
navigation[37] = new navElem(37,"Forerunner","pi1407992414.htm",34,"1-210");
navigation[38] = new navElem(38,"Zubehör","pi1190956025.htm",37,"1-109-1");
navigation[39] = new navElem(39,"Foretrex","pi1079632814.htm",34,"1-220");
navigation[40] = new navElem(40,"Zubehör","pi661013251.htm",39,"1-111-1");
navigation[41] = new navElem(41,"Fahrrad GPS","pi1131879810.htm",2,"1-400");
navigation[42] = new navElem(42,"Zubehör","pi921893851.htm",41,"1-110-Z");
navigation[43] = new navElem(43,"Motorrad GPS","pi335597115.htm",2,"1-500");
navigation[44] = new navElem(44,"Zubehör","pi-486443273.htm",43,"1-600-Z");
navigation[45] = new navElem(45,"Marine GPS","pi1576485682.htm",2,"1-600");
navigation[46] = new navElem(46,"Handgeräte","pi789480009.htm",45,"1-905");
navigation[47] = new navElem(47,"GPS für Festmontage","pi1085923137.htm",45,"1-910");
navigation[48] = new navElem(48,"GPS Kartenplotter","pi-941094640.htm",45,"1-920");
navigation[49] = new navElem(49,"Echolote-Fishfinder","pi1069228535.htm",45,"1-940");
navigation[50] = new navElem(50,"GPS-Module","pi1080752858.htm",2,"1-800");
navigation[51] = new navElem(51,"Zubehör","pi-491207302.htm",50,"02-100-1");
navigation[52] = new navElem(52,"Strassenkarten","pi1479761874.htm",null,"04");
navigation[53] = new navElem(53,"Aktuelle Updates","pi1204366179.htm",52,"4-1000");
navigation[54] = new navElem(54,"Strassenkarten MapSource","pi1069914197.htm",52,"4-1100");
navigation[55] = new navElem(55,"Strassenkarten vorprogrammiert","pi-1468163843.htm",52,"4-1150");
navigation[56] = new navElem(56,"Freizeit-/Wanderkarten","pi1277915137.htm",null,"05");
navigation[57] = new navElem(57,"Topokarten Schweiz","pi629380654.htm",56,"05-1");
navigation[58] = new navElem(58,"Topokarten Ausland","pi-158418409.htm",56,"05-2");
navigation[59] = new navElem(59,"Seekarten/BlueChart","pi-1012932035.htm",null,"06");
navigation[60] = new navElem(60,"Schweizer Seen","pi647860922.htm",59,"06-10");
navigation[61] = new navElem(61,"Binnengewässer","pi-402266445.htm",59,"06-20");
navigation[62] = new navElem(62,"BlueChart g2","pi-2079432840.htm",59,"06-30");
navigation[63] = new navElem(63,"Zubehör GPS","pi1058531655.htm",null,"10-Z");
navigation[64] = new navElem(64,"Taschen/Etui","pi1797354435.htm",63,"2-110");
navigation[65] = new navElem(65,"Netz-/Ladegeräte","pi2007698573.htm",63,"2-112");
navigation[66] = new navElem(66,"TMC-Verkehrsfunkempfänger","pi-727650214.htm",63,"2-121");
navigation[67] = new navElem(67,"ecoRoute HD","pi-93348474.htm",63,"2-122");
navigation[68] = new navElem(68,"Halterungen","pi-245055049.htm",63,"2-130");
navigation[69] = new navElem(69,"Touratech Lenkerhalter","pi-1396059407.htm",63,"2-140");
navigation[70] = new navElem(70,"Speicherkarten","pi1158294733.htm",63,"2-150");
navigation[71] = new navElem(71,"USB-Adapter/Kabel","pi-936708491.htm",63,"2-170");
navigation[72] = new navElem(72,"Helm-Lautsprecher","pi564031940.htm",63,"2-180");
navigation[73] = new navElem(73,"Antennen","pi-1047934084.htm",63,"2-198");
navigation[74] = new navElem(74,"Bücher über GPS","pi-570270615.htm",null,"15");
navigation[75] = new navElem(75,"Akku & Ladegeräte","pi1730575707.htm",null,"19");
navigation[76] = new navElem(76,"Ladegeräte","pi1067031736.htm",75,"5-100");
navigation[77] = new navElem(77,"Akkus","pi-9981530.htm",75,"5-102");
navigation[78] = new navElem(78,"Akku/Batterie Tester","pi-466886018.htm",75,"5-103");
navigation[79] = new navElem(79,"Zubehör alte GPS-Geräte","pi1226743765.htm",null,"20-1");
navigation[80] = new navElem(80,"nüvi diverse","pi521610710.htm",79,"20-100");
navigation[81] = new navElem(81,"nüvi 200er-Reihe","pi1247301125.htm",79,"20-110");
navigation[82] = new navElem(82,"nüvi 865","pi-1931847344.htm",79,"20-111");
navigation[83] = new navElem(83,"StreetPilot 26/27/28xx","pi-1195032193.htm",79,"20-120");
navigation[84] = new navElem(84,"StreetPilot 7200/7500","pi23768823.htm",79,"20-140");
navigation[85] = new navElem(85,"StreetPilot c3xx","pi-666591916.htm",79,"20-160");
navigation[86] = new navElem(86,"StreetPilot c5x0","pi1516838853.htm",79,"20-180");
navigation[87] = new navElem(87,"StreetPilot III","pi2030944268.htm",79,"20-200");
navigation[88] = new navElem(88,"Colorado","pi1256987768.htm",79,"20-210");
navigation[89] = new navElem(89,"GPSmap 76","pi-1624372694.htm",79,"20-211");
navigation[90] = new navElem(90,"GPS V","pi1760922141.htm",79,"20-220");
navigation[91] = new navElem(91,"Geko","pi1075095108.htm",79,"20-230");
navigation[92] = new navElem(92,"Quest","pi-365201806.htm",79,"20-240");
navigation[93] = new navElem(93,"iQue","pi-879094608.htm",79,"20-260");
navigation[94] = new navElem(94,"GPSmap 276/278","pi1263719103.htm",79,"20-400");
navigation[95] = new navElem(95,"Forerunner-/trex 101/201","pi2026696068.htm",79,"20-500");
navigation[96] = new navElem(96,"Diverse Modelle","pi823071945.htm",79,"20-900");
navigation[97] = new navElem(97,"Funkzubehör","pi1066913880.htm",null,"99-0");
navigation[98] = new navElem(98,"Frequenz-Handbücher","pi1534341277.htm",97,"9-100");
navigation[99] = new navElem(99,"Antennen","pi-1695641269.htm",97,"9-102");

// 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"));

