//
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.htm?categoryId=0" + "\">";
	prdString += "<strong>" + '<img src="assets/images/bullet.gif" width="13" height="10" 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\"></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(start,end){
var strHTML="";
for(var i=start;i<Math.min(end+1,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 = true;
		this.categoryId = categoryId;
		};
// navigation
var navigation = new Array();
//
navigation[0] = new navElem(0,"Neuvorstellungen&nbsp(40)","pi1090259637.htm",null,"A10");
navigation[1] = new navElem(1,"Süsse 18&nbsp(1067)","pi-152078651.htm",null,"B10");
navigation[2] = new navElem(2,"Interaktiv&nbsp(44)","pi1369313465.htm",null,"B20");
navigation[3] = new navElem(3,"Anal&nbsp(313)","pi-375425705.htm",null,"B30");
navigation[4] = new navElem(4,"Grosser Busen&nbsp(683)","pi926141004.htm",null,"B40");
navigation[5] = new navElem(5,"Amateur&nbsp(308)","pi1729140504.htm",null,"B50");
navigation[6] = new navElem(6,"Lesben&nbsp(109)","pi1857926636.htm",null,"B55");
navigation[7] = new navElem(7,"Hardcore/Diverses&nbsp(835)","pi1092202580.htm",null,"B60");
navigation[8] = new navElem(8,"Bunt gemischt&nbsp(111)","pi-1967699189.htm",null,"B80");
navigation[9] = new navElem(9,"Best of Filme&nbsp(83)","pi1154162427.htm",null,"B85");
navigation[10] = new navElem(10,"Bukkake/Group.&nbsp(1050)","pi-197826214.htm",null,"C10");
navigation[11] = new navElem(11,"Doktor-Spiele&nbsp(157)","pi189892929.htm",null,"C20");
navigation[12] = new navElem(12,"Lehrer-Spiele&nbsp(173)","pi-1409879120.htm",null,"C30");
navigation[13] = new navElem(13,"Fessel-Spiele&nbsp(580)","pi166037102.htm",null,"C40");
navigation[14] = new navElem(14,"Fetisch/Diverses&nbsp(765)","pi1403658041.htm",null,"C50");
navigation[15] = new navElem(15,"Strümpfe-/Füsse&nbsp(620)","pi1103891761.htm",14,"C60");
navigation[16] = new navElem(16,"Leder/Gummi&nbsp(44)","pi-67610722.htm",14,"C70");
navigation[17] = new navElem(17,"Natursekt&nbsp(518)","pi1104315124.htm",14,"C80");
navigation[18] = new navElem(18,"Über 40&nbsp(122)","pi-942996867.htm",null,"C90");
navigation[19] = new navElem(19,"Kimono&nbsp(176)","pi1094762136.htm",null,"D10");
navigation[20] = new navElem(20,"Anime&nbsp(11)","pi1484822504.htm",null,"D20");
navigation[21] = new navElem(21,"Mega-Stars - Zensuriert","pi1175815063.htm",null,"D30");
navigation[22] = new navElem(22,"Alice Ogura&nbsp(9)","pi1175884839.htm",21,"D31");
navigation[23] = new navElem(23,"Bunt gemischt&nbsp(37)","pi1203764878.htm",21,"D39");
navigation[24] = new navElem(24,"Lina Aishima&nbsp(6)","pi567481564.htm",21,"D40");
navigation[25] = new navElem(25,"Maria Ozawa&nbsp(35)","pi1576046493.htm",21,"D50");
navigation[26] = new navElem(26,"Sola Aoi&nbsp(28)","pi-658388084.htm",21,"D60");
navigation[27] = new navElem(27,"Sortiert nach Modells","superstars.html",null,"E10");
navigation[28] = new navElem(28,"Aktionen&nbsp(57)","pi-1260797602.htm",null,"F10");
navigation[29] = new navElem(29,"Bundle-Angebote&nbsp(32)","pi-1286668228.htm",null,"F20");
navigation[30] = new navElem(30,"Label: Fanta&nbsp(292)","pi1112888964.htm",null,"G10");
navigation[31] = new navElem(31,"Label: OrientalDream&nbsp(292)","pi1069908778.htm",null,"G20");
navigation[32] = new navElem(32,"Label: Tip Top&nbsp(78)","pi-2021309407.htm",null,"G30");
navigation[33] = new navElem(33,"Label: TTS&nbsp(40)","pi-1904002700.htm",null,"G40");
navigation[34] = new navElem(34,"Label: Yuzu&nbsp(42)","pi971919611.htm",null,"G50");
navigation[35] = new navElem(35,"Label: A6&nbsp(63)","pi-733352551.htm",null,"G60");
navigation[36] = new navElem(36,"Label: Joydel&nbsp(69)","pi2056556142.htm",null,"G70");
navigation[37] = new navElem(37,"Label: Kokeshi&nbsp(70)","pi1113216030.htm",null,"G80");
navigation[38] = new navElem(38,"Label: Tsubaki House&nbsp(56)","pi1113475739.htm",null,"G90");
navigation[39] = new navElem(39,"Label: Himiko&nbsp(54)","pi1108242882.htm",null,"H10");
navigation[40] = new navElem(40,"Label: ZOOM&nbsp(29)","pi-1119991013.htm",null,"H20");
navigation[41] = new navElem(41,"Label: MATSU Entertainment&nbsp(12)","pi-1175444861.htm",null,"H25");
navigation[42] = new navElem(42,"Label: Mandala&nbsp(15)","pi-1154648640.htm",null,"H30");
navigation[43] = new navElem(43,"Label: Goemon&nbsp(35)","pi1114080908.htm",null,"H40");
navigation[44] = new navElem(44,"Label: Tora-Tora&nbsp(146)","pi-689343535.htm",null,"H50");
navigation[45] = new navElem(45,"Label: Tokyo Neko&nbsp(13)","pi609690046.htm",null,"H60");
navigation[46] = new navElem(46,"Label: YSM&nbsp(22)","pi808558942.htm",null,"H70");
navigation[47] = new navElem(47,"Label: AV Box&nbsp(47)","pi181225762.htm",null,"I10");
navigation[48] = new navElem(48,"Label: Tokyo-Mode&nbsp(11)","pi1951033083.htm",null,"I20");
navigation[49] = new navElem(49,"Label: AV Emotion&nbsp(13)","pi1633262624.htm",null,"I30");
navigation[50] = new navElem(50,"Label: AV Excite Bunny","pi117780897.htm",null,"I40");
navigation[51] = new navElem(51,"Label: J-Spot&nbsp(80)","pi-373268658.htm",null,"I50");
navigation[52] = new navElem(52,"Label: AV JOY","pi-1175399241.htm",null,"I60");
navigation[53] = new navElem(53,"Label: AV LIP-Series","pi-382611924.htm",null,"I70");
navigation[54] = new navElem(54,"Label: AV Special","pi1811727805.htm",null,"I80");
navigation[55] = new navElem(55,"Label: Sky High Entertainment&nbsp(159)","pi1827793059.htm",null,"K10");
navigation[56] = new navElem(56,"Label: Wasabi&nbsp(12)","pi1145126113.htm",null,"L10");
navigation[57] = new navElem(57,"Label: Fairy&nbsp(38)","pi1147538650.htm",null,"M10");
navigation[58] = new navElem(58,"Label: Magic Banana&nbsp(72)","pi704388691.htm",null,"N10");
navigation[59] = new navElem(59,"Label: Omni Quest&nbsp(24)","pi441443992.htm",null,"O10");
navigation[60] = new navElem(60,"Label: Red Hot Collection&nbsp(214)","pi389552313.htm",null,"P10");
navigation[61] = new navElem(61,"Label: S2 Entertainment&nbsp(18)","pi-867004794.htm",null,"Q10");
navigation[62] = new navElem(62,"Label: Shabu-Shabu&nbsp(13)","pi1151260098.htm",null,"R10");
navigation[63] = new navElem(63,"Label: Pink Puncher&nbsp(152)","pi1151701295.htm",null,"S10");
navigation[64] = new navElem(64,"Label: Queen8&nbsp(41)","pi1156587854.htm",null,"T10");
navigation[65] = new navElem(65,"Label: Kamikaze&nbsp(166)","pi440375755.htm",null,"U10");
navigation[66] = new navElem(66,"Label: Mugen&nbsp(77)","pi1169288197.htm",null,"V10");
navigation[67] = new navElem(67,"Label: Sakigake&nbsp(8)","pi-1030554910.htm",null,"W10");
navigation[68] = new navElem(68,"Label: Ero-Media&nbsp(13)","pi264054203.htm",null,"X10");
navigation[69] = new navElem(69,"Label: Samurai-Porn&nbsp(45)","pi628887510.htm",null,"Y10");
navigation[70] = new navElem(70,"Label: Studio Teriyaki&nbsp(114)","pi1385075583.htm",null,"Z10");
navigation[71] = new navElem(71,"Label: One Piece Entertainment&nbsp(62)","pi-2010175634.htm",null,"ZA10");
navigation[72] = new navElem(72,"Blu-ray Disc","pi1203708513.htm",null,"zl1");

// 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"));

