//
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="11" 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="13" 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="13" 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="13" 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,"Sonderangebote !!!&nbsp(3)","pi122621250.htm",null,"00");
navigation[1] = new navElem(1,"TOP-TEN von März - Mai&nbsp(10)","pi1078911825.htm",null,"01");
navigation[2] = new navElem(2,"Neuheiten (Videos)&nbsp(11)","pi2039580175.htm",null,"1");
navigation[3] = new navElem(3,"Neuheiten (Spielzeuge & Co)&nbsp(7)","pi481648562.htm",null,"100011");
navigation[4] = new navElem(4,"Stahl &nbsp(2)","pi1149947161.htm",null,"102000");
navigation[5] = new navElem(5,"Videos","pi-1156337944.htm",null,"11000");
navigation[6] = new navElem(6,"Amateur Bondage","pi-1711779646.htm",5,"1000");
navigation[7] = new navElem(7,"001 - 009&nbsp(9)","pi1881280726.htm",6,"1001");
navigation[8] = new navElem(8,"010 - 019&nbsp(9)","pi-1518447387.htm",6,"1002");
navigation[9] = new navElem(9,"020 - 029&nbsp(10)","pi398109250.htm",6,"1003");
navigation[10] = new navElem(10,"030 - 039&nbsp(10)","pi-1488504421.htm",6,"1004");
navigation[11] = new navElem(11,"040 - 049&nbsp(10)","pi84304448.htm",6,"1005");
navigation[12] = new navElem(12,"050 - 059&nbsp(6)","pi-295385791.htm",6,"1006");
navigation[13] = new navElem(13,"060 - 069&nbsp(10)","pi-732622505.htm",6,"1007");
navigation[14] = new navElem(14,"070 - 079&nbsp(10)","pi-1418079395.htm",6,"1008");
navigation[15] = new navElem(15,"080 - 089&nbsp(11)","pi1051521144.htm",6,"1009");
navigation[16] = new navElem(16,"090 - 099&nbsp(10)","pi1721162521.htm",6,"10091");
navigation[17] = new navElem(17,"100 - 109&nbsp(13)","pi-662158683.htm",6,"10092");
navigation[18] = new navElem(18,"110 - 119&nbsp(10)","pi2021060331.htm",6,"10093");
navigation[19] = new navElem(19,"120 - 129&nbsp(10)","pi405615071.htm",6,"10094");
navigation[20] = new navElem(20,"130 - 139&nbsp(10)","pi1102095444.htm",6,"10095");
navigation[21] = new navElem(21,"140 - 149&nbsp(10)","pi-1051106841.htm",6,"10096");
navigation[22] = new navElem(22,"150 - 159&nbsp(10)","pi1124293606.htm",6,"10097");
navigation[23] = new navElem(23,"160 - 169&nbsp(10)","pi1137250426.htm",6,"10098");
navigation[24] = new navElem(24,"170 - 179&nbsp(10)","pi1150726149.htm",6,"10099");
navigation[25] = new navElem(25,"180 - 189&nbsp(10)","pi1161779046.htm",6,"10100");
navigation[26] = new navElem(26,"190 - 199&nbsp(10)","pi1169909374.htm",6,"10101");
navigation[27] = new navElem(27,"200 - 209&nbsp(10)","pi1179150734.htm",6,"10102");
navigation[28] = new navElem(28,"210 - 219&nbsp(10)","pi288862750.htm",6,"10103");
navigation[29] = new navElem(29,"220 - 229&nbsp(10)","pi618391060.htm",6,"10104");
navigation[30] = new navElem(30,"230 - 239&nbsp(10)","pi1205087570.htm",6,"10105");
navigation[31] = new navElem(31,"240 - 249&nbsp(10)","pi1213467255.htm",6,"10106");
navigation[32] = new navElem(32,"250 - 259&nbsp(10)","pi1222974104.htm",6,"10107");
navigation[33] = new navElem(33,"260 - 269&nbsp(10)","pi1235204545.htm",6,"10108");
navigation[34] = new navElem(34,"270 - 279&nbsp(10)","pi1217255275.htm",6,"10109");
navigation[35] = new navElem(35,"280 - 289&nbsp(10)","pi897519574.htm",6,"10110");
navigation[36] = new navElem(36,"290 - 299&nbsp(7)","pi107309613.htm",6,"10111");
navigation[37] = new navElem(37,"Sklavin Nicky&nbsp(5)","pi1237035001.htm",5,"10009");
navigation[38] = new navElem(38,"Dein Wunschvideo&nbsp(1)","pi-301997527.htm",5,"10010");
navigation[39] = new navElem(39,"privat gefilmt&nbsp(11)","pi-1151654798.htm",5,"1011");
navigation[40] = new navElem(40,"Sexy Tied Girls","pi1125068108.htm",5,"1012");
navigation[41] = new navElem(41,"001 - 009&nbsp(9)","pi1134826230.htm",40,"1012-001");
navigation[42] = new navElem(42,"010 - 019&nbsp(10)","pi-1134536385.htm",40,"1012-002");
navigation[43] = new navElem(43,"020 - 029&nbsp(9)","pi1146411484.htm",40,"1012-003");
navigation[44] = new navElem(44,"030 - 039&nbsp(10)","pi1156070220.htm",40,"1012-30");
navigation[45] = new navElem(45,"040 - 049&nbsp(10)","pi1560523135.htm",40,"1012-50");
navigation[46] = new navElem(46,"050 - 059&nbsp(10)","pi1190546826.htm",40,"1012-60");
navigation[47] = new navElem(47,"060 - 069&nbsp(3)","pi443410633.htm",40,"1012-70");
navigation[48] = new navElem(48,"RopeMarks&nbsp(2)","pi-1352392449.htm",5,"1012-rm");
navigation[49] = new navElem(49,"Wolfi&nbsp(5)","pi1143815867.htm",5,"1013");
navigation[50] = new navElem(50,"Bondage Workshop&nbsp(1)","pi1187720541.htm",5,"11000-bc4");
navigation[51] = new navElem(51,"El Marino&nbsp(6)","pi1755991812.htm",5,"11000-el");
navigation[52] = new navElem(52,"Under Her Feet","pi1145277030.htm",5,"11000-fd");
navigation[53] = new navElem(53,"001 - 009&nbsp(9)","pi1242575977.htm",52,"11000-009");
navigation[54] = new navElem(54,"010 - 019&nbsp(1)","pi1630506102.htm",52,"11000-19");
navigation[55] = new navElem(55,"Gräfin von Zollhaus&nbsp(4)","pi1161277334.htm",5,"11000-gvz");
navigation[56] = new navElem(56,"Helpless-Girls","pi1263551061.htm",5,"11000-hg");
navigation[57] = new navElem(57,"001 - 009&nbsp(9)","pi1198404522.htm",56,"hg-0-19");
navigation[58] = new navElem(58,"010 - 019&nbsp(9)","pi-1454780189.htm",56,"hg-10-19");
navigation[59] = new navElem(59,"Shiny Bondage&nbsp(2)","pi1173165692.htm",5,"11000-sn");
navigation[60] = new navElem(60,"Shinywear&nbsp(2)","pi-977111508.htm",5,"11000-sw");
navigation[61] = new navElem(61,"Unhappy End","pi1098616333.htm",5,"11500");
navigation[62] = new navElem(62,"001 - 009&nbsp(8)","pi1118577353.htm",61,"11500-1");
navigation[63] = new navElem(63,"010 - 019&nbsp(4)","pi-457002154.htm",61,"11500-2");
navigation[64] = new navElem(64,"020 - 029&nbsp(2)","pi-1661781304.htm",61,"11500-3");
navigation[65] = new navElem(65,"SM-Girls","pi-986985699.htm",5,"16004");
navigation[66] = new navElem(66,"clips&nbsp(7)","pi365011722.htm",65,"16004-0");
navigation[67] = new navElem(67,"001 - 009&nbsp(10)","pi1209047164.htm",65,"16004-10");
navigation[68] = new navElem(68,"010 - 019&nbsp(6)","pi1189754317.htm",65,"16004-20");
navigation[69] = new navElem(69,"020 - 029&nbsp(1)","pi1214070404.htm",65,"16004-30");
navigation[70] = new navElem(70,"030 - 039&nbsp(7)","pi-1005820434.htm",65,"16004-40");
navigation[71] = new navElem(71,"040 - 049&nbsp(3)","pi1246287138.htm",65,"16004-50");
navigation[72] = new navElem(72,"Inquisition live&nbsp(5)","pi-1738968635.htm",5,"3001");
navigation[73] = new navElem(73,"Bound Feet","pi1010063934.htm",5,"4000");
navigation[74] = new navElem(74,"001 - 009&nbsp(9)","pi1191770232.htm",73,"4000-10");
navigation[75] = new navElem(75,"010 - 019&nbsp(10)","pi1372552473.htm",73,"4000-20");
navigation[76] = new navElem(76,"020 - 029&nbsp(7)","pi-337643726.htm",73,"4000-30");
navigation[77] = new navElem(77,"Tortured Feet&nbsp(4)","pi1184773501.htm",5,"4001");
navigation[78] = new navElem(78,"Crazy Sissels&nbsp(4)","pi1359217308.htm",5,"6000");
navigation[79] = new navElem(79,"Max","pi1930206573.htm",5,"7000");
navigation[80] = new navElem(80,"001 - 009&nbsp(9)","pi-2081299387.htm",79,"7000-10");
navigation[81] = new navElem(81,"010 - 019&nbsp(6)","pi-52748766.htm",79,"7000-20");
navigation[82] = new navElem(82,"TAG-Serie","pi-1998087638.htm",5,"8000");
navigation[83] = new navElem(83,"001 - 009&nbsp(2)","pi-1914866228.htm",82,"8000-009");
navigation[84] = new navElem(84,"020 - 029&nbsp(4)","pi1154535227.htm",82,"8000-030");
navigation[85] = new navElem(85,"050 - 059&nbsp(1)","pi794220785.htm",82,"8000-060");
navigation[86] = new navElem(86,"070 - 079&nbsp(1)","pi1156764223.htm",82,"8000-080");
navigation[87] = new navElem(87,"080 - 089&nbsp(1)","pi1248336789.htm",82,"8000-090");
navigation[88] = new navElem(88,"110 - 119&nbsp(1)","pi1158748961.htm",82,"8000-120");
navigation[89] = new navElem(89,"120 - 129&nbsp(5)","pi1152708026.htm",82,"8000-130");
navigation[90] = new navElem(90,"130 - 139&nbsp(7)","pi-303897165.htm",82,"8000-140");
navigation[91] = new navElem(91,"140 - 149&nbsp(4)","pi-654232968.htm",82,"8000-150");
navigation[92] = new navElem(92,"150 - 159&nbsp(4)","pi1161352085.htm",82,"8000-160");
navigation[93] = new navElem(93,"160 - 169&nbsp(2)","pi2123299915.htm",82,"8000-170");
navigation[94] = new navElem(94,"170 - 179&nbsp(1)","pi2060401943.htm",82,"8000-180");
navigation[95] = new navElem(95,"Compilations&nbsp(3)","pi1738826233.htm",82,"8000-c");
navigation[96] = new navElem(96,"Amateur SM Sessions&nbsp(1)","pi1261156743.htm",5,"ama-sm");
navigation[97] = new navElem(97,"Anja&nbsp(4)","pi1227550397.htm",5,"Anja");
navigation[98] = new navElem(98,"Bound Girls&nbsp(9)","pi1251453833.htm",5,"bg-001");
navigation[99] = new navElem(99,"Diary of a Slavegirl&nbsp(1)","pi-1074683845.htm",5,"diary-10");
navigation[100] = new navElem(100,"Damsel In Distress&nbsp(1)","pi-1273025786.htm",5,"did-all");
navigation[101] = new navElem(101,"Die Sadisten&nbsp(3)","pi1209651009.htm",5,"ds-010");
navigation[102] = new navElem(102,"HH-Serie (gefesselt im Skianzug)&nbsp(5)","pi1148756122.htm",5,"HH");
navigation[103] = new navElem(103,"HT Bondage&nbsp(5)","pi1196523180.htm",5,"HT");
navigation[104] = new navElem(104,"Lady Nicole Devill&nbsp(2)","pi1216986867.htm",5,"lnd-01");
navigation[105] = new navElem(105,"Bücher","pi1586476378.htm",null,"12000");
navigation[106] = new navElem(106,"Bildbände&nbsp(23)","pi-1574414068.htm",105,"12001");
navigation[107] = new navElem(107,"Goliath&nbsp(4)","pi-937922787.htm",105,"12002");
navigation[108] = new navElem(108,"Hexen/Hexenverfolgung&nbsp(3)","pi375363098.htm",105,"12003");
navigation[109] = new navElem(109,"Erotik-Romane&nbsp(17)","pi1411956371.htm",105,"12004");
navigation[110] = new navElem(110,"Sachbücher&nbsp(10)","pi1814139352.htm",105,"12005");
navigation[111] = new navElem(111,"Erfahrungen/Tatsachen&nbsp(2)","pi1760473849.htm",105,"12006");
navigation[112] = new navElem(112,"Seitenblick&nbsp(13)","pi-2013189178.htm",105,"12007");
navigation[113] = new navElem(113,"Magazine / Kalender&nbsp(7)","pi1229779431.htm",105,"1201");
navigation[114] = new navElem(114,"Fesselndes","pi-793658157.htm",null,"13000");
navigation[115] = new navElem(115,"Handschellen/Fußfesseln/Spezielles","pi-227676337.htm",114,"13001");
navigation[116] = new navElem(116,"Handschellen&nbsp(10)","pi743763775.htm",115,"13001-1");
navigation[117] = new navElem(117,"Fuss-Fesseln&nbsp(6)","pi-291461100.htm",115,"13001-2");
navigation[118] = new navElem(118,"Kombinationen&nbsp(5)","pi-364936315.htm",115,"13001-3");
navigation[119] = new navElem(119,"Spezielles&nbsp(10)","pi-827566702.htm",115,"13001-4");
navigation[120] = new navElem(120,"Fesseln aus Leder&nbsp(2)","pi-1969697150.htm",115,"13001-5");
navigation[121] = new navElem(121,"Humane Restraint&nbsp(2)","pi-803034343.htm",114,"130014");
navigation[122] = new navElem(122,"Zwangsjacken&nbsp(3)","pi-2052220143.htm",114,"130015");
navigation[123] = new navElem(123,"Seile&nbsp(3)","pi-1854473294.htm",114,"13003");
navigation[124] = new navElem(124,"Knebel und mehr","pi1787570763.htm",114,"13004");
navigation[125] = new navElem(125,"Knebel&nbsp(7)","pi695549928.htm",124,"13004-100");
navigation[126] = new navElem(126,"Sperrer&nbsp(5)","pi319204297.htm",124,"13004-200");
navigation[127] = new navElem(127,"Augenbinde&nbsp(2)","pi465750102.htm",124,"13004-300");
navigation[128] = new navElem(128,"Masken&nbsp(3)","pi-927302881.htm",124,"13004-400");
navigation[129] = new navElem(129,"Kopfgeschirre&nbsp(4)","pi1491732931.htm",124,"13004-500");
navigation[130] = new navElem(130,"Käfige/Saunasack&nbsp(5)","pi-380639887.htm",114,"13006");
navigation[131] = new navElem(131,"Clejuso&nbsp(22)","pi-1301357858.htm",114,"13007");
navigation[132] = new navElem(132,"Reizstrom&nbsp(1)","pi-187632580.htm",114,"13008");
navigation[133] = new navElem(133,"Rigid Cuffs&nbsp(1)","pi-1490495859.htm",114,"13009");
navigation[134] = new navElem(134,"Peitschen/Gemeines","pi-1255119670.htm",114,"13010");
navigation[135] = new navElem(135,"Peitschen&nbsp(6)","pi-155470589.htm",134,"13010-100");
navigation[136] = new navElem(136,"Gemeines&nbsp(4)","pi1969193864.htm",134,"13010-200");
navigation[137] = new navElem(137,"S/M-Möbel&nbsp(3)","pi1045660349.htm",114,"13011");
navigation[138] = new navElem(138,"Leder-Fesseln / Toys&nbsp(10)","pi924253410.htm",114,"13013");
navigation[139] = new navElem(139,"CD","pi806411065.htm",null,"15000");
navigation[140] = new navElem(140,"Bondage&nbsp(10)","pi1287505621.htm",139,"15001");
navigation[141] = new navElem(141,"Pony-Girl&nbsp(3)","pi393159424.htm",null,"15500");
navigation[142] = new navElem(142,"Mitgliederbereich&nbsp(7)","pi231733263.htm",null,"16000");
navigation[143] = new navElem(143,"Links&nbsp(12)","pi1393281404.htm",null,"90000");
navigation[144] = new navElem(144,"zum Downloadbereich","http://www.video.bondage-store.com",null,"99001");
navigation[145] = new navElem(145,"english Version","http://www.bondage-store.com/shop_eng",null,"99002");

// 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"));

