//
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 += "Produkten:<strong>&nbsp;" + prdCount + "</strong><br>";
	prdString += "Totaal:<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">' + "Toon winkelmand</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\">Totale productaanbod</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" >';
		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="11" height="1" height="1" alt="" border="0"></td>';
			};
		if(navItem.active) strHTML += '<td width="1%" class="ACTIVECATEGORY"><img src="assets/images/bulletcatact blaadje 30.gif" width="45" height="30" 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="11" height="14" 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="11" height="14" 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,"Schoonheidsbehandelingen","pi1124985683.htm",null,"62");
navigation[1] = new navElem(1,"Gezichtsbehandelingen","pi-1323011608.htm",0,"64");
navigation[2] = new navElem(2,"Huidverbetering","pi146526324.htm",1,"68");
navigation[3] = new navElem(3,"Anti-aging","pi-1340123873.htm",1,"67");
navigation[4] = new navElem(4,"Heren","pi525065317.htm",1,"69");
navigation[5] = new navElem(5,"Reiniging","pi-742492727.htm",1,"65");
navigation[6] = new navElem(6,"Ontspanning","pi-1685239210.htm",1,"66");
navigation[7] = new navElem(7,"Overige behandelingen","pi1128795377.htm",1,"72");
navigation[8] = new navElem(8,"Prijslijst","pi1128801992.htm",7,"73");
navigation[9] = new navElem(9,"Lichaamsbehandelingen","pi-1496794909.htm",0,"63");
navigation[10] = new navElem(10,"Dames gezicht behandelingen","pi1035382944.htm",null,"79");
navigation[11] = new navElem(11,"Heren behandelingen","pi-435459678.htm",null,"77");
navigation[12] = new navElem(12,"Overige behandelingen  ","pi-1197620860.htm",null,"90");
navigation[13] = new navElem(13,"prijslijst","pi-57172939.htm",12,"91");
navigation[14] = new navElem(14,"Aanbiedingen","pi1784195474.htm",null,"101");
navigation[15] = new navElem(15,"Kado idee!","pi1123354016.htm",null,"60");
navigation[16] = new navElem(16,"Microdermabrasie","pi-125985444.htm",null,"93");
navigation[17] = new navElem(17,"Microdermabrasie producten","pi1227787460.htm",16,"96");
navigation[18] = new navElem(18,"Universal Contour Wrap","pi1129041889.htm",null,"75");
navigation[19] = new navElem(19,"Neoderma producten","pi647202643.htm",null,"100");
navigation[20] = new navElem(20,"Anti pigment verzorging","pi460592115.htm",null,"99");
navigation[21] = new navElem(21,"Jeugd","pi1559958044.htm",null,"97");
navigation[22] = new navElem(22,"Arrangementen","pi1225298421.htm",null,"95");
navigation[23] = new navElem(23,"Lichaamsbehandelingen","pi1869159803.htm",null,"78");
navigation[24] = new navElem(24,"Heren producten","pi975695003.htm",null,"10");
navigation[25] = new navElem(25,"24 Uurs cremes","pi-1476047778.htm",24,"41");
navigation[26] = new navElem(26,"reinigen en exfolieren","pi218816647.htm",24,"42");
navigation[27] = new navElem(27,"speciale verzorging","pi-815611460.htm",24,"43");
navigation[28] = new navElem(28,"Reinigen","pi660281642.htm",null,"1");
navigation[29] = new navElem(29,"gevoelige huid","pi-1015473453.htm",28,"23");
navigation[30] = new navElem(30,"vette en onzuivere huid","pi2312472.htm",28,"24");
navigation[31] = new navElem(31,"normale en droge huid","pi-2015401671.htm",28,"25");
navigation[32] = new navElem(32,"Exfolieren","pi-1138808733.htm",null,"2");
navigation[33] = new navElem(33,"Vochtarme huid","pi2038631272.htm",null,"3");
navigation[34] = new navElem(34,"24 Uurs cremes","pi1122890775.htm",33,"26");
navigation[35] = new navElem(35,"reinigen en exfolieren","pi1608552972.htm",33,"27");
navigation[36] = new navElem(36,"speciale verzorging","pi-458197987.htm",33,"28");
navigation[37] = new navElem(37,"vette en onzuivere huid","pi62373023.htm",null,"6");
navigation[38] = new navElem(38,"24 Uur cremes","pi-979652566.htm",37,"20");
navigation[39] = new navElem(39,"reinigen en exfolieren","pi1428403043.htm",37,"21");
navigation[40] = new navElem(40,"speciale verzorging","pi875657832.htm",37,"22");
navigation[41] = new navElem(41,"Voedende verzorging voor de droge huid","pi126026228.htm",null,"7");
navigation[42] = new navElem(42,"24 uurs cremes","pi545695844.htm",41,"35");
navigation[43] = new navElem(43,"reinigen en exfolieren","pi-671780459.htm",41,"36");
navigation[44] = new navElem(44,"speciale verzorging","pi-1234119374.htm",41,"37");
navigation[45] = new navElem(45,"Anti-Aging","pi520869834.htm",null,"54");
navigation[46] = new navElem(46,"Beginnende anti-verouderende verzorging","pi-364351159.htm",45,"4");
navigation[47] = new navElem(47,"24 Uurs cremes","pi-241797350.htm",46,"29");
navigation[48] = new navElem(48,"reinigen en exfolieren","pi1794395027.htm",46,"30");
navigation[49] = new navElem(49,"speciale verzorging","pi-1902683432.htm",46,"31");
navigation[50] = new navElem(50,"luxe celvernieuwende anti-aging verzorging","pi-373063722.htm",45,"5");
navigation[51] = new navElem(51,"24 uurs cremes","pi-1975973895.htm",50,"32");
navigation[52] = new navElem(52,"reinigen en exfolieren","pi1785732294.htm",50,"33");
navigation[53] = new navElem(53,"speciale verzorging","pi1125053135.htm",50,"34");
navigation[54] = new navElem(54,"Nouvelle Jeunesse lijn","pi1353218531.htm",50,"53");
navigation[55] = new navElem(55,"Intensieve anti-aging producten","pi1101182419.htm",45,"19");
navigation[56] = new navElem(56,"24 Uurs cremes","pi-244648435.htm",55,"44");
navigation[57] = new navElem(57,"reinigen en exfolieren","pi-1961038262.htm",55,"45");
navigation[58] = new navElem(58,"speciale verzorging","pi313286403.htm",55,"46");
navigation[59] = new navElem(59,"Zeer gevoelige huid","pi-1094152219.htm",null,"8");
navigation[60] = new navElem(60,"24 Uurs cremes","pi1138779595.htm",59,"38");
navigation[61] = new navElem(61,"reinigen en exfolieren","pi1168524976.htm",59,"39");
navigation[62] = new navElem(62,"speciale verzorging","pi-574845711.htm",59,"40");
navigation[63] = new navElem(63,"Maskers","pi178207876.htm",null,"18");
navigation[64] = new navElem(64,"vochtarme huid","pi392783240.htm",63,"47");
navigation[65] = new navElem(65,"anti-aging","pi-2000746263.htm",63,"48");
navigation[66] = new navElem(66,"vette en onzuivere huid","pi416671478.htm",63,"49");
navigation[67] = new navElem(67,"droge trekkerige huid","pi-90530497.htm",63,"50");
navigation[68] = new navElem(68,"zeer gevoelige huid","pi1261714964.htm",63,"51");
navigation[69] = new navElem(69,"heren","pi1224008069.htm",63,"52");
navigation[70] = new navElem(70,"ogen","pi1123437392.htm",63,"61");
navigation[71] = new navElem(71,"Lichaamsverzorging","pi-140464063.htm",null,"12");
navigation[72] = new navElem(72,"Oogverzorging","pi2002245952.htm",null,"11");
navigation[73] = new navElem(73,"Decolleté, Hals en Borst verzorging","pi1120743599.htm",null,"14");
navigation[74] = new navElem(74,"Snelle oppepper voor de huid","pi-87488190.htm",null,"9");
navigation[75] = new navElem(75,"Hand en voetverzorging","pi720891101.htm",null,"98");
navigation[76] = new navElem(76,"Visagie van Malu Wilz","pi1128933307.htm",null,"74");
navigation[77] = new navElem(77,"Trendmake-up najaar winter 2010","pi-1822567114.htm",null,"83");
navigation[78] = new navElem(78,"Oogschaduw","pi1137935375.htm",null,"80");
navigation[79] = new navElem(79,"Beauty boxen","pi655615429.htm",78,"88");
navigation[80] = new navElem(80,"Mascara","pi573323720.htm",null,"82");
navigation[81] = new navElem(81,"Lippenstift, gloss & lipdesigner","pi1138017433.htm",null,"84");
navigation[82] = new navElem(82,"Lippenstift","pi-1807917969.htm",81,"85");
navigation[83] = new navElem(83,"Lip Gloss","pi1138097663.htm",81,"86");
navigation[84] = new navElem(84,"Lipdesigner","pi-208617516.htm",81,"87");
navigation[85] = new navElem(85,"Foundation","pi375118279.htm",null,"81");

// 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"));

