//
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\">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="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,"Digitalkameras","pi-816415436.htm",null,"01");
navigation[1] = new navElem(1,"Canon","pi456275323.htm",0,"00214");
navigation[2] = new navElem(2,"IXUS Digital","pi1616185704.htm",1,"can-ixus");
navigation[3] = new navElem(3,"POWERSHOT","pi-1486481591.htm",1,"can-poshot");
navigation[4] = new navElem(4,"EOS","pi1231577107.htm",1,"can-refl");
navigation[5] = new navElem(5,"Nikon","pi-1910791135.htm",0,"65214");
navigation[6] = new navElem(6,"Coolpix","pi-1821772456.htm",5,"nik-komp");
navigation[7] = new navElem(7,"D - Spiegelreflex","pi-1173540743.htm",5,"nik-refl");
navigation[8] = new navElem(8,"Nikon 1","pi1316675676.htm",5,"nik1");
navigation[9] = new navElem(9,"Sony","pi-2108038484.htm",0,"63205");
navigation[10] = new navElem(10,"CyberShot","pi569061323.htm",9,"komp");
navigation[11] = new navElem(11,"Alpha","pi2131216560.htm",9,"refle");
navigation[12] = new navElem(12,"SLT Kameras","pi1353272521.htm",11,"so-slt");
navigation[13] = new navElem(13,"Nex","pi-1291609584.htm",11,"so-evi");
navigation[14] = new navElem(14,"Olympus","pi-208568370.htm",0,"63250");
navigation[15] = new navElem(15,"Kompaktkameras","pi1138464030.htm",14,"oly-komp");
navigation[16] = new navElem(16,"Spiegelreflex","pi1729243719.htm",14,"oly-ref");
navigation[17] = new navElem(17,"PEN-EVIL Serie","pi1690931243.htm",14,"oly-penser");
navigation[18] = new navElem(18,"PEN","pi1309958762.htm",17,"oly_pen");
navigation[19] = new navElem(19,"PEN LITE","pi-182815064.htm",17,"oly-penl");
navigation[20] = new navElem(20,"PEN MINI","pi1044499337.htm",17,"oly-penm");
navigation[21] = new navElem(21,"Samsung","pi1048149901.htm",0,"5214");
navigation[22] = new navElem(22,"Kompaktkameras","pi1606129304.htm",21,"sams-komp");
navigation[23] = new navElem(23,"Panasonic ","pi-1263883493.htm",0,"pana");
navigation[24] = new navElem(24,"Lumix Kompaktkameras","pi543295934.htm",23,"pan-komp");
navigation[25] = new navElem(25,"Lumix G - Serie","pi1150876625.htm",23,"pan-refl");
navigation[26] = new navElem(26,"Leica","pi1069753152.htm",0,"leica-1");
navigation[27] = new navElem(27,"Kompaktkameras","pi29633772.htm",26,"lei-komp");
navigation[28] = new navElem(28,"Reflex","pi-1127948344.htm",26,"lei-refl");
navigation[29] = new navElem(29,"Fuji","pi-152663241.htm",0,"54125");
navigation[30] = new navElem(30,"Finepix","pi-1093940742.htm",29,"fujkomp");
navigation[31] = new navElem(31,"Zubehör","pi1482627030.htm",29,"fujizu");
navigation[32] = new navElem(32,"Objektive","pi-1679452346.htm",null,"03");
navigation[33] = new navElem(33,"Canon","pi-1546992813.htm",32,"0214");
navigation[34] = new navElem(34,"Nikon","pi-191150663.htm",32,"632");
navigation[35] = new navElem(35,"AF-S Serie","pi-596013834.htm",34,"nik-af");
navigation[36] = new navElem(36,"1 System","pi-444413121.htm",34,"nik1syst");
navigation[37] = new navElem(37,"Sony","pi1554264241.htm",32,"son");
navigation[38] = new navElem(38,"Alpha Serie","pi1317741718.htm",37,"alph");
navigation[39] = new navElem(39,"Nex Serie","pi-1999359393.htm",37,"anex");
navigation[40] = new navElem(40,"Olympus","pi970834118.htm",32,"zuiko");
navigation[41] = new navElem(41,"Leica","pi1173334241.htm",32,"leitz");
navigation[42] = new navElem(42,"Sigma","pi-108136830.htm",32,"0032");
navigation[43] = new navElem(43,"Canon EOS","pi-1597736113.htm",42,"00031");
navigation[44] = new navElem(44,"Nikon AF","pi1949838869.htm",42,"00033");
navigation[45] = new navElem(45,"Sony/Minolta-AF","pi-1587803702.htm",42,"min");
navigation[46] = new navElem(46,"Tamron","pi1068448019.htm",32,"0-111");
navigation[47] = new navElem(47,"Canon","pi1201934392.htm",46,"tamcan");
navigation[48] = new navElem(48,"Nikon","pi-194434599.htm",46,"tamnik");
navigation[49] = new navElem(49,"Sony-Minolta","pi1800753446.htm",46,"tamson");
navigation[50] = new navElem(50,"Pentax AF","pi945888777.htm",46,"tam-pent");
navigation[51] = new navElem(51,"Blitzgeräte","pi-1014564942.htm",null,"04");
navigation[52] = new navElem(52,"Canon","pi-457661909.htm",51,"625");
navigation[53] = new navElem(53,"Nikon","pi2073337937.htm",51,"6525");
navigation[54] = new navElem(54,"Sony","pi1137565203.htm",51,"so");
navigation[55] = new navElem(55,"Olympus","pi929211111.htm",51,"4524");
navigation[56] = new navElem(56,"Metz","pi1703135711.htm",51,"3");
navigation[57] = new navElem(57,"Sigma","pi266248268.htm",51,"Sig");
navigation[58] = new navElem(58,"Studioblitzgeräte","pi1169034182.htm",51,"studio");
navigation[59] = new navElem(59,"Multiblitz","pi833353167.htm",58,"multi");
navigation[60] = new navElem(60,"Multiblitz Set Angebote","pi1169641169.htm",59,"multiset");
navigation[61] = new navElem(61,"Multiblitz Blitzanlagen ","pi1506194840.htm",59,"multieinzl");
navigation[62] = new navElem(62,"Zubehör","pi1217944890.htm",51,"zu");
navigation[63] = new navElem(63,"Speicherkarten","pi-1815906741.htm",null,"05");
navigation[64] = new navElem(64,"Sandisk","pi-654391913.htm",63,"sandisk");
navigation[65] = new navElem(65,"SD","pi-938143225.htm",64,"Smiley3");
navigation[66] = new navElem(66,"Compact Flash","pi-1123129972.htm",64,"Smiley");
navigation[67] = new navElem(67,"Kingston - LEXAR","pi2022618854.htm",63,"kinst");
navigation[68] = new navElem(68,"SD-Karten","pi636326453.htm",67,"king-sd");
navigation[69] = new navElem(69,"Sony Memory Stick","pi1107812756.htm",63,"Smiley5");
navigation[70] = new navElem(70,"Memory Stick","pi1223616297.htm",69,"so-mesti");
navigation[71] = new navElem(71,"Olympus","pi-1046900486.htm",63,"Smiley6");
navigation[72] = new navElem(72,"Zubehör","pi1312710878.htm",null,"3255");
navigation[73] = new navElem(73,"Filter","pi1173448475.htm",72,"bw");
navigation[74] = new navElem(74,"Hoya Filter","pi1167810214.htm",73,"hoy");
navigation[75] = new navElem(75,"UV - Filter","pi-1267935323.htm",74,"uv");
navigation[76] = new navElem(76,"Cirkular Pol","pi-249551358.htm",74,"pol");
navigation[77] = new navElem(77,"B.I.G. Filter","pi1318239154.htm",73,"bigfil");
navigation[78] = new navElem(78,"B.I.G. Schutzfilter","pi-1109094096.htm",77,"bigclea");
navigation[79] = new navElem(79,"B.I.G. UV-Filter","pi-1762858421.htm",77,"biguv");
navigation[80] = new navElem(80,"B.I.G. Polfilter Zirkular","pi396273009.htm",77,"bigpol");
navigation[81] = new navElem(81,"B.I.G. Sterneffekt","pi1318255436.htm",77,"big6stern");
navigation[82] = new navElem(82,"Canon","pi-2138838468.htm",72,"65858");
navigation[83] = new navElem(83,"Akku","pi1312440861.htm",82,"ca-akk");
navigation[84] = new navElem(84,"Griffe","pi-840717030.htm",82,"ca-gri");
navigation[85] = new navElem(85,"Nikon","pi1154001495.htm",72,"niko");
navigation[86] = new navElem(86,"Akku","pi1118567670.htm",85,"ni-akk");
navigation[87] = new navElem(87,"Griffe","pi755006271.htm",85,"ni-gri");
navigation[88] = new navElem(88,"Sonnenblenden","pi284686712.htm",85,"niksonn");
navigation[89] = new navElem(89,"Olympus","pi-874339965.htm",72,"65284");
navigation[90] = new navElem(90,"Akku","pi-732556327.htm",89,"oly-akk");
navigation[91] = new navElem(91,"Griffe","pi573993766.htm",89,"oly-gri");
navigation[92] = new navElem(92,"Sony","pi-1076894896.htm",72,"32");
navigation[93] = new navElem(93,"Alpha-Serie","pi1183527533.htm",92,"soalph");
navigation[94] = new navElem(94,"GENUS","pi1316186373.htm",72,"gen");
navigation[95] = new navElem(95,"3D-RIG","pi1659106274.htm",94,"3dri");
navigation[96] = new navElem(96,"FOLLOWFOCUS","pi1316243658.htm",94,"followf");
navigation[97] = new navElem(97,"MATTEBOXES","pi1316245664.htm",94,"MBOXs");
navigation[98] = new navElem(98,"Novoflex","pi1183975140.htm",72,"novo");
navigation[99] = new navElem(99,"Helios Reflektoren","pi-880803964.htm",72,"hel-ref");
navigation[100] = new navElem(100,"Hähnel","pi1156861633.htm",72,"hähn");
navigation[101] = new navElem(101,"Kamera Plattform","pi1174651604.htm",72,"pod");
navigation[102] = new navElem(102,"Peli ","pi1879090238.htm",72,"pel");
navigation[103] = new navElem(103,"Hama","pi1128327462.htm",72,"ham");
navigation[104] = new navElem(104,"Metz","pi-1156843646.htm",72,"0211");
navigation[105] = new navElem(105,"Ewa Marine ","pi1245749758.htm",72,"ewa");
navigation[106] = new navElem(106,"Leica Projektionsobjektive","pi-608943475.htm",72,"lei-2");
navigation[107] = new navElem(107,"Video Digital","pi-452456079.htm",null,"06");
navigation[108] = new navElem(108,"Canon","pi-1073236643.htm",107,"852");
navigation[109] = new navElem(109,"Sony","pi-192123046.htm",107,"745");
navigation[110] = new navElem(110,"Taschen - Cases","pi345589183.htm",null,"12");
navigation[111] = new navElem(111,"Tamrac ","pi1139389155.htm",110,"Tamra");
navigation[112] = new navElem(112,"Lowepro","pi-410457045.htm",110,"2545");
navigation[113] = new navElem(113,"Canon","pi1218011483.htm",110,"cata");
navigation[114] = new navElem(114,"B&W-OUTDOORCASES","pi1305538807.htm",110,"B&WCases");
navigation[115] = new navElem(115,"ThinkTankPhoto","pi1306331328.htm",110,"THTANK");
navigation[116] = new navElem(116,"Kalahari","pi1317633601.htm",110,"kala");
navigation[117] = new navElem(117,"Stative","pi1452991714.htm",null,"13");
navigation[118] = new navElem(118,"Manfrottostative","pi-830210078.htm",117,"manfro");
navigation[119] = new navElem(119,"Stativköpfe","pi-1660467802.htm",118,"manfkop");
navigation[120] = new navElem(120,"Velbon","pi1864643815.htm",117,"velb");
navigation[121] = new navElem(121,"Joby","pi1188974703.htm",117,"gori");
navigation[122] = new navElem(122,"Beamer - Projektor","pi-2093026895.htm",null,"mm-projekt");
navigation[123] = new navElem(123,"Drucker","pi426709052.htm",null,"09");
navigation[124] = new navElem(124,"Druckerpapier","pi1069141942.htm",null,"papier-1");
navigation[125] = new navElem(125,"Scanner","pi1303283896.htm",null,"scan01");
navigation[126] = new navElem(126,"Unterwasser Gehäuse","pi1280922647.htm",null,"uwgeh");
navigation[127] = new navElem(127,"Canon Kompaktkameras","pi-2147454452.htm",126,"canuw");
navigation[128] = new navElem(128,"Canon Video","pi-1260468490.htm",126,"canuwvideo");
navigation[129] = new navElem(129,"Olympus","pi764072989.htm",126,"oluwref");
navigation[130] = new navElem(130,"Speichersticks","pi1272265098.htm",null,"3001");
navigation[131] = new navElem(131,"Transcend","pi380442947.htm",130,"30002");
navigation[132] = new navElem(132,"Kartenlesegerät","pi-1915016215.htm",null,"65014");
navigation[133] = new navElem(133,"Green Clean","pi1895626500.htm",null,"GREENCLEAN");
navigation[134] = new navElem(134,"Sofortbildkameras","pi-2014352739.htm",null,"Sofbika");
navigation[135] = new navElem(135,"Ferngläser","pi-180982878.htm",null,"ferngl");
navigation[136] = new navElem(136,"Nikon","pi1192253603.htm",135,"nifer");
navigation[137] = new navElem(137,"Canon","pi1732380328.htm",135,"canfer");
navigation[138] = new navElem(138,"Leica","pi1281086905.htm",135,"leifern");
navigation[139] = new navElem(139,"Bücher","pi-846661817.htm",null,"buch-1");
navigation[140] = new navElem(140,"Gutscheine","pi970430746.htm",null,"gs");
navigation[141] = new navElem(141,"Olympus Fotostation","pi1173770254.htm",null,"ol");
navigation[142] = new navElem(142,"Digital Ausarbeitungspreise","pi1114495931.htm",null,"Foto");
navigation[143] = new navElem(143,"Anfahrtsweg/Lageplan","pi1066986390.htm",null,"Anfahrt");
navigation[144] = new navElem(144,"Firmenlinks","pi-1360492192.htm",null,"link");

// 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"));


