//
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="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\">Unsere Produktpalette</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 = false;
		this.categoryId = categoryId;
		};
// navigation
var navigation = new Array();
//
navigation[0] = new navElem(0,"Accessoires","pi885757927.html",null,"2");
navigation[1] = new navElem(1,"Applikationen","pi493072611.html",0,"136");
navigation[2] = new navElem(2,"Flocktransfers","pi187664428.html",1,"216");
navigation[3] = new navElem(3,"Folientransfers","pi-625838147.html",1,"217");
navigation[4] = new navElem(4,"Strasstransfer","pi-952968646.html",1,"218");
navigation[5] = new navElem(5,"BH-Zubehör","pi-1922077038.html",0,"134");
navigation[6] = new navElem(6,"Broschen","pi-181697913.html",0,"140");
navigation[7] = new navElem(7,"Ketten und Gürtel","pi1107866841.html",0,"133");
navigation[8] = new navElem(8,"Kordelstopper","pi413789421.html",0,"135");
navigation[9] = new navElem(9,"Bänder","pi2084719715.html",null,"3");
navigation[10] = new navElem(10,"Bundbänder","pi1965493320.html",9,"100");
navigation[11] = new navElem(11,"Gardinenbänder","pi1059558364.html",9,"96");
navigation[12] = new navElem(12,"Gummibänder","pi228644741.html",9,"49");
navigation[13] = new navElem(13,"Bio Elastic","pi-1871903613.html",12,"65");
navigation[14] = new navElem(14,"Einfassgummiband","pi1472270053.html",12,"69");
navigation[15] = new navElem(15,"Elastic Gummibänder","pi609755206.html",12,"64");
navigation[16] = new navElem(16,"Elastic Kordel","pi880433228.html",12,"70");
navigation[17] = new navElem(17,"Flechtlitze","pi1633068890.html",12,"71");
navigation[18] = new navElem(18,"Gummilitze","pi-303343200.html",12,"74");
navigation[19] = new navElem(19,"Knopfloch-Elastic","pi1091489172.html",12,"66");
navigation[20] = new navElem(20,"Kräuselfaden","pi-1517078585.html",12,"72");
navigation[21] = new navElem(21,"Lycra Gummiband","pi-969135306.html",12,"73");
navigation[22] = new navElem(22,"Miederband","pi-1900270828.html",12,"78");
navigation[23] = new navElem(23,"Nahtbänder","pi1058451647.html",9,"88");
navigation[24] = new navElem(24,"Köperband","pi49734261.html",23,"87");
navigation[25] = new navElem(25,"Baumwollnahtband","pi-1557456739.html",23,"92");
navigation[26] = new navElem(26,"Klettband","pi1233748541.html",9,"198");
navigation[27] = new navElem(27,"Kordeln","pi1073301624.html",9,"111");
navigation[28] = new navElem(28,"Acetat-Kordel","pi-196076164.html",27,"112");
navigation[29] = new navElem(29,"Lurex-Kordel","pi1924215824.html",27,"113");
navigation[30] = new navElem(30,"Acetat-Jute-Kordel","pi1073305723.html",27,"114");
navigation[31] = new navElem(31,"Baumwoll-Flechtkordel","pi-1863300714.html",27,"115");
navigation[32] = new navElem(32,"PP-Gurtband","pi1623426408.html",9,"89");
navigation[33] = new navElem(33,"Schrägband","pi1001805330.html",9,"93");
navigation[34] = new navElem(34,"Verpackungsband + Zubehör","pi-1639980834.html",9,"137");
navigation[35] = new navElem(35,"Einlage","pi1096366073.html",null,"123");
navigation[36] = new navElem(36,"Volumenvlies","pi-2043114298.html",35,"124");
navigation[37] = new navElem(37,"Kreativsortiment","pi971678415.html",35,"125");
navigation[38] = new navElem(38,"Vlieseline","pi-448489372.html",35,"126");
navigation[39] = new navElem(39,"Näheinlagen","pi-2029853960.html",38,"127");
navigation[40] = new navElem(40,"Bügeleinlagen","pi963425689.html",38,"128");
navigation[41] = new navElem(41,"Gewebeeinlagen","pi-326934042.html",38,"129");
navigation[42] = new navElem(42,"Schabrackeneinlage","pi393719700.html",35,"130");
navigation[43] = new navElem(43,"Einlagebänder","pi-39965087.html",35,"171");
navigation[44] = new navElem(44,"Gardinenzubehör","pi1154433826.html",null,"167");
navigation[45] = new navElem(45,"Gardinenbänder","pi-564657831.html",44,"168");
navigation[46] = new navElem(46,"Knöpfe","pi1127232841.html",null,"5");
navigation[47] = new navElem(47,"Druckknöpfe","pi-1158045231.html",46,"28");
navigation[48] = new navElem(48,"Nähfrei","pi1055400385.html",47,"29");
navigation[49] = new navElem(49,"Annähbar","pi1830107279.html",47,"30");
navigation[50] = new navElem(50,"Wäscheknöpfe","pi-1766119057.html",46,"31");
navigation[51] = new navElem(51,"Überziehbare Knöpfe","pi1590479332.html",46,"32");
navigation[52] = new navElem(52,"Modische Knöpfe","pi1063716965.html",46,"101");
navigation[53] = new navElem(53,"Knöpfe mit Öse","pi1075919793.html",52,"181");
navigation[54] = new navElem(54,"Knöpfe mit 2 Löchern","pi-579590517.html",52,"179");
navigation[55] = new navElem(55,"Knöpfe mit 4 Löchern","pi1942726768.html",52,"180");
navigation[56] = new navElem(56,"Nähgarn","pi425282549.html",null,"13");
navigation[57] = new navElem(57,"Coats","pi1187076001.html",56,"172");
navigation[58] = new navElem(58,"Coats Epic","pi-283165769.html",57,"176");
navigation[59] = new navElem(59,"Amann","pi74957390.html",56,"175");
navigation[60] = new navElem(60,"Amann Saba","pi-1544535239.html",59,"33");
navigation[61] = new navElem(61,"Amann SabaTex","pi-1117937649.html",59,"34");
navigation[62] = new navElem(62,"Stopfgarne","pi304929290.html",59,"212");
navigation[63] = new navElem(63,"Nieten","pi1642157422.html",null,"Nieten");
navigation[64] = new navElem(64,"Ösen","pi-1557104622.html",null,"15");
navigation[65] = new navElem(65,"Polster/Watte","pi1449668800.html",null,"90");
navigation[66] = new navElem(66,"Armblätter","pi2141653562.html",65,"91");
navigation[67] = new navElem(67,"Reißverschlüsse","pi592700528.html",null,"16");
navigation[68] = new navElem(68,"Teilbar","pi1040213688.html",67,"195");
navigation[69] = new navElem(69,"Nicht teilbar","pi1482382937.html",67,"196");
navigation[70] = new navElem(70,"RV-Zubehör","pi1218539939.html",67,"190");
navigation[71] = new navElem(71,"Schnürsenkel","pi1208340715.html",null,"188");
navigation[72] = new navElem(72,"Stoffe","pi1091617446.html",null,"122");
navigation[73] = new navElem(73,"Futterstoffe","pi1056618169.html",72,"62");
navigation[74] = new navElem(74,"Patchwork&Quiltstoffe","pi-705410654.html",72,"139");
navigation[75] = new navElem(75,"Verschlüsse","pi971766893.html",null,"21");
navigation[76] = new navElem(76,"Haken, Augen, Clips","pi245028209.html",75,"193");
navigation[77] = new navElem(77,"Steckschnallen","pi-1463102870.html",75,"192");
navigation[78] = new navElem(78,"Kordelstopper","pi-1678348280.html",75,"194");
navigation[79] = new navElem(79,"Webnamenbänder","pi1271629800.html",null,"95");
navigation[80] = new navElem(80,"Büsten + Ständer","pi-1216243225.html",null,"85");
navigation[81] = new navElem(81,"Knopfanbringer","pi-771203224.html",null,"4");
navigation[82] = new navElem(82,"Kreide","pi-996609066.html",null,"6");
navigation[83] = new navElem(83,"Markierwerkzeuge","pi1098195103.html",null,"7");
navigation[84] = new navElem(84,"Messwerkzeuge","pi161846772.html",null,"8");
navigation[85] = new navElem(85,"Nadeln","pi802460645.html",null,"9");
navigation[86] = new navElem(86,"Nähnadeln","pi-1586778816.html",85,"25");
navigation[87] = new navElem(87,"Sticknadeln","pi-1784442725.html",85,"24");
navigation[88] = new navElem(88,"Stecknadeln","pi-1518486206.html",85,"23");
navigation[89] = new navElem(89,"Nähmaschinennadeln","pi764736577.html",85,"26");
navigation[90] = new navElem(90,"Haushaltnadeln","pi-63800888.html",85,"43");
navigation[91] = new navElem(91,"Sicherheitsnadeln","pi-940328389.html",85,"82");
navigation[92] = new navElem(92,"Stricknadeln","pi101536849.html",85,"132");
navigation[93] = new navElem(93,"Näh-und Stickzubehör","pi393961007.html",null,"11");
navigation[94] = new navElem(94,"Nähmaschinenzubehör","pi-670185404.html",null,"12");
navigation[95] = new navElem(95,"Nähmaschinennadeln","pi1970521207.html",94,"131");
navigation[96] = new navElem(96,"Rockabrunder","pi452863120.html",null,"17");
navigation[97] = new navElem(97,"Zubehör für Ikos Mobil","pi1114100777.html",96,"45");
navigation[98] = new navElem(98,"Zubehör für Ikos Atellier","pi-1566300314.html",96,"46");
navigation[99] = new navElem(99,"Rollschneider","pi1736822097.html",null,"18");
navigation[100] = new navElem(100,"Scheren","pi-398729922.html",null,"19");
navigation[101] = new navElem(101,"Schneideunterlagen","pi-385663588.html",null,"20");
navigation[102] = new navElem(102,"Schneidereigeräte","pi1984630236.html",null,"83");
navigation[103] = new navElem(103,"Werkzeuge","pi-310031062.html",null,"22");
navigation[104] = new navElem(104,"Aufbewahrung","pi1224593294.html",null,"191");
navigation[105] = new navElem(105,"Bücher und Kataloge","pi-1599474183.html",null,"94");
navigation[106] = new navElem(106,"Downloads","pi153493756.html",null,"178");
navigation[107] = new navElem(107,"Praktische Helfer","pi1233648759.html",null,"197");
navigation[108] = new navElem(108,"Verschiedenes","pi1099824150.html",null,"121");
navigation[109] = new navElem(109,"Großhandelshop (für Gewerbe)","http://www.rieckmann-kurzwaren.de/grosshandel",null,"160");
navigation[110] = new navElem(110,"Erfolg","pi-916114672.html",null,"170");
navigation[111] = new navElem(111,"Serviceüberblick","http://www.rieckmann-kurzwaren.de/shop/service.htm",null,"189");

// 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.html";
		};
	};
// activates entries for categories
activateItem(getParameterFromURL("categoryId"));

