//
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 += "<br><a class=\"WAGRUNAV\" href=\"orderform." + xmlConfig.fileExtension + "\">";
	prdString += "<strong>" + '<img src="assets/images/bullet.gif" width="14" height="14" 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="14" 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="14" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else strHTML += '<td width=\"1%\"><img src="assets/images/bulletcat1stcls.gif" width="14" height="14" 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,"Weihnachtliches","pi1132732338.htm",null,"130");
navigation[1] = new navElem(1,"Bücher","pi-1222696363.htm",null,"1");
navigation[2] = new navElem(2,"Aktuelles Zeitgeschehen","pi1082223039.htm",1,"03");
navigation[3] = new navElem(3,"Globalisierung","pi872549973.htm",2,"330");
navigation[4] = new navElem(4,"USA","pi1235126025.htm",2,"400");
navigation[5] = new navElem(5,"BRD","pi-1284517226.htm",2,"405");
navigation[6] = new navElem(6,"Europa","pi962250847.htm",2,"410");
navigation[7] = new navElem(7,"Finanzcrash und Krise","pi1247988227.htm",2,"591");
navigation[8] = new navElem(8,"Weltgeschehen","pi1324199000.htm",2,"611");
navigation[9] = new navElem(9,"Einwanderung","pi2074243421.htm",2,"603");
navigation[10] = new navElem(10,"Alte Bücher neu aufgelegt","pi-997528818.htm",1,"6");
navigation[11] = new navElem(11,"Landser am Feind","pi1268898426.htm",1,"606");
navigation[12] = new navElem(12,"Günstige Sonderposten","pi1335226011.htm",1,"145");
navigation[13] = new navElem(13,"Verbilligte Restauflagen","pi1862217057.htm",1,"75");
navigation[14] = new navElem(14,"Anthropologie","pi-1113165788.htm",1,"325");
navigation[15] = new navElem(15,"Brauchtum und Mythologie","pi-1102100008.htm",1,"4");
navigation[16] = new navElem(16,"Deutsche Geschichte","pi1741561950.htm",1,"480");
navigation[17] = new navElem(17,"Gesamtdarstellung","pi-852208929.htm",16,"595");
navigation[18] = new navElem(18,"Vor- und Frühgeschichte","pi1679628473.htm",16,"305");
navigation[19] = new navElem(19,"Kriege","pi835724423.htm",16,"485");
navigation[20] = new navElem(20,"Freiheitskampf","pi-2128104004.htm",16,"490");
navigation[21] = new navElem(21,"Deutscher Osten","pi-1893791662.htm",1,"65");
navigation[22] = new navElem(22,"Flucht und Vertreibung","pi74326635.htm",1,"70");
navigation[23] = new navElem(23,"Judaica","pi1234625494.htm",1,"295");
navigation[24] = new navElem(24,"Kolonien","pi244551302.htm",1,"315");
navigation[25] = new navElem(25,"Kunst","pi-1518571121.htm",1,"320");
navigation[26] = new navElem(26,"Militaria","pi-670348890.htm",1,"110");
navigation[27] = new navElem(27,"Einheiten und Verbände","pi-673394797.htm",26,"460");
navigation[28] = new navElem(28,"Panzerwaffe","pi-1328511476.htm",26,"365");
navigation[29] = new navElem(29,"Uniformen und Ausrüstung","pi-1494930439.htm",26,"445");
navigation[30] = new navElem(30,"Geschichte","pi1926382383.htm",26,"613");
navigation[31] = new navElem(31,"Waffentechnik","pi487223494.htm",26,"450");
navigation[32] = new navElem(32,"Auszeichnungen","pi1336391375.htm",26,"455");
navigation[33] = new navElem(33,"Lyrik","pi-1631317054.htm",1,"599");
navigation[34] = new navElem(34,"Persönlichkeiten","pi1072501491.htm",1,"5");
navigation[35] = new navElem(35,"Lexika","pi-886247379.htm",34,"596");
navigation[36] = new navElem(36,"Hitler","pi-1451433230.htm",34,"350");
navigation[37] = new navElem(37,"Personen um Hitler","pi-1950678454.htm",34,"390");
navigation[38] = new navElem(38,"Militärs","pi879616771.htm",34,"395");
navigation[39] = new navElem(39,"Freiheitskämpfer","pi-486172280.htm",34,"475");
navigation[40] = new navElem(40,"Biographien","pi1267347582.htm",34,"605");
navigation[41] = new navElem(41,"Philosophie","pi-1545522959.htm",1,"465");
navigation[42] = new navElem(42,"Preußen","pi1883765424.htm",1,"430");
navigation[43] = new navElem(43,"Ratgeber","pi2057792489.htm",1,"592");
navigation[44] = new navElem(44,"Reiseführer","pi1733018613.htm",1,"115");
navigation[45] = new navElem(45,"Sport","pi608295437.htm",1,"495");
navigation[46] = new navElem(46,"Umwelt und Natur","pi-1035764529.htm",1,"175");
navigation[47] = new navElem(47,"Überlebenstraining","pi-2047317710.htm",1,"415");
navigation[48] = new navElem(48,"Waffen SS","pi1122110087.htm",1,"100");
navigation[49] = new navElem(49,"Waffen SS - Bildbände","pi1116000045.htm",48,"80");
navigation[50] = new navElem(50,"Divisionsgeschichten","pi1231756857.htm",48,"300");
navigation[51] = new navElem(51,"Erlebnisberichte","pi565875380.htm",48,"370");
navigation[52] = new navElem(52,"Europäische Freiwillige","pi1234635994.htm",48,"335");
navigation[53] = new navElem(53,"Gesamtdarstellungen","pi-206174206.htm",48,"380");
navigation[54] = new navElem(54,"Männer der Waffen-SS","pi-659475365.htm",48,"385");
navigation[55] = new navElem(55,"2. Weltkrieg","pi-1039011126.htm",1,"105");
navigation[56] = new navElem(56,"Afrika","pi1838917735.htm",55,"593");
navigation[57] = new navElem(57,"Erinnerungen","pi-1273604067.htm",55,"435");
navigation[58] = new navElem(58,"Kriegsmarine","pi-244697065.htm",55,"360");
navigation[59] = new navElem(59,"Kriegsschuldfrage","pi1189668504.htm",55,"345");
navigation[60] = new navElem(60,"Kriegsverbrechen","pi429465171.htm",55,"340");
navigation[61] = new navElem(61,"Luftwaffe","pi667536430.htm",55,"355");
navigation[62] = new navElem(62,"Letzte Kämpfe","pi-245920998.htm",55,"440");
navigation[63] = new navElem(63,"Ostfeldzug","pi-2130228412.htm",55,"502");
navigation[64] = new navElem(64,"Verdiente Soldaten","pi1236233156.htm",55,"598");
navigation[65] = new navElem(65,"Verleumdung und Wahrheit","pi-1710321960.htm",55,"470");
navigation[66] = new navElem(66,"Westfeldzug","pi1378754880.htm",55,"594");
navigation[67] = new navElem(67,"Wehrmacht","pi-1080040375.htm",55,"602");
navigation[68] = new navElem(68,"Operationen","pi-918094657.htm",55,"612");
navigation[69] = new navElem(69,"Zeitgeschichte","pi-48294863.htm",1,"3");
navigation[70] = new navElem(70,"Bildbände","pi1115919694.htm",69,"60");
navigation[71] = new navElem(71,"20. Jahrhundert","pi-38024008.htm",69,"195");
navigation[72] = new navElem(72,"Freikorps","pi744422748.htm",69,"210");
navigation[73] = new navElem(73,"Südtiroler Freiheitskampf","pi1190961797.htm",69,"205");
navigation[74] = new navElem(74,"Weimarer Republik","pi1951131638.htm",69,"290");
navigation[75] = new navElem(75,"Nachschlagewerke","pi1206092950.htm",69,"250");
navigation[76] = new navElem(76,"1. Weltkrieg","pi1236854989.htm",69,"462");
navigation[77] = new navElem(77,"bis 1930","pi62788221.htm",69,"180");
navigation[78] = new navElem(78,"1930-1945","pi1531284986.htm",69,"185");
navigation[79] = new navElem(79,"DDR","pi1237480281.htm",69,"501");
navigation[80] = new navElem(80,"19. Jahrhundert","pi1697489860.htm",69,"609");
navigation[81] = new navElem(81,"ab 1945","pi-1521970957.htm",69,"190");
navigation[82] = new navElem(82,"Historische Tatsachen","pi-348529238.htm",1,"604");
navigation[83] = new navElem(83,"Kinderbücher","pi1295774015.htm",1,"608");
navigation[84] = new navElem(84,"Leckereien","pi398239700.htm",null,"601");
navigation[85] = new navElem(85,"Paketangebote","pi-1259297679.htm",null,"245");
navigation[86] = new navElem(86,"Tonträger","pi1082136982.htm",null,"01");
navigation[87] = new navElem(87,"Märsche und Lieder","pi-114500377.htm",86,"50");
navigation[88] = new navElem(88,"Liedermacher und Balladen","pi1132819155.htm",86,"135");
navigation[89] = new navElem(89,"historische Reden","pi303718044.htm",86,"55");
navigation[90] = new navElem(90,"Soldaten- und Fahrtenlieder","pi-856988514.htm",86,"140");
navigation[91] = new navElem(91,"Hörbücher","pi-1788551390.htm",null,"215");
navigation[92] = new navElem(92,"bis 1933","pi-2118925061.htm",91,"220");
navigation[93] = new navElem(93,"1933-1945","pi-413982176.htm",91,"225");
navigation[94] = new navElem(94,"II. Weltkrieg","pi1111867297.htm",91,"230");
navigation[95] = new navElem(95,"Persönlichkeiten","pi-743615154.htm",91,"235");
navigation[96] = new navElem(96,"ab 1945","pi-807543048.htm",91,"240");
navigation[97] = new navElem(97,"Lyrik und Prosa","pi-1444139799.htm",91,"500");
navigation[98] = new navElem(98,"9/11","pi-1382290362.htm",91,"464");
navigation[99] = new navElem(99,"Bekleidung","pi-711891214.htm",null,"24");
navigation[100] = new navElem(100,"Hosen","pi-1112048426.htm",99,"8");
navigation[101] = new navElem(101,"T-Hemden","pi10279363.htm",99,"7");
navigation[102] = new navElem(102,"Flaggen","pi1221442483.htm",null,"Flaggen");
navigation[103] = new navElem(103,"Kalender","pi-1626505561.htm",null,"9");
navigation[104] = new navElem(104,"Bierkrüge","pi-1137906904.htm",null,"10");
navigation[105] = new navElem(105,"Schmuck","pi-1191747468.htm",null,"11");
navigation[106] = new navElem(106,"Anstecker","pi-1349745525.htm",null,"25");
navigation[107] = new navElem(107,"Kunstdrucke / Wandbilder","pi-747446657.htm",null,"16");
navigation[108] = new navElem(108,"Militärische Motive","pi-1009306028.htm",107,"17");
navigation[109] = new navElem(109,"Mythologische Motive","pi1503225113.htm",107,"18");
navigation[110] = new navElem(110,"sonstige Motive","pi1939821314.htm",107,"19");
navigation[111] = new navElem(111,"Sluyterman-Holzschnitte","pi-361459939.htm",107,"20");
navigation[112] = new navElem(112,"Wandkarten","pi-2084370685.htm",107,"95");
navigation[113] = new navElem(113,"emaillierte Blechschilder","pi-236187913.htm",null,"26");
navigation[114] = new navElem(114,"Postkarten/Aufkleber","pi1347883226.htm",null,"21");
navigation[115] = new navElem(115,"Stempel","pi-1483901751.htm",null,"27");
navigation[116] = new navElem(116,"Filme","pi-20474729.htm",null,"29");
navigation[117] = new navElem(117,"Erster Weltkrieg","pi-363944527.htm",116,"280");
navigation[118] = new navElem(118,"Deutschland wie es einmal war","pi-2124853109.htm",116,"310");
navigation[119] = new navElem(119,"Persönlichkeiten","pi-1732370455.htm",116,"34");
navigation[120] = new navElem(120,"Obersalzberg","pi-1134336836.htm",116,"33");
navigation[121] = new navElem(121,"Geschichte","pi1092545602.htm",116,"32");
navigation[122] = new navElem(122,"III. Reich","pi286591133.htm",116,"31");
navigation[123] = new navElem(123,"Deutscher Osten","pi-1750489986.htm",116,"120");
navigation[124] = new navElem(124,"Kriege und Militaria","pi992830559.htm",116,"150");
navigation[125] = new navElem(125,"2. Weltkrieg","pi-1822188398.htm",124,"265");
navigation[126] = new navElem(126,"Marine/Seekrieg","pi-451295944.htm",124,"255");
navigation[127] = new navElem(127,"Luftkrieg","pi82552808.htm",124,"270");
navigation[128] = new navElem(128,"Heer","pi1331968947.htm",124,"451");
navigation[129] = new navElem(129,"Spezialeinheiten","pi-810828488.htm",124,"607");
navigation[130] = new navElem(130,"Ostfeldzug","pi-1292404540.htm",124,"260");
navigation[131] = new navElem(131,"Aktuelles Zeitgeschehen","pi-1435116943.htm",116,"590");
navigation[132] = new navElem(132,"Vertreibung","pi1627732051.htm",116,"600");
navigation[133] = new navElem(133,"Spiele","pi-133452034.htm",null,"463 ");

// 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"));


