//
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 += "Artikel auf Merkzettel:<strong>&nbsp;" + prdCount + "</strong><br>";
	prdString += "Zwischensumme:<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" border="0" align="absmiddle" hspace="0" vspace="0" class="catnav">' + "Zum Warenkorb</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\">Gesamtübersicht</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="11" height="1" height="1" alt="" border="0"></td>';
			};
		if(navItem.active) strHTML += '<td width="1%" class="ACTIVECATEGORY"><img src="assets/images/bullet.gif" width="11" 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="11" height="14" 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" 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,"Schnürkorsetts","pi-141020991.htm",null,"0001");
navigation[1] = new navElem(1,"Satin","pi41183447.htm",0,"0002");
navigation[2] = new navElem(2,"Brokat und mehr","pi733639713.htm",0,"0003");
navigation[3] = new navElem(3,"Lack","pi-1768491299.htm",0,"0005");
navigation[4] = new navElem(4,"Latex","pi1083437786.htm",0,"0007");
navigation[5] = new navElem(5,"Leder","pi984714323.htm",0,"0006");
navigation[6] = new navElem(6,"Nylons","pi81999545.htm",null,"5520");
navigation[7] = new navElem(7,"Strümpfe","pi-128825641.htm",6,"5520-1");
navigation[8] = new navElem(8,"Strumpfhosen","pi-799353722.htm",6,"5530");
navigation[9] = new navElem(9,"Bodies, Lingerie","pi1015688128.htm",null,"5500");
navigation[10] = new navElem(10,"Bodies & Catsuits","pi1046986639.htm",9,"5540");
navigation[11] = new navElem(11,"Netz Shirts & Kleider","pi-1741313738.htm",9,"5550");
navigation[12] = new navElem(12,"Lingerie","pi715301556.htm",9,"5227");
navigation[13] = new navElem(13,"Babydoll & Petticoat","pi-2028526044.htm",9,"5600");
navigation[14] = new navElem(14,"Handschuhe","pi-1962394472.htm",null,"5510");
navigation[15] = new navElem(15,"Zentai Catsuits","pi-433652028.htm",null,"2177");
navigation[16] = new navElem(16,"High Heels","pi-1875380397.htm",null,"5000");
navigation[17] = new navElem(17,"Pumps","pi-230889593.htm",16,"5200");
navigation[18] = new navElem(18,"Sandalen & Slipper","pi1015770158.htm",16,"5300");
navigation[19] = new navElem(19,"Stiefeletten","pi934465374.htm",16,"5140");
navigation[20] = new navElem(20,"Knielange Stiefel","pi1159527409.htm",16,"5120");
navigation[21] = new navElem(21,"Overknees","pi258265520.htm",16,"5100");
navigation[22] = new navElem(22,"Ballerinas & Extremes","pi-1926014953.htm",16,"5400");
navigation[23] = new navElem(23,"Perücken","pi620442231.htm",null,"7000");
navigation[24] = new navElem(24,"Langhaar","pi714239745.htm",23,"7010");
navigation[25] = new navElem(25,"Mittellang, glatt","pi1114231063.htm",23,"7030");
navigation[26] = new navElem(26,"Mittellang, gelockt","pi-785093876.htm",23,"7040");
navigation[27] = new navElem(27,"Kurzhaar","pi1701026077.htm",23,"7060");
navigation[28] = new navElem(28,"Trendy & farbig","pi-461559335.htm",23,"7250");
navigation[29] = new navElem(29,"Party & Fasching","pi1031136154.htm",23,"7252");
navigation[30] = new navElem(30,"Zubehör","pi1031175013.htm",23,"7255");
navigation[31] = new navElem(31,"Dark Romantic","pi516868449.htm",null,"8000");
navigation[32] = new navElem(32,"Tops","pi-1006491404.htm",31,"8010");
navigation[33] = new navElem(33,"Röcke","pi-567514395.htm",31,"8020");
navigation[34] = new navElem(34,"Kleider","pi-166164414.htm",31,"8030");
navigation[35] = new navElem(35,"Capes & Mäntel","pi-1824833637.htm",31,"8040");
navigation[36] = new navElem(36,"Accessoires","pi1011839040.htm",31,"8100");
navigation[37] = new navElem(37,"Herren","pi-1691154251.htm",31,"8050");
navigation[38] = new navElem(38,"Wetlook Cire Laque","pi-2072176545.htm",null,"2182");
navigation[39] = new navElem(39,"Catsuits","pi-1867186528.htm",38,"2182-7");
navigation[40] = new navElem(40,"BHs & Tops","pi-140645133.htm",38,"2182-1");
navigation[41] = new navElem(41,"Kleider","pi660928696.htm",38,"2182-2");
navigation[42] = new navElem(42,"Strings, Shorts & Hosen","pi1360910748.htm",38,"2182-4");
navigation[43] = new navElem(43,"Röcke","pi-145990501.htm",38,"2182-5");
navigation[44] = new navElem(44,"Accessoires","pi442000325.htm",38,"2182-6");
navigation[45] = new navElem(45,"Herren","pi976554073.htm",38,"2182-3");
navigation[46] = new navElem(46,"Glänzende Mode","pi-1555498889.htm",null,"2172");
navigation[47] = new navElem(47,"Lack Mode","pi1015687904.htm",46,"2000");
navigation[48] = new navElem(48,"Tops & Corsagen","pi1016372871.htm",47,"2100");
navigation[49] = new navElem(49,"BHs & Slips","pi1537890042.htm",47,"2440");
navigation[50] = new navElem(50,"Röcke","pi1800218556.htm",47,"2150");
navigation[51] = new navElem(51,"Hosen & Pants","pi-1812583544.htm",47,"2450");
navigation[52] = new navElem(52,"Kurze Kleider","pi1900209165.htm",47,"2200");
navigation[53] = new navElem(53,"Lange Kleider","pi-2082094006.htm",47,"2300");
navigation[54] = new navElem(54,"Catsuits & Bodies","pi-1103233789.htm",47,"2400");
navigation[55] = new navElem(55,"Jacken & Mäntel","pi1409132073.htm",47,"2170");
navigation[56] = new navElem(56,"Lack Rollenspiel","pi1016373117.htm",47,"2370");
navigation[57] = new navElem(57,"Handschuhe & Co.","pi-2056559702.htm",47,"2128");
navigation[58] = new navElem(58,"Accessoires","pi2030989841.htm",47,"2900");
navigation[59] = new navElem(59,"Bettwäsche","pi1037384519.htm",47,"2174");
navigation[60] = new navElem(60,"Für den Herren","pi-198404320.htm",47,"99992");
navigation[61] = new navElem(61,"Latex Mode","pi-1317893086.htm",46,"0999");
navigation[62] = new navElem(62,"Damen Mode","pi694036957.htm",61,"1000");
navigation[63] = new navElem(63,"Catsuits","pi1017677179.htm",62,"1020");
navigation[64] = new navElem(64,"Korsetts","pi1018163573.htm",62,"1047");
navigation[65] = new navElem(65,"Tops","pi1017919831.htm",62,"1040");
navigation[66] = new navElem(66,"Kleider","pi-1422261517.htm",62,"0110");
navigation[67] = new navElem(67,"Röcke","pi1229715616.htm",62,"1030");
navigation[68] = new navElem(68,"Bodies","pi-22292878.htm",62,"1140");
navigation[69] = new navElem(69,"BHs & Slips","pi-957579307.htm",62,"1130");
navigation[70] = new navElem(70,"Hosen & Leggins","pi1845989383.htm",62,"1045");
navigation[71] = new navElem(71,"Jacken & Mäntel","pi1120996152.htm",62,"1042");
navigation[72] = new navElem(72,"Handschuhe & Strümpfe","pi189086557.htm",62,"1110");
navigation[73] = new navElem(73,"Designer Masken","pi1217019468.htm",62,"1090");
navigation[74] = new navElem(74,"Rund um den Hals","pi-1115942822.htm",62,"1120");
navigation[75] = new navElem(75,"Herren Mode","pi1060860449.htm",61,"1400");
navigation[76] = new navElem(76,"Catsuits","pi691844558.htm",75,"1410");
navigation[77] = new navElem(77,"Tops","pi-1199371977.htm",75,"1420");
navigation[78] = new navElem(78,"Hosen","pi-1542453076.htm",75,"1430");
navigation[79] = new navElem(79,"Slips & Shorts","pi-1216786758.htm",75,"1440");
navigation[80] = new navElem(80,"Jacken & Mäntel","pi1673558904.htm",75,"1450");
navigation[81] = new navElem(81,"Masken","pi-1389969198.htm",75,"1460");
navigation[82] = new navElem(82,"Handschuhe & Strümpfe","pi-611544853.htm",75,"1470");
navigation[83] = new navElem(83,"Basics","pi1015416826.htm",61,"0100");
navigation[84] = new navElem(84,"Handschuhe","pi1038255028.htm",83,"0911");
navigation[85] = new navElem(85,"Socken, Strümpfe","pi-191452891.htm",83,"0911-2");
navigation[86] = new navElem(86,"Plug & Play","pi157228555.htm",83,"1200");
navigation[87] = new navElem(87,"Damen Slips","pi-354924366.htm",83,"0920");
navigation[88] = new navElem(88,"Herren Slips","pi-875252917.htm",83,"0930");
navigation[89] = new navElem(89,"Basic Kleidung","pi1018941412.htm",83,"0910");
navigation[90] = new navElem(90,"Masken & Hauben","pi-288726251.htm",83,"0915");
navigation[91] = new navElem(91,"Aufblasmasken","pi-1992759760.htm",90,"0917");
navigation[92] = new navElem(92,"Gasmasken","pi1030443296.htm",90,"0916");
navigation[93] = new navElem(93,"Gummi BDSM","pi1950317305.htm",83,"0907");
navigation[94] = new navElem(94,"Meterware","pi1018853848.htm",83,"0905");
navigation[95] = new navElem(95,"Latex Bettwäsche","pi655347405.htm",83,"0906");
navigation[96] = new navElem(96,"Pflegemittel","pi-2126158709.htm",61,"0904");
navigation[97] = new navElem(97,"Specials","pi-674718592.htm",61,"0900");
navigation[98] = new navElem(98,"Stiefel","pi-1620660033.htm",61,"0627");
navigation[99] = new navElem(99,"Leder Mode","pi-982914598.htm",46,"4273");
navigation[100] = new navElem(100,"Corsagen & Korsetts","pi-1798591215.htm",99,"0470");
navigation[101] = new navElem(101,"BHs & Tops","pi-729107970.htm",99,"0480");
navigation[102] = new navElem(102,"Slips und Strapse","pi1015583492.htm",99,"0420");
navigation[103] = new navElem(103,"Röcke & Hosen","pi85422005.htm",99,"0430");
navigation[104] = new navElem(104,"Leder Kleider","pi398147794.htm",99,"0450");
navigation[105] = new navElem(105,"Harnesse & Co","pi-1906420525.htm",99,"0495");
navigation[106] = new navElem(106,"Handschuhe","pi-514258792.htm",99,"0477");
navigation[107] = new navElem(107,"Accessoires","pi1951472464.htm",99,"0460");
navigation[108] = new navElem(108,"Glamour Outfits","pi1043310809.htm",46,"2173");
navigation[109] = new navElem(109,"Sexy Costumes","pi1967361178.htm",46,"2184");
navigation[110] = new navElem(110,"Accessoires","pi-1170290452.htm",null,"6500");
navigation[111] = new navElem(111,"Flutsch & Glitsch","pi-1215056691.htm",110,"9318");
navigation[112] = new navElem(112,"Wimpern & Nägel","pi519212757.htm",110,"6610");
navigation[113] = new navElem(113,"Vampirzähne ","pi-219017065.htm",110,"6520");
navigation[114] = new navElem(114,"Masken","pi-663933283.htm",110,"6500-1");
navigation[115] = new navElem(115,"Female Masks","pi-2041199964.htm",114,"6701");
navigation[116] = new navElem(116,"Halloween Masks","pi1378862347.htm",114,"6702");
navigation[117] = new navElem(117,"Faschings Kostüme","pi1236534706.htm",110,"6622");
navigation[118] = new navElem(118,"Kostüm Accessoires","pi2126614142.htm",110,"6890");
navigation[119] = new navElem(119,"Masken","pi-1250354865.htm",118,"6890-1");
navigation[120] = new navElem(120,"Engel & Teufel","pi220929551.htm",118,"6510");
navigation[121] = new navElem(121,"Character-Brillen","pi-1849662344.htm",118,"6532");
navigation[122] = new navElem(122,"Hüte & Co.","pi540137162.htm",118,"6890-2");
navigation[123] = new navElem(123,"BDSM Play","pi1825437678.htm",null,"6501");
navigation[124] = new navElem(124,"Fesseln & Fixieren","pi-1998068285.htm",123,"6504");
navigation[125] = new navElem(125,"Knebel","pi-1338206047.htm",124,"6604");
navigation[126] = new navElem(126,"Hals","pi-2083289078.htm",124,"6502");
navigation[127] = new navElem(127,"Arme & Hände","pi1988375280.htm",124,"6504-2");
navigation[128] = new navElem(128,"Beine & Füße","pi-1493134287.htm",124,"6504-3");
navigation[129] = new navElem(129,"Sets","pi-1216474466.htm",124,"6504-4");
navigation[130] = new navElem(130,"Sonstiges","pi-1755104825.htm",124,"6504-5");
navigation[131] = new navElem(131,"Keuschheitskontrolle","pi1013509545.htm",123,"6508");
navigation[132] = new navElem(132,"Spielkleidung","pi-884217388.htm",123,"6600");
navigation[133] = new navElem(133,"Plug & Play","pi-1022806533.htm",123,"6601");
navigation[134] = new navElem(134,"Kopfharnesse","pi1257280840.htm",133,"6506");
navigation[135] = new navElem(135,"Dildos, Harnesse","pi2040683298.htm",133,"3340");
navigation[136] = new navElem(136,"Plugs","pi1452538068.htm",133,"3360");
navigation[137] = new navElem(137,"Technical Toys","pi-388289838.htm",133,"3040");
navigation[138] = new navElem(138,"Cock & Ball Toys","pi-1239364113.htm",123,"3020");
navigation[139] = new navElem(139,"Wasserspiele","pi1725824800.htm",123,"6602");
navigation[140] = new navElem(140,"Ponyplay","pi789019214.htm",123,"6607");
navigation[141] = new navElem(141,"Masken","pi-1984785481.htm",123,"6609");
navigation[142] = new navElem(142,"Schlagzeuge","pi1071276332.htm",123,"6612");
navigation[143] = new navElem(143,"Flogger","pi1102756607.htm",142,"3370");
navigation[144] = new navElem(144,"Gerten","pi982594885.htm",142,"3350");
navigation[145] = new navElem(145,"Stöcke","pi1480392224.htm",142,"3320");
navigation[146] = new navElem(146,"Peitschen","pi923364257.htm",142,"3310");
navigation[147] = new navElem(147,"Paddel, Klatschen","pi-571830021.htm",142,"3330");
navigation[148] = new navElem(148,"Metall","pi-1482136699.htm",123,"6616");
navigation[149] = new navElem(149,"Medizin","pi2128730935.htm",123,"2515");
navigation[150] = new navElem(150,"Klammern & Gewichte","pi-1452720030.htm",123,"6618");
navigation[151] = new navElem(151,"Bücher & Magazine","pi1030652252.htm",null,"4100");
navigation[152] = new navElem(152,"Magazine","pi1038134004.htm",151,"4120");
navigation[153] = new navElem(153,"Fachbücher","pi94936849.htm",151,"4130");
navigation[154] = new navElem(154,"Bücher-Stories","pi-1395835906.htm",151,"4140");
navigation[155] = new navElem(155,"Bücher-Bilder","pi1299824551.htm",151,"4150");
navigation[156] = new navElem(156,"Hörbücher","pi-413746596.htm",151,"4170");

// 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"));


