//
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 += "Amount of Products:<strong>&nbsp;" + prdCount + "</strong><br>";
	prdString += "Subtotal:<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" alt="Bullet.gif" border="0" align="absmiddle" hspace="0" vspace="0" class="catnav">' + "Go to the Orderform</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\">Central Catalog</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" alt="BulletCatAct.gif" 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" alt="BulletCat1stCls.gif" 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" alt="BulletCat1st.gif" 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,"New (Videos)&nbsp(9)","pi2039580175.htm",null,"1");
navigation[1] = new navElem(1,"New (Toys)&nbsp(4)","pi481648562.htm",null,"100011");
navigation[2] = new navElem(2,"Videos","pi-1156337944.htm",null,"11000");
navigation[3] = new navElem(3,"Amateur Bondage","pi-1711779646.htm",2,"1000");
navigation[4] = new navElem(4,"001 - 009&nbsp(9)","pi1881280726.htm",3,"1001");
navigation[5] = new navElem(5,"010 - 019&nbsp(9)","pi-1518447387.htm",3,"1002");
navigation[6] = new navElem(6,"020 - 029&nbsp(10)","pi398109250.htm",3,"1003");
navigation[7] = new navElem(7,"030 - 039&nbsp(10)","pi-1488504421.htm",3,"1004");
navigation[8] = new navElem(8,"040 - 049&nbsp(10)","pi84304448.htm",3,"1005");
navigation[9] = new navElem(9,"050 - 059&nbsp(6)","pi-295385791.htm",3,"1006");
navigation[10] = new navElem(10,"060 - 069&nbsp(11)","pi-732622505.htm",3,"1007");
navigation[11] = new navElem(11,"070 - 079&nbsp(10)","pi-1418079395.htm",3,"1008");
navigation[12] = new navElem(12,"080 - 089&nbsp(11)","pi1051521144.htm",3,"1009");
navigation[13] = new navElem(13,"090 - 099&nbsp(10)","pi1721162521.htm",3,"10091");
navigation[14] = new navElem(14,"100 - 109&nbsp(13)","pi-662158683.htm",3,"10092");
navigation[15] = new navElem(15,"110 - 119&nbsp(10)","pi2021060331.htm",3,"10093");
navigation[16] = new navElem(16,"120 - 129&nbsp(10)","pi405615071.htm",3,"10094");
navigation[17] = new navElem(17,"130 - 139&nbsp(10)","pi1546875528.htm",3,"10095");
navigation[18] = new navElem(18,"140 - 149&nbsp(10)","pi1113554783.htm",3,"10096");
navigation[19] = new navElem(19,"150 - 159&nbsp(10)","pi581594241.htm",3,"10097");
navigation[20] = new navElem(20,"160 - 169&nbsp(10)","pi1137340892.htm",3,"10098");
navigation[21] = new navElem(21,"170 - 179&nbsp(10)","pi1150804488.htm",3,"10099");
navigation[22] = new navElem(22,"180 - 189&nbsp(10)","pi1161975716.htm",3,"10100");
navigation[23] = new navElem(23,"190 - 199&nbsp(10)","pi1169918886.htm",3,"10101");
navigation[24] = new navElem(24,"200 - 209&nbsp(10)","pi458029830.htm",3,"10102");
navigation[25] = new navElem(25,"210 - 219&nbsp(10)","pi1190228818.htm",3,"10103");
navigation[26] = new navElem(26,"220 - 229&nbsp(10)","pi1196941383.htm",3,"10104");
navigation[27] = new navElem(27,"230 - 239&nbsp(10)","pi1205327161.htm",3,"10105");
navigation[28] = new navElem(28,"240 - 249&nbsp(10)","pi1213532808.htm",3,"10106");
navigation[29] = new navElem(29,"250 - 259&nbsp(9)","pi1483912838.htm",3,"10107");
navigation[30] = new navElem(30,"260 - 269&nbsp(9)","pi813422708.htm",3,"10108");
navigation[31] = new navElem(31,"270 - 279&nbsp(10)","pi-1556265883.htm",3,"10109");
navigation[32] = new navElem(32,"280 - 289&nbsp(10)","pi-1653095486.htm",3,"10110");
navigation[33] = new navElem(33,"290 - 299&nbsp(10)","pi-294800101.htm",3,"10111");
navigation[34] = new navElem(34,"300 - 309&nbsp(10)","pi2042566592.htm",3,"10112");
navigation[35] = new navElem(35,"310 - 319&nbsp(10)","pi1173204161.htm",3,"10113");
navigation[36] = new navElem(36,"320 - 329&nbsp(14)","pi-12794898.htm",3,"10114");
navigation[37] = new navElem(37,"Custom Video&nbsp(1)","pi-301997527.htm",2,"10010");
navigation[38] = new navElem(38,"home made&nbsp(9)","pi-1151654798.htm",2,"1011");
navigation[39] = new navElem(39,"Wolfie&nbsp(5)","pi836750462.htm",2,"1011-1");
navigation[40] = new navElem(40,"Sexy Tied Girls","pi1125144261.htm",2,"1012");
navigation[41] = new navElem(41,"001 - 009&nbsp(9)","pi1135340369.htm",40,"1012-001");
navigation[42] = new navElem(42,"010 - 019&nbsp(10)","pi1508057918.htm",40,"1012-002");
navigation[43] = new navElem(43,"020 - 029&nbsp(10)","pi1146412931.htm",40,"1012-003");
navigation[44] = new navElem(44,"030 - 039&nbsp(10)","pi-589304890.htm",40,"1012-4");
navigation[45] = new navElem(45,"040 - 049&nbsp(10)","pi1176292263.htm",40,"1012-5");
navigation[46] = new navElem(46,"050 - 059&nbsp(10)","pi-551745988.htm",40,"1012-6");
navigation[47] = new navElem(47,"060 - 069&nbsp(3)","pi1190959990.htm",40,"1012-60");
navigation[48] = new navElem(48,"The Sadists&nbsp(3)","pi-1811300111.htm",2,"103");
navigation[49] = new navElem(49,"EL_Marino&nbsp(6)","pi1145375167.htm",2,"11000-el");
navigation[50] = new navElem(50,"Under Her Feet","pi1280034488.htm",2,"11000-fd");
navigation[51] = new navElem(51,"001 - 009&nbsp(9)","pi1323518773.htm",50,"fd-1");
navigation[52] = new navElem(52,"010 - 019&nbsp(5)","pi-1748642222.htm",50,"fd-2");
navigation[53] = new navElem(53,"Gräfin von Zollhaus&nbsp(4)","pi2091556345.htm",2,"11000-gvz");
navigation[54] = new navElem(54,"Helpless Girls","pi1159967384.htm",2,"11000-hg");
navigation[55] = new navElem(55,"001 - 009&nbsp(9)","pi-477813097.htm",54,"hg-001-009");
navigation[56] = new navElem(56,"010 - 019&nbsp(9)","pi-1848413556.htm",54,"hg-010-019");
navigation[57] = new navElem(57,"Shiny Bondage&nbsp(2)","pi1173212273.htm",2,"11000-sb");
navigation[58] = new navElem(58,"Inquisition live&nbsp(5)","pi-1738968635.htm",2,"3001");
navigation[59] = new navElem(59,"Bound Feet","pi1010063934.htm",2,"4000");
navigation[60] = new navElem(60,"001 - 009&nbsp(9)","pi1192004590.htm",59,"4000-10");
navigation[61] = new navElem(61,"010 - 019&nbsp(10)","pi-1737724713.htm",59,"4000-20");
navigation[62] = new navElem(62,"020 - 029&nbsp(7)","pi816380267.htm",59,"4000-30");
navigation[63] = new navElem(63,"Tortured Feet&nbsp(4)","pi-886142658.htm",2,"4001");
navigation[64] = new navElem(64,"Crazy Sissels&nbsp(4)","pi1359217308.htm",2,"6000");
navigation[65] = new navElem(65,"Max","pi1930206573.htm",2,"7000");
navigation[66] = new navElem(66,"001 - 009&nbsp(9)","pi1156429148.htm",65,"7000-010");
navigation[67] = new navElem(67,"010 - 019&nbsp(6)","pi968460589.htm",65,"7000-20");
navigation[68] = new navElem(68,"TAG - Videos (Tied and Gagged)","pi892694321.htm",2,"8000");
navigation[69] = new navElem(69,"Compilations&nbsp(3)","pi180883225.htm",68,"8000-0000");
navigation[70] = new navElem(70,"080 - 089&nbsp(1)","pi-2059011173.htm",68,"8000-0089");
navigation[71] = new navElem(71,"001 - 009&nbsp(2)","pi-1944072194.htm",68,"8000-009");
navigation[72] = new navElem(72,"020 - 029&nbsp(4)","pi-1544120925.htm",68,"8000-029");
navigation[73] = new navElem(73,"050 - 059&nbsp(1)","pi1180157669.htm",68,"8000-059");
navigation[74] = new navElem(74,"070 - 079&nbsp(1)","pi1156867898.htm",68,"8000-079");
navigation[75] = new navElem(75,"110 - 119&nbsp(1)","pi-1592102698.htm",68,"8000-119");
navigation[76] = new navElem(76,"120 - 129&nbsp(5)","pi1152707540.htm",68,"8000-129");
navigation[77] = new navElem(77,"130 - 139&nbsp(7)","pi1890446405.htm",68,"8000-139");
navigation[78] = new navElem(78,"140 - 149&nbsp(4)","pi-1994881502.htm",68,"8000-149");
navigation[79] = new navElem(79,"150 - 159&nbsp(5)","pi1161366111.htm",68,"8000-159");
navigation[80] = new navElem(80,"160 - 169&nbsp(2)","pi1977261166.htm",68,"8000-169");
navigation[81] = new navElem(81,"170 - 179&nbsp(1)","pi-917940415.htm",68,"8000-179");
navigation[82] = new navElem(82,"Amateur SM Sessions&nbsp(1)","pi-375901167.htm",2,"AMA-SM-001");
navigation[83] = new navElem(83,"Anja&nbsp(4)","pi-218389189.htm",2,"Anja");
navigation[84] = new navElem(84,"Bondage Bitches&nbsp(2)","pi-1050690063.htm",2,"bb-001");
navigation[85] = new navElem(85,"Bondage Workshop&nbsp(1)","pi581410424.htm",2,"BWS-001");
navigation[86] = new navElem(86,"Diary of a slave girl&nbsp(1)","pi2023418598.htm",2,"dia-001");
navigation[87] = new navElem(87,"Bound Girls&nbsp(9)","pi-262184901.htm",2,"HK-001");
navigation[88] = new navElem(88,"HT-Bondage&nbsp(5)","pi428111790.htm",2,"ht-01");
navigation[89] = new navElem(89,"Lady Nicole Devill&nbsp(2)","pi-1151465794.htm",2,"ldn-010");
navigation[90] = new navElem(90,"Slave Girl Nicky&nbsp(4)","pi-472648873.htm",2,"Nicky-001");
navigation[91] = new navElem(91,"Damsel in Distress&nbsp(1)","pi-19727471.htm",2,"re-001");
navigation[92] = new navElem(92,"RopeMarks&nbsp(2)","pi245327364.htm",2,"rm-001");
navigation[93] = new navElem(93,"Bound in Ski Suit&nbsp(5)","pi1148902617.htm",2,"ski");
navigation[94] = new navElem(94,"SM-Girls","pi1084030041.htm",2,"smg-18");
navigation[95] = new navElem(95,"clips&nbsp(7)","pi499238287.htm",94,"sm-clips");
navigation[96] = new navElem(96,"010 - 019&nbsp(7)","pi91665030.htm",94,"smg 10-19");
navigation[97] = new navElem(97,"001 - 009&nbsp(10)","pi872893625.htm",94,"smg 1-9");
navigation[98] = new navElem(98,"020 - 029&nbsp(4)","pi1214398925.htm",94,"smg 20-29");
navigation[99] = new navElem(99,"030 - 039&nbsp(7)","pi433960177.htm",94,"smg 30-39");
navigation[100] = new navElem(100,"Shinywear&nbsp(2)","pi-1579041470.htm",2,"vid-sw");
navigation[101] = new navElem(101,"Unhappy End&nbsp(14)","pi1103388609.htm",null,"11500");
navigation[102] = new navElem(102,"Steel&nbsp(2)","pi1152025619.htm",null,"12000");
navigation[103] = new navElem(103,"Ties and more","pi-793658157.htm",null,"13000");
navigation[104] = new navElem(104,"handcuffs/legcuffs","pi-227676337.htm",103,"13001");
navigation[105] = new navElem(105,"handcuffs&nbsp(9)","pi212925624.htm",104,"13001-1");
navigation[106] = new navElem(106,"legcuffs&nbsp(4)","pi-735462311.htm",104,"13001-2");
navigation[107] = new navElem(107,"combinations&nbsp(1)","pi-473034330.htm",104,"13001-3");
navigation[108] = new navElem(108,"special cuffs&nbsp(7)","pi-627818961.htm",104,"13001-4");
navigation[109] = new navElem(109,"ropes&nbsp(4)","pi-1854473294.htm",103,"13003");
navigation[110] = new navElem(110,"gags and more","pi1787570763.htm",103,"13004");
navigation[111] = new navElem(111,"gags&nbsp(7)","pi1158934549.htm",110,"13004-1");
navigation[112] = new navElem(112,"special gags&nbsp(4)","pi1785991602.htm",110,"13004-2");
navigation[113] = new navElem(113,"blindfolds","pi1892485195.htm",110,"13004-3");
navigation[114] = new navElem(114,"masks&nbsp(2)","pi-448932048.htm",110,"13004-4");
navigation[115] = new navElem(115,"Headharness&nbsp(1)","pi-1221332111.htm",110,"13004-5");
navigation[116] = new navElem(116,"bags&nbsp(1)","pi-380639887.htm",103,"13006");
navigation[117] = new navElem(117,"Clejuso&nbsp(21)","pi-1301357858.htm",103,"13007");
navigation[118] = new navElem(118,"Rigid Cuffs&nbsp(1)","pi-1490495859.htm",103,"13009");
navigation[119] = new navElem(119,"leather and toys&nbsp(8)","pi924253410.htm",103,"13013");
navigation[120] = new navElem(120,"CD","pi806411065.htm",null,"15000");
navigation[121] = new navElem(121,"Bondage&nbsp(9)","pi1287505621.htm",120,"15001");
navigation[122] = new navElem(122,"Member Section&nbsp(6)","pi231733263.htm",null,"16000");

// 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"));


