//
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="14" 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="14" 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="14" border="0" align="bottom" hspace="0" vspace="0" class="catnav"></td>'
		else strHTML += '<td width=\"1%\"><img src="assets/images/bulletcat1stcls.gif" width="14" height="14" 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,"Lötkugeln","pi1040842357.htm",null,"001");
navigation[1] = new navElem(1,"Sn62/Pb36/Ag2","pi1054871485.htm",0,"00005");
navigation[2] = new navElem(2,"Sn63/Pb37","pi-157362030.htm",0,"002");
navigation[3] = new navElem(3,"25.000 Stück","pi-1085482468.htm",2,"005");
navigation[4] = new navElem(4,"50.000 Stück","pi-1485340947.htm",2,"006");
navigation[5] = new navElem(5,"Sn95.5/Ag4/Cu0.5","pi1464987662.htm",0,"0126");
navigation[6] = new navElem(6,"25.000 Stück","pi374193144.htm",5,"0135");
navigation[7] = new navElem(7,"50.000 Stück","pi-393553255.htm",5,"0136");
navigation[8] = new navElem(8,"BGA-Halter","pi1048792673.htm",null,"100");
navigation[9] = new navElem(9,"Reballing-Koffer","pi1068543338.htm",null,"K001");
navigation[10] = new navElem(10,"Flex Tac Kit","pi1070010369.htm",9,"F01");
navigation[11] = new navElem(11,"Flextac Schablonen","pi1261193757.htm",10,"F02");
navigation[12] = new navElem(12,"Koffer Klein","pi-1235503197.htm",9,"K002");
navigation[13] = new navElem(13,"Koffer Groß","pi1859893672.htm",9,"K003");
navigation[14] = new navElem(14,"Schablonen","pi1046427529.htm",null,"S01");
navigation[15] = new navElem(15,"0.5 mm Raster","pi1188552885.htm",14,"1000");
navigation[16] = new navElem(16,"BGA-Schablonen 5 x 5 mm","pi-871031342.htm",15,"2");
navigation[17] = new navElem(17,"BGA-Schablonen 8 x 8 mm","pi1829912656.htm",15,"3");
navigation[18] = new navElem(18,"BGA-Schablonen 10 x 10 mm","pi368913937.htm",15,"4");
navigation[19] = new navElem(19,"BGA-Schablonen 11 x 11 mm","pi1143234302.htm",15,"5");
navigation[20] = new navElem(20,"BGA-Schablonen 15 x 15 mm","pi-247667033.htm",15,"6");
navigation[21] = new navElem(21,"BGA-Schablonen 6 x 6 mm","pi-2041618896.htm",15,"63");
navigation[22] = new navElem(22,"BGA-Schablonen 9 x 9 mm","pi2071080845.htm",15,"64");
navigation[23] = new navElem(23,"BGA-Schablonen 12 x 12 mm","pi452905663.htm",15,"65");
navigation[24] = new navElem(24,"0.65 mm Raster","pi-978414244.htm",14,"1001");
navigation[25] = new navElem(25,"BGA-Schablonen 6 x 6 mm","pi-2067242072.htm",24,"59");
navigation[26] = new navElem(26,"BGA-Schablonen 8 x 8 mm","pi46298249.htm",24,"60");
navigation[27] = new navElem(27,"BGA-Schablonen 9 x 9 mm","pi1713476118.htm",24,"61");
navigation[28] = new navElem(28,"BGA-Schablonen 12 x 12 mm","pi-1264160289.htm",24,"62");
navigation[29] = new navElem(29,"BGA-Schablonen 15 x 15 mm","pi-1220056342.htm",24,"8");
navigation[30] = new navElem(30,"0.8 mm Raster","pi-708167131.htm",14,"1002");
navigation[31] = new navElem(31,"BGA-Schablonen 7 x 7 mm","pi2112253334.htm",30,"11");
navigation[32] = new navElem(32,"BGA-Schablonen 9 x 9 mm","pi527828831.htm",30,"12");
navigation[33] = new navElem(33,"BGA-Schablonen 10 x 10 mm","pi-820075084.htm",30,"13");
navigation[34] = new navElem(34,"BGA-Schablonen 17 x 17 mm","pi-633153371.htm",30,"14");
navigation[35] = new navElem(35,"BGA-Schablonen 19 x 19 mm","pi-503946405.htm",30,"15");
navigation[36] = new navElem(36,"BGA-Schablonen 21 x 21 mm","pi1699952896.htm",30,"16");
navigation[37] = new navElem(37,"BGA-Schablonen 23 x 23 mm","pi-1819621586.htm",30,"17");
navigation[38] = new navElem(38,"BGA-Schablonen 25 x 25 mm","pi64509719.htm",30,"18");
navigation[39] = new navElem(39,"BGA-Schablonen 27 x 27 mm","pi-1643775732.htm",30,"19");
navigation[40] = new navElem(40,"BGA-Schablonen 31 x 31 mm","pi734891805.htm",30,"20");
navigation[41] = new navElem(41,"BGA-Schablonen 33 x 33 mm","pi1475753498.htm",30,"21");
navigation[42] = new navElem(42,"BGA-Schablonen 35 x 35 mm","pi795008659.htm",30,"22");
navigation[43] = new navElem(43,"BGA-Schablonen 37.5 x 37.5 mm","pi773403096.htm",30,"23");
navigation[44] = new navElem(44,"BGA-Schablonen 40 x 40 mm","pi-80358663.htm",30,"24");
navigation[45] = new navElem(45,"BGA-Schablonen 42.5 x 42.5 mm","pi1025816015.htm",30,"25");
navigation[46] = new navElem(46,"BGA-Schablonen 11 x 14 mm","pi1670115172.htm",30,"26");
navigation[47] = new navElem(47,"BGA-Schablonen 12 x 14 mm","pi-1875676110.htm",30,"27");
navigation[48] = new navElem(48,"BGA-Schablonen 13 x 8 mm","pi382074288.htm",30,"28");
navigation[49] = new navElem(49,"BGA-Schablonen 12 x 12 mm","pi1046439140.htm",30,"S14");
navigation[50] = new navElem(50,"BGA-Schablonen 14 x 14 mm","pi1885967381.htm",30,"S15");
navigation[51] = new navElem(51,"BGA-Schablonen 15 x 15 mm","pi-103160398.htm",30,"S16");
navigation[52] = new navElem(52,"BGA-Schablonen 16 x 16 mm","pi573262923.htm",30,"S17");
navigation[53] = new navElem(53,"BGA-Schablonen 18 x 18 mm","pi-1891028838.htm",30,"S18-1");
navigation[54] = new navElem(54,"0.95 mm Raster","pi1692942045.htm",14,"1003");
navigation[55] = new navElem(55,"BGA-Schablonen 37.5 x 37.5 mm","pi-244633358.htm",54,"58");
navigation[56] = new navElem(56,"1.0 mm Raster","pi-720800126.htm",14,"1004");
navigation[57] = new navElem(57,"BGA-Schablonen 15 x 15 mm","pi1084113432.htm",56,"0001");
navigation[58] = new navElem(58,"BGA-Schablonen 17 x 17 mm","pi1117943725.htm",56,"0002");
navigation[59] = new navElem(59,"BGA-Schablonen 19 x 19 mm","pi386517889.htm",56,"0003");
navigation[60] = new navElem(60,"BGA-Schablonen 23 x 23 mm","pi-1387351886.htm",56,"0004");
navigation[61] = new navElem(61,"BGA-Schablonen 27 x 27 mm","pi2075528379.htm",56,"0005");
navigation[62] = new navElem(62,"BGA-Schablonen 12 x 12 mm","pi153607006.htm",56,"29");
navigation[63] = new navElem(63,"BGA-Schablonen 14 x 14 mm","pi-1465653060.htm",56,"30");
navigation[64] = new navElem(64,"BGA-Schablonen 16 x 16 mm","pi-1191285430.htm",56,"31");
navigation[65] = new navElem(65,"BGA-Schablonen 18 x 18 mm","pi2070524419.htm",56,"32");
navigation[66] = new navElem(66,"BGA-Schablonen 21 x 21 mm","pi1504220137.htm",56,"33");
navigation[67] = new navElem(67,"BGA-Schablonen 25 x 25 mm","pi829104191.htm",56,"34");
navigation[68] = new navElem(68,"BGA-Schablonen 29 x 29 mm","pi1826954373.htm",56,"35");
navigation[69] = new navElem(69,"BGA-Schablonen 33 x 33 mm","pi1143308642.htm",56,"36");
navigation[70] = new navElem(70,"BGA-Schablonen 37.5 x 37.5 mm","pi-1688876485.htm",56,"37");
navigation[71] = new navElem(71,"BGA-Schablonen 10 x 12 mm","pi159747680.htm",56,"38");
navigation[72] = new navElem(72,"BGA-Schablonen 13 x 10 mm","pi-1806504969.htm",56,"39");
navigation[73] = new navElem(73,"BGA-Schablonen 13 x 12 mm","pi-2094854022.htm",56,"40");
navigation[74] = new navElem(74,"BGA-Schablonen 13 x 15 mm","pi1393496888.htm",56,"41");
navigation[75] = new navElem(75,"BGA-Schablonen 17 x 15 mm","pi-622153511.htm",56,"42");
navigation[76] = new navElem(76,"BGA-Schablonen 31 x31 mm","pi84035788.htm",56,"S006");
navigation[77] = new navElem(77,"BGA-Schablonen 35 x 35 mm","pi-1653242594.htm",56,"S007");
navigation[78] = new navElem(78,"BGA-Schablonen 40 x 40 mm","pi1920386618.htm",56,"S008");
navigation[79] = new navElem(79,"BGA-Schablonen 42.5 x 42.5 mm","pi1671425955.htm",56,"S009");
navigation[80] = new navElem(80,"1.118 mm Raster","pi169608995.htm",14,"1005");
navigation[81] = new navElem(81,"BGA-Schablonen 31 x31 mm","pi1326887720.htm",80,"10");
navigation[82] = new navElem(82,"1.27 mm Raster","pi-1985830693.htm",14,"1006");
navigation[83] = new navElem(83,"BGA-Schablonen 14 x 14 mm","pi1660962479.htm",82,"43");
navigation[84] = new navElem(84,"BGA-Schablonen 15 x 15 mm","pi-1988466571.htm",82,"44");
navigation[85] = new navElem(85,"BGA-Schablonen 16x 16 mm","pi-429069552.htm",82,"45");
navigation[86] = new navElem(86,"BGA-Schablonen 17 x 17 mm","pi-73396121.htm",82,"46");
navigation[87] = new navElem(87,"BGA-Schablonen 18 x 18 mm","pi-1306056467.htm",82,"47");
navigation[88] = new navElem(88,"BGA-Schablonen 45 x 45 mm","pi-1766296088.htm",82,"48");
navigation[89] = new navElem(89,"BGA-Schablonen 19 x 19 mm","pi1068455782.htm",82,"S0021");
navigation[90] = new navElem(90,"BGA-Schablonen 21 x 21 mm","pi-1198595068.htm",82,"S0023");
navigation[91] = new navElem(91,"BGA-Schablonen 23 x 23 mm","pi1196292562.htm",82,"S0025");
navigation[92] = new navElem(92,"BGA-Schablonen 25 x 25 mm","pi-1360626608.htm",82,"S0027");
navigation[93] = new navElem(93,"BGA-Schablonen 27 x 27 mm","pi1446230545.htm",82,"S0028");
navigation[94] = new navElem(94,"BGA-Schablonen 31 x 31 mm","pi822497959.htm",82,"S0030");
navigation[95] = new navElem(95,"BGA-Schablonen 33 x 33 mm","pi-216100516.htm",82,"S0031");
navigation[96] = new navElem(96,"BGA-Schablonen 35 x 35 mm","pi-1901607190.htm",82,"S0032");
navigation[97] = new navElem(97,"BGA-Schablonen 37.5x37.5mm","pi2002677544.htm",82,"S0034");
navigation[98] = new navElem(98,"BGA-Schablonen 40 x 40 mm","pi-713590263.htm",82,"S0035");
navigation[99] = new navElem(99,"BGA-Schablonen 42.5x42.5mm","pi-219903594.htm",82,"S0036");
navigation[100] = new navElem(100,"1.5 mm Raster","pi2111506560.htm",14,"1007");
navigation[101] = new navElem(101,"BGA-Schablonen 25 x 25 mm","pi140192031.htm",100,"49");
navigation[102] = new navElem(102,"BGA-Schablonen 31 x 31 mm","pi-1967402907.htm",100,"50");
navigation[103] = new navElem(103,"BGA-Schablonen 33 x 33 mm","pi1186930971.htm",100,"51");
navigation[104] = new navElem(104,"BGA-Schablonen 37.5 x 37.5 mm","pi-892536639.htm",100,"52");
navigation[105] = new navElem(105,"BGA-Schablonen 40 x 40 mm","pi1211770008.htm",100,"55");
navigation[106] = new navElem(106,"BGA-Schablonen 42.5 x 42.5 mm","pi1669266566.htm",100,"56");
navigation[107] = new navElem(107,"BGA-Schablonen 19 x 19 mm","pi366477551.htm",100,"S0022");
navigation[108] = new navElem(108,"BGA-Schablonen 21 x 21 mm","pi-1090933579.htm",100,"S0024");
navigation[109] = new navElem(109,"BGA-Schablonen 23 x 23 mm","pi1906808299.htm",100,"S0026");
navigation[110] = new navElem(110,"BGA-Schablonen 27 x 27 mm","pi-1887241474.htm",100,"S0029");
navigation[111] = new navElem(111,"BGA-Schablonen 35 x 35 mm","pi2025075491.htm",100,"S0033");
navigation[112] = new navElem(112,"2.54 mm Raster","pi-1428786985.htm",14,"1008");
navigation[113] = new navElem(113,"BGA-Schablonen 35 x 35 mm","pi-1569223132.htm",112,"57");

// 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"));


