//
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,"Bizarre Masken","pi1217019468.htm",null,"1090");
navigation[1] = new navElem(1,"Gasmasken","pi1030443296.htm",0,"0916");
navigation[2] = new navElem(2,"Aufblasmasken","pi-1992759760.htm",0,"0917");
navigation[3] = new navElem(3,"Atemreduktion","pi1122898201.htm",0,"1091");
navigation[4] = new navElem(4,"Knebelmasken","pi188875780.htm",0,"1094");
navigation[5] = new navElem(5,"Basics","pi-288726251.htm",0,"0915");
navigation[6] = new navElem(6,"Gesichtsoffene Hauben","pi582301163.htm",0,"1078");
navigation[7] = new navElem(7,"Dekorative Masken","pi813004646.htm",0,"1092");
navigation[8] = new navElem(8,"Masken mit Haarohr","pi926305461.htm",0,"1096");
navigation[9] = new navElem(9,"Latex Helme","pi1768661231.htm",0,"1093");
navigation[10] = new navElem(10,"Gummi Ladies","pi694036957.htm",null,"1000");
navigation[11] = new navElem(11,"Latex Catsuits","pi1017677179.htm",10,"1020");
navigation[12] = new navElem(12,"Latexkleider","pi-1422261517.htm",10,"0110");
navigation[13] = new navElem(13,"Latex Tops","pi1017919831.htm",10,"1040");
navigation[14] = new navElem(14,"Latex Korsetts","pi1018163573.htm",10,"1047");
navigation[15] = new navElem(15,"Latex BHs & Slips","pi-957579307.htm",10,"1130");
navigation[16] = new navElem(16,"Basic Fashion für Sie","pi-354924366.htm",10,"0920");
navigation[17] = new navElem(17,".. mit Innenleben","pi703884650.htm",16,"0921");
navigation[18] = new navElem(18,"Latex Bodies","pi-22292878.htm",10,"1140");
navigation[19] = new navElem(19,"Latex Röcke","pi1229715616.htm",10,"1030");
navigation[20] = new navElem(20,"Latex Hosen & Leggins","pi1845989383.htm",10,"1045");
navigation[21] = new navElem(21,"Latex Jacken & Mäntel","pi1120996152.htm",10,"1042");
navigation[22] = new navElem(22,"Latex Halsbänder","pi-1115942822.htm",10,"1120");
navigation[23] = new navElem(23,"Gummi Men","pi1060860449.htm",null,"1400");
navigation[24] = new navElem(24,"Latex Mäntel & Jacken","pi1673558904.htm",23,"1450");
navigation[25] = new navElem(25,"Latex Herrenslips","pi-1216786758.htm",23,"1440");
navigation[26] = new navElem(26," .. mit Innenleben","pi-913444173.htm",25,"1445");
navigation[27] = new navElem(27,"Basic Slips für Ihn","pi-875252917.htm",23,"0930");
navigation[28] = new navElem(28,".. mit Innenleben","pi-1027311709.htm",27,"0931");
navigation[29] = new navElem(29,"Latex Herrenhosen","pi-1542453076.htm",23,"1430");
navigation[30] = new navElem(30,"Latex Herrentops","pi-1199371977.htm",23,"1420");
navigation[31] = new navElem(31,"Latex Herrencatsuits","pi691844558.htm",23,"1410");
navigation[32] = new navElem(32,"Essential Collection","pi228331069.htm",23,"1405");
navigation[33] = new navElem(33,"Gummilabor","pi1015416826.htm",null,"0100");
navigation[34] = new navElem(34,"Latex Dildos & Co","pi157228555.htm",33,"1200");
navigation[35] = new navElem(35,"Aufblasspielzeuge","pi1019541495.htm",33,"0101");
navigation[36] = new navElem(36,"Analplugs massiv","pi271024236.htm",33,"0102");
navigation[37] = new navElem(37,"Vibirerendes..","pi-2009774042.htm",33,"0111");
navigation[38] = new navElem(38,"Wasserspiele","pi-1682976081.htm",33,"0112");
navigation[39] = new navElem(39,"Knebel und Augenbinden","pi-705609020.htm",33,"0113");
navigation[40] = new navElem(40,"Latex Penishüllen","pi1397922557.htm",33,"0103");
navigation[41] = new navElem(41,"Vakuumbetten","pi578964851.htm",33,"0108");
navigation[42] = new navElem(42,"Latex Säcke","pi1795460218.htm",33,"0107");
navigation[43] = new navElem(43,"Latex Specials","pi-674718592.htm",33,"0900");
navigation[44] = new navElem(44,"Haltungstrainer","pi-2143490248.htm",33,"0109");
navigation[45] = new navElem(45,"Liquid Latex & Tape","pi1950317305.htm",33,"0907");
navigation[46] = new navElem(46,"Für Bizarre Geschöpfe","pi1999659089.htm",null,"9987");
navigation[47] = new navElem(47,"Latex Fantasy Outfits","pi-120573951.htm",46,"1300");
navigation[48] = new navElem(48,"Latex Puppen","pi-678739929.htm",46,"6995");
navigation[49] = new navElem(49,"Female Masks","pi-2041199964.htm",46,"6701");
navigation[50] = new navElem(50,"Perücken","pi620442231.htm",49,"7000");
navigation[51] = new navElem(51,"Wimpern & Nägel","pi519212757.htm",50,"6610");
navigation[52] = new navElem(52,"Langhaar","pi714239745.htm",50,"7010");
navigation[53] = new navElem(53,"Mittellang gewellt","pi-2034734802.htm",50,"7020");
navigation[54] = new navElem(54,"Mittellang glatt","pi1114231063.htm",50,"7030");
navigation[55] = new navElem(55,"Mittellang lockig","pi-785093876.htm",50,"7040");
navigation[56] = new navElem(56,"Kurz","pi1701026077.htm",50,"7060");
navigation[57] = new navElem(57,"Trendy & farbig","pi-461559335.htm",50,"7250");
navigation[58] = new navElem(58,"Party & Fasching","pi1031136154.htm",50,"7252");
navigation[59] = new navElem(59,"Perücken Zubehör","pi1031175013.htm",50,"7255");
navigation[60] = new navElem(60,"Ballarinas & Extremes","pi-1926014953.htm",46,"5400");
navigation[61] = new navElem(61,"Handschuhe & Strümpfe","pi1038255028.htm",null,"0911");
navigation[62] = new navElem(62,"Handschuhe","pi1122992946.htm",61,"0912");
navigation[63] = new navElem(63,"Armstulpen","pi1362928816.htm",61,"0914");
navigation[64] = new navElem(64,"Strümpfe","pi-116861305.htm",61,"0937");
navigation[65] = new navElem(65,"Strumpfhosen","pi1752390286.htm",61,"0938");
navigation[66] = new navElem(66,"Latexstiefel","pi-1620660033.htm",null,"0627");
navigation[67] = new navElem(67,"Meterware","pi1018853848.htm",null,"0905");
navigation[68] = new navElem(68,"Latex Bettwäsche","pi655347405.htm",null,"0906");
navigation[69] = new navElem(69,"Pflege & Gleitmittel","pi-2126158709.htm",null,"0904");
navigation[70] = new navElem(70,"Play & Bondage","pi1825437678.htm",null,"6501");
navigation[71] = new navElem(71,"Halsbänder","pi-2083289078.htm",70,"6502");
navigation[72] = new navElem(72,"Fesseln & Fixieren","pi-1998068285.htm",70,"6504");
navigation[73] = new navElem(73,"Kopfharnesse","pi1257280840.htm",70,"6506");
navigation[74] = new navElem(74,"Keuschheitskontrolle","pi1013509545.htm",70,"6508");
navigation[75] = new navElem(75,"Spielkleidung","pi-884217388.htm",70,"6600");
navigation[76] = new navElem(76,"Plug & Play","pi-1022806533.htm",70,"6601");
navigation[77] = new navElem(77,"Wasserspiele","pi1725824800.htm",70,"6602");
navigation[78] = new navElem(78,"Knebel","pi-1338206047.htm",70,"6604");
navigation[79] = new navElem(79,"Ponyplay","pi789019214.htm",70,"6607");
navigation[80] = new navElem(80,"Masken","pi-1984785481.htm",70,"6609");
navigation[81] = new navElem(81,"Schlagzeuge","pi1071276332.htm",70,"6612");
navigation[82] = new navElem(82,"Flogger","pi1102756607.htm",81,"3370");
navigation[83] = new navElem(83,"Gerten","pi982594885.htm",81,"3350");
navigation[84] = new navElem(84,"Paddel, Riemen, Klatschen","pi-571830021.htm",81,"3330");
navigation[85] = new navElem(85,"Schlag- und Rohrstöcke","pi1480392224.htm",81,"3320");
navigation[86] = new navElem(86,"Peitschen","pi923364257.htm",81,"3310");
navigation[87] = new navElem(87,"Elektro","pi33752533.htm",70,"3000");
navigation[88] = new navElem(88,"Elektrostimulationsgeräte","pi-1008699290.htm",87,"3010");
navigation[89] = new navElem(89,"Elektroden zweipolig","pi318980533.htm",87,"3030");
navigation[90] = new navElem(90,"Metall","pi-1482136699.htm",70,"6616");
navigation[91] = new navElem(91,"Klammern & Gewichte","pi-1452720030.htm",70,"6618");
navigation[92] = new navElem(92,"Spandex & Nylon","pi1015688128.htm",null,"5500");
navigation[93] = new navElem(93,"Spandex","pi1152253615.htm",92,"2175");
navigation[94] = new navElem(94,"Zentai Catsuits","pi-433652028.htm",92,"2177");
navigation[95] = new navElem(95,"Strümpfe","pi81999545.htm",92,"5520");
navigation[96] = new navElem(96,"Strumpfhosen","pi-799353722.htm",92,"5530");
navigation[97] = new navElem(97,"Bodies","pi1046986639.htm",92,"5540");
navigation[98] = new navElem(98,"Netz Shirts & Kleider","pi-1741313738.htm",92,"5550");
navigation[99] = new navElem(99,"Glamourhandschuhe","pi-1962394472.htm",92,"5510");
navigation[100] = new navElem(100,"Kataloge, Magazine & Bücher","pi1030652252.htm",null,"4100");
navigation[101] = new navElem(101,"Unsere Kataloge","pi1205776931.htm",100,"4110");
navigation[102] = new navElem(102,"Fetischmagazine","pi1038134004.htm",100,"4120");
navigation[103] = new navElem(103,"Fachbücher","pi94936849.htm",100,"4130");

// 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"));

