//
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="13" height="10" 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="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="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="10" 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="10" 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="10" 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,"Latex Mode Damen","pi694036957.htm",null,"1000");
navigation[1] = new navElem(1,"Catsuits","pi1017677179.htm",0,"1020");
navigation[2] = new navElem(2,"Kleider","pi-1422261517.htm",0,"0110");
navigation[3] = new navElem(3,"Kurze Kleider","pi-734900551.htm",2,"0110-1");
navigation[4] = new navElem(4,"Lange Kleider","pi1355943046.htm",2,"0110-2");
navigation[5] = new navElem(5,"Tops","pi1017919831.htm",0,"1040");
navigation[6] = new navElem(6,"Corsagen & Korsetts","pi1018163573.htm",0,"1047");
navigation[7] = new navElem(7,"BHs & Slips","pi-957579307.htm",0,"1130");
navigation[8] = new navElem(8,"Slips ohne Innenleben","pi-1247209869.htm",7,"1130-1");
navigation[9] = new navElem(9,"Slips mit Innenleben","pi1256640963.htm",7,"1135");
navigation[10] = new navElem(10,"Bodies","pi-22292878.htm",0,"1140");
navigation[11] = new navElem(11,"Röcke","pi1229715616.htm",0,"1030");
navigation[12] = new navElem(12,"kurze Röcke","pi-1888185848.htm",11,"1030-1");
navigation[13] = new navElem(13,"lange Röcke","pi1286658921.htm",11,"1030-2");
navigation[14] = new navElem(14,"Hosen & Leggins","pi1845989383.htm",0,"1045");
navigation[15] = new navElem(15,"Jacken & Mäntel","pi1120996152.htm",0,"1042");
navigation[16] = new navElem(16,"Handschuhe & Strümpfe","pi189086557.htm",0,"1110");
navigation[17] = new navElem(17,"Masken","pi1217019468.htm",0,"1090");
navigation[18] = new navElem(18,"Für den Hals","pi-1115942822.htm",0,"1120");
navigation[19] = new navElem(19,"Fantasy Outfits","pi-120573951.htm",0,"1300");
navigation[20] = new navElem(20,"Latex Mode Herren","pi1060860449.htm",null,"1400");
navigation[21] = new navElem(21,"Catsuits","pi691844558.htm",20,"1410");
navigation[22] = new navElem(22,"Tops","pi-1199371977.htm",20,"1420");
navigation[23] = new navElem(23,"Slips & Shorts","pi-1216786758.htm",20,"1440");
navigation[24] = new navElem(24," .. mit Innenleben","pi-913444173.htm",23,"1445");
navigation[25] = new navElem(25,"Hosen & Röcke","pi-1542453076.htm",20,"1430");
navigation[26] = new navElem(26,"Jacken & Mäntel","pi1673558904.htm",20,"1450");
navigation[27] = new navElem(27,"Masken","pi-1389969198.htm",20,"1460");
navigation[28] = new navElem(28,"Handschuhe & Strümpfe","pi-612708154.htm",20,"1475");
navigation[29] = new navElem(29,"Latex Stiefel","pi-1620660033.htm",null,"0627");
navigation[30] = new navElem(30,"Latex Basics","pi1015416826.htm",null,"0100");
navigation[31] = new navElem(31,"Bettwäsche","pi655347405.htm",30,"0906");
navigation[32] = new navElem(32,"Handschuhe","pi1038255028.htm",30,"0911");
navigation[33] = new navElem(33,"Strümpfe","pi168684936.htm",30,"0101");
navigation[34] = new navElem(34,"Basic Kleidung","pi1018941412.htm",30,"0910");
navigation[35] = new navElem(35,"Specials","pi-674718592.htm",30,"0900");
navigation[36] = new navElem(36,"Meterware","pi1018853848.htm",30,"0905");
navigation[37] = new navElem(37,"Latex Masken & Hauben","pi-288726251.htm",null,"0915");
navigation[38] = new navElem(38,"mit Haaren","pi837671190.htm",37,"0918");
navigation[39] = new navElem(39,"mit Toys","pi-816255777.htm",37,"0919");
navigation[40] = new navElem(40,"Gasmasken","pi1030443296.htm",37,"0916");
navigation[41] = new navElem(41,"Aufblasmasken","pi-1992759760.htm",37,"0917");
navigation[42] = new navElem(42,"Female Masks","pi-2041199964.htm",37,"6701");
navigation[43] = new navElem(43,"Latex Plug & Play","pi157228555.htm",null,"1200");
navigation[44] = new navElem(44,"Dildos","pi1216320639.htm",43,"1201");
navigation[45] = new navElem(45,"Plugs","pi-459130927.htm",43,"1206");
navigation[46] = new navElem(46,"Knebel & Gags","pi-1074003333.htm",43,"1204");
navigation[47] = new navElem(47,"Penis- & Hodenhüllen","pi-1589186144.htm",43,"1205");
navigation[48] = new navElem(48,"aufblasbar","pi-23614779.htm",43,"1202");
navigation[49] = new navElem(49,"mit Vibration","pi-1672084830.htm",43,"1203");
navigation[50] = new navElem(50,"zum Umschnallen","pi-1914071618.htm",43,"1207");
navigation[51] = new navElem(51,"Do-It-Yourselfe","pi-196550029.htm",43,"1208");
navigation[52] = new navElem(52,"Sonstiges","pi1443666543.htm",43,"1209");
navigation[53] = new navElem(53,"BDSM Play","pi1825437678.htm",null,"6501");
navigation[54] = new navElem(54,"Knebel","pi-1338206047.htm",53,"6604");
navigation[55] = new navElem(55,"Aufblasbar","pi-159069142.htm",54,"6604-1");
navigation[56] = new navElem(56,"mit Toys","pi1564843875.htm",54,"6604-2");
navigation[57] = new navElem(57,"Metall","pi-4226417.htm",54,"6604-3");
navigation[58] = new navElem(58,"Fesseln & Fixieren","pi-1998068285.htm",53,"6504");
navigation[59] = new navElem(59,"Hals","pi-2083289078.htm",58,"6504-1");
navigation[60] = new navElem(60,"Arme & Hände","pi498635569.htm",58,"6504-2");
navigation[61] = new navElem(61,"Beine & Füße","pi-1527781986.htm",58,"6504-3");
navigation[62] = new navElem(62,"Sets","pi1475825863.htm",58,"6504-4");
navigation[63] = new navElem(63,"Seile & Tape","pi936115452.htm",58,"6504-5");
navigation[64] = new navElem(64,"Hängefesseln","pi-481411059.htm",58,"6504-7");
navigation[65] = new navElem(65,"Sonstiges","pi1658264164.htm",58,"6504-6");
navigation[66] = new navElem(66,"Klammern & Gewichte","pi-1452720030.htm",53,"6618");
navigation[67] = new navElem(67,"Klammern","pi-1793488869.htm",66,"6618-1");
navigation[68] = new navElem(68,"Gewichte","pi-444256576.htm",66,"6618-2");
navigation[69] = new navElem(69,"Medizin","pi2128730935.htm",53,"2515");
navigation[70] = new navElem(70,"Schlagzeuge","pi1071276332.htm",53,"6612");
navigation[71] = new navElem(71,"Flogger","pi1102756607.htm",70,"3370");
navigation[72] = new navElem(72,"Gerten","pi982594885.htm",70,"3350");
navigation[73] = new navElem(73,"Paddel","pi-571830021.htm",70,"3330");
navigation[74] = new navElem(74,"Klatschen","pi888084397.htm",70,"6612-5");
navigation[75] = new navElem(75,"Peitschen","pi923364257.htm",70,"3310");
navigation[76] = new navElem(76,"Stöcke","pi1737267050.htm",70,"6612-1");
navigation[77] = new navElem(77,"Masken","pi-1984785481.htm",53,"6609");
navigation[78] = new navElem(78,"Augen","pi363412716.htm",77,"6609-1");
navigation[79] = new navElem(79,"Pony Play","pi789019214.htm",53,"6607");
navigation[80] = new navElem(80,"Wasserspiele","pi1725824800.htm",53,"6602");
navigation[81] = new navElem(81,"Cock & Ball Toys","pi-1239364113.htm",53,"3020");
navigation[82] = new navElem(82,"Keuschheitskontrolle","pi1013509545.htm",53,"6508");
navigation[83] = new navElem(83,"Kopfharnesse","pi1257280840.htm",53,"6506");
navigation[84] = new navElem(84,"Specials","pi1157272741.htm",53,"10001");
navigation[85] = new navElem(85,"Pflege- & Gleitmittel","pi-1215056691.htm",null,"9318");
navigation[86] = new navElem(86,"Pflegemittel","pi-2126158709.htm",85,"0904");
navigation[87] = new navElem(87,"Gleitmittel","pi1060597733.htm",85,"0904-2");
navigation[88] = new navElem(88,"Non Latex Goodies","pi1015688128.htm",null,"5500");
navigation[89] = new navElem(89,"Catsuits","pi-433652028.htm",88,"2177");
navigation[90] = new navElem(90,"Bodies","pi1046986639.htm",88,"5540");
navigation[91] = new navElem(91,"Strumpfhosen","pi-799353722.htm",88,"5530");
navigation[92] = new navElem(92,"Strümpfe & Strapsen","pi81999545.htm",88,"5520");
navigation[93] = new navElem(93,"Netz Shirts & Kleider","pi-1741313738.htm",88,"5550");
navigation[94] = new navElem(94,"Handschuhe","pi-1962394472.htm",88,"5510");
navigation[95] = new navElem(95,"Literatur: Magazine & Bücher","pi1030652252.htm",null,"4100");
navigation[96] = new navElem(96,"Magazine","pi1038134004.htm",95,"4120");
navigation[97] = new navElem(97,"Fachbücher","pi94936849.htm",95,"4130");
navigation[98] = new navElem(98,"Bücher-Stories","pi-1395835906.htm",95,"4140");

// 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"));


