//
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 += "<strong>" + '<img src="assets/images/bullet.gif" width="15" height="11" border="0" align="absmiddle" hspace="0" vspace="0" class="catnav">' + "Zum Bestellschein</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\">Gesamtkatalog</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="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="14" height="1" height="1" alt="" border="0"></td>';
			};
		if(navItem.active) strHTML += '<td width="1%" class="ACTIVECATEGORY"><img src="assets/images/bulletcatact.gif" width="14" height="11" 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="14" height="11" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else strHTML += '<td width=\"1%\"><img src="assets/images/bulletcat1st.gif" width="14" height="11" 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,"Neuer Shop unter www.msh-store.de","pi771258099.htm",null,"100");
navigation[1] = new navElem(1,"Neuer Shop unter www.msh-store.de","pi-854431792.htm",0,"6000");
navigation[2] = new navElem(2,"Doorboards","pi2038505361.htm",1,"e30dobo");
navigation[3] = new navElem(3,"Neuer Shop unter www.msh-store.de","pi707625954.htm",0,"6001");
navigation[4] = new navElem(4,"Doorboards","pi-1604761785.htm",3,"e36dobo");
navigation[5] = new navElem(5,"Subwooferlösungen","pi-1645317390.htm",3,"e36sub");
navigation[6] = new navElem(6,"Neuer Shop unter www.msh-store.de","pi-863634412.htm",0,"6002");
navigation[7] = new navElem(7,"Hifi","pi116511398.htm",6,"460");
navigation[8] = new navElem(8,"Multimedia","pi1732455215.htm",6,"461");
navigation[9] = new navElem(9,"Aux IN Adapter","pi1020114708.htm",6,"e46aux");
navigation[10] = new navElem(10,"Car PC","pi-1188095619.htm",6,"e46carpc");
navigation[11] = new navElem(11,"CD Wechsler Pakete","pi-184072315.htm",6,"e46cd");
navigation[12] = new navElem(12,"CD Wechsler Adapter","pi-1530326942.htm",6,"e46cdadapt");
navigation[13] = new navElem(13,"Doorboards","pi1918469588.htm",6,"e46dobo");
navigation[14] = new navElem(14,"DVB-T","pi-1861421719.htm",6,"e46dvb-t");
navigation[15] = new navElem(15,"DVD-Mp3 Pakete","pi1104959105.htm",6,"e46dvd");
navigation[16] = new navElem(16,"Adapter Endstufe","pi-456703499.htm",6,"e46endst");
navigation[17] = new navElem(17,"Ipod-Ice Link Sets","pi920074158.htm",6,"e46ipod");
navigation[18] = new navElem(18,"Kopfstützen Monitore","pi911494937.htm",6,"e46kopfstü");
navigation[19] = new navElem(19,"Subwooferlösungen","pi1653655528.htm",6,"e46sub");
navigation[20] = new navElem(20,"Neuer Shop unter www.msh-store.de","pi1129845567.htm",0,"6003");
navigation[21] = new navElem(21,"CD Wechsler Pakete","pi-532547166.htm",20,"324132");
navigation[22] = new navElem(22,"CD Wechsler Adapter","pi1619844549.htm",20,"35132");
navigation[23] = new navElem(23,"Hifi","pi-1125605846.htm",20,"390");
navigation[24] = new navElem(24,"Multimedia","pi1803389283.htm",20,"391");
navigation[25] = new navElem(25,"Aux IN Adapter","pi-475715963.htm",20,"e39aux");
navigation[26] = new navElem(26,"Car PC","pi-1938962182.htm",20,"e39carpc");
navigation[27] = new navElem(27,"Doorboards","pi-1324992946.htm",20,"e39dobo");
navigation[28] = new navElem(28,"DVB-T","pi822311286.htm",20,"e39dvb-t");
navigation[29] = new navElem(29,"DVD-Mp3 Pakete","pi1689459374.htm",20,"e39dvd");
navigation[30] = new navElem(30,"Adapter Endstufe","pi-1333217774.htm",20,"e39endst");
navigation[31] = new navElem(31,"Ipod-Ice Link sets","pi-852852826.htm",20,"e39ipod");
navigation[32] = new navElem(32,"Kopfstützen Monitore","pi1428315494.htm",20,"e39kopfst");
navigation[33] = new navElem(33,"Subwooferlösungen","pi-653421623.htm",20,"e39sub");
navigation[34] = new navElem(34,"Neuer Shop unter www.msh-store.de","pi-1740449590.htm",0,"6004");
navigation[35] = new navElem(35,"TV Freischaltung","pi-1828350077.htm",34,"e60tvfree");
navigation[36] = new navElem(36,"Neuer Shop unter www.msh-store.de","pi882451303.htm",0,"6005");
navigation[37] = new navElem(37,"Hifi","pi-1926965650.htm",36,"380");
navigation[38] = new navElem(38,"Multimedia","pi-576682665.htm",36,"381");
navigation[39] = new navElem(39,"Aux In Adapter","pi753091426.htm",36,"e38aux");
navigation[40] = new navElem(40,"Car PC","pi777842675.htm",36,"e38carpc");
navigation[41] = new navElem(41,"CD Wechslerpakete","pi-344341732.htm",36,"e38cd");
navigation[42] = new navElem(42,"CD Wechsler Adapter","pi304551763.htm",36,"e38cdadapt");
navigation[43] = new navElem(43,"DVB-T","pi1279024575.htm",36,"e38dvb-t");
navigation[44] = new navElem(44,"DVD-Mp3 Pakete","pi1660159127.htm",36,"e38dvd");
navigation[45] = new navElem(45,"Adapter Endstufe","pi-2044973781.htm",36,"e38endst");
navigation[46] = new navElem(46,"Ipod Ice Link Sets","pi-984126969.htm",36,"e38ipod");
navigation[47] = new navElem(47,"Kopfstützen Monitore","pi-1301016849.htm",36,"e38kopfst");
navigation[48] = new navElem(48,"Subwooferlösungen","pi527011926.htm",36,"e38sub");
navigation[49] = new navElem(49,"Neuer Shop unter www.msh-store.de","pi-560431781.htm",0,"6006");
navigation[50] = new navElem(50,"Adapter Endstufe","pi-1756851568.htm",49,"e83endst");
navigation[51] = new navElem(51,"CD Wechslerpakete","pi-248657152.htm",49,"x3cdwechsl");
navigation[52] = new navElem(52,"DVD-Mp3 Pakete","pi331643020.htm",49,"x3dvd");
navigation[53] = new navElem(53,"Kopfstützenmonitore","pi-104958315.htm",49,"x3kopf");
navigation[54] = new navElem(54,"Multimedia","pi-1608771990.htm",49,"x3mm");
navigation[55] = new navElem(55,"Neuer Shop unter www.msh-store.de","pi1301989821.htm",0,"6007");
navigation[56] = new navElem(56,"Aux IN Adapter","pi-2130910149.htm",55,"e53aux");
navigation[57] = new navElem(57,"Car PC","pi598376376.htm",55,"e53carpc");
navigation[58] = new navElem(58,"DVB-T","pi-1751772012.htm",55,"e53dvb-t");
navigation[59] = new navElem(59,"Ipod-Ice Link Sets","pi-664801988.htm",55,"e53ipod");
navigation[60] = new navElem(60,"Kopfstützen Monitore","pi-191800828.htm",55,"e53kopfst");
navigation[61] = new navElem(61,"Subwooferlösungen","pi1153147679.htm",55,"e53sub");
navigation[62] = new navElem(62,"CD Wechsler Pakete","pi867517498.htm",55,"x5 cd");
navigation[63] = new navElem(63,"CD Wechsler Adapter","pi1588140595.htm",55,"x5 cdadap");
navigation[64] = new navElem(64,"Doorboards","pi-4282727.htm",55,"X5dobo");
navigation[65] = new navElem(65,"DVD-Mp3 Pakete","pi1691809949.htm",55,"x5dvd");
navigation[66] = new navElem(66,"Adapter Endstufe","pi-1620106415.htm",55,"x5endst");
navigation[67] = new navElem(67,"Komplett Sets","pi-100820211.htm",55,"x5komplett");
navigation[68] = new navElem(68,"Neuer Shop unter www.msh-store.de","pi1976840815.htm",0,"6008");
navigation[69] = new navElem(69,"Doorboards","pi207394692.htm",68,"z4dobo");
navigation[70] = new navElem(70,"Adapter Endstufe","pi-544998594.htm",68,"z4endst");
navigation[71] = new navElem(71,"Neuer Shop unter www.msh-store.de","pi-897588486.htm",0,"6009");
navigation[72] = new navElem(72,"Subwooferlösungen","pi266891592.htm",71,"mini");
navigation[73] = new navElem(73,"Adapter Endstufe","pi-143860249.htm",71,"miniendst");
navigation[74] = new navElem(74,"Neuer Shop unter www.msh-store.de","pi65861641.htm",0,"6010");
navigation[75] = new navElem(75,"Neuer Shop unter www.msh-store.de","pi669933981.htm",0,"6011");
navigation[76] = new navElem(76,"Neuer Shop unter www.msh-store.de","pi-679777536.htm",0,"6012");
navigation[77] = new navElem(77,"Neuer Shop unter www.msh-store.de","pi1789367343.htm",0,"6013");
navigation[78] = new navElem(78,"Neuer Shop unter www.msh-store.de","pi784841006.htm",0,"6014");
navigation[79] = new navElem(79,"Neuer Shop unter www.msh-store.de","pi1106244623.htm",0,"6015");
navigation[80] = new navElem(80,"Telefon Upgrade","pi622289566.htm",79,"35461532");
navigation[81] = new navElem(81,"Antennen","pi-140434383.htm",79,"3546543");
navigation[82] = new navElem(82,"Lederkonsolen","pi537985776.htm",79,"546541");
navigation[83] = new navElem(83,"Neuer Shop unter www.msh-store.de","pi1368366212.htm",null,"301");
navigation[84] = new navElem(84,"Neuer Shop unter www.msh-store.de","pi-1923644733.htm",null,"400");
navigation[85] = new navElem(85,"Monitore","pi-1915126312.htm",84,"354132");
navigation[86] = new navElem(86,"Stand Alone","pi841576911.htm",85,"324135132");
navigation[87] = new navElem(87,"Spezialmonitore","pi-1412707920.htm",85,"3546531");
navigation[88] = new navElem(88,"Kopfstuetzen komplett mit Monitoren","pi1836382776.htm",85,"536465534");
navigation[89] = new navElem(89,"Mazda","pi-1184851264.htm",88,"31561");
navigation[90] = new navElem(90,"Toyota","pi-1561171494.htm",88,"32578");
navigation[91] = new navElem(91,"Chrysler","pi2017636880.htm",88,"35453");
navigation[92] = new navElem(92,"Mercedes","pi1359197121.htm",88,"645456");
navigation[93] = new navElem(93,"Mitsubishi","pi376939479.htm",88,"6545646354");
navigation[94] = new navElem(94,"Audi","pi-475440721.htm",88,"65465");
navigation[95] = new navElem(95,"Lexus","pi-1844304869.htm",88,"6546546");
navigation[96] = new navElem(96,"Land Rover","pi-335926412.htm",88,"65465465");
navigation[97] = new navElem(97,"Jeep","pi230327143.htm",88,"6546546546");
navigation[98] = new navElem(98,"Nissan","pi1929049804.htm",88,"65468");
navigation[99] = new navElem(99,"Porsche","pi1725475293.htm",88,"654897");
navigation[100] = new navElem(100,"BMW","pi724939637.htm",88,"684654");
navigation[101] = new navElem(101,"VW","pi607549267.htm",88,"97465654");
navigation[102] = new navElem(102,"Kopfstützenmontage","pi-1807012103.htm",85,"654454654");
navigation[103] = new navElem(103,"Dachmonitore","pi-1236731036.htm",85,"65463512");
navigation[104] = new navElem(104,"Neuer Shop unter www.msh-store.de","pi-89965260.htm",84,"384652");
navigation[105] = new navElem(105,"Sub Two IBC Kofferraumbodenplatte für Subwoofereinbau ","pi-108623233.htm",84,"41654156");
navigation[106] = new navElem(106,"Radio mit Monitor","pi231707264.htm",84,"509");
navigation[107] = new navElem(107,"Neuer Shop unter www.msh-store.de","pi-1717752248.htm",84,"510");
navigation[108] = new navElem(108,"Endstufen 2-Kanal","pi1647694505.htm",107,"511");
navigation[109] = new navElem(109,"Endstufen 3-Kanal","pi-1141252682.htm",107,"512");
navigation[110] = new navElem(110,"Endstufen 4-Kanal","pi-409109249.htm",107,"513");
navigation[111] = new navElem(111,"Endstufen 5-Kanal","pi-1178856748.htm",107,"514");
navigation[112] = new navElem(112,"Endstufen 6-Kanal","pi804898629.htm",107,"515");
navigation[113] = new navElem(113,"Endstufen Mono","pi271582498.htm",107,"516");
navigation[114] = new navElem(114,"Neuer Shop unter www.msh-store.de","pi82491424.htm",84,"517");
navigation[115] = new navElem(115,"Koaxial Lautsprecher","pi-2011049097.htm",114,"35413521");
navigation[116] = new navElem(116,"Lautsprecher 10cm","pi614914894.htm",114,"518");
navigation[117] = new navElem(117,"Lautsprecher 13cm","pi668770487.htm",114,"519");
navigation[118] = new navElem(118,"Lautsprecher 16cm","pi-1048785862.htm",114,"520");
navigation[119] = new navElem(119,"Neuer Shop unter www.msh-store.de","pi-1897135565.htm",84,"521");
navigation[120] = new navElem(120,"Subwoofer 20cm","pi-147442440.htm",119,"522");
navigation[121] = new navElem(121,"Subwoofer 25cm","pi-1910628455.htm",119,"523");
navigation[122] = new navElem(122,"Subwoofer 30cm","pi-1259404314.htm",119,"524");
navigation[123] = new navElem(123,"Subwoofer 38cm","pi-1887935356.htm",119,"525");
navigation[124] = new navElem(124,"Neuer Shop unter www.msh-store.de","pi-1463456174.htm",84,"526");
navigation[125] = new navElem(125,"Neuer Shop unter www.msh-store.de","pi1098646096.htm",84,"651");
navigation[126] = new navElem(126,"Videozubehoer","pi1895269429.htm",125,"35413201");
navigation[127] = new navElem(127,"DVD Player","pi1105359662.htm",84,"6534123");
navigation[128] = new navElem(128,"Neuer Shop unter www.msh-store.de","pi1769160422.htm",null,"500");
navigation[129] = new navElem(129,"Hifi","pi-668788860.htm",128,"1062");
navigation[130] = new navElem(130,"Radio Kombis","pi1615361884.htm",129,"534132");
navigation[131] = new navElem(131,"Neuer Shop unter www.msh-store.de","pi-1186329340.htm",null,"601");

// 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"));


