var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10028", "Angelstuhl_20_X7_20Liege_20(7)", "/pi44/pi28.html", 1, "", 1, "");
addItem("1006", "Angeltasche_20_X7_20Bag_20(7)", "/pi9/pi6.html", 1, "", 1, "");
addItem("10020", "Baits_20_X1_20Boilie_20(16)", "/pi33/pi20.html", 1, "", 1, "");
addItem("1007", "Kleinteile_20f_C3_BCr_20Rigs_20(6)", "/pi29/pi7.html", 1, "", 1, "");
addItem("10027", "PVA_20Bag_20_X7_20Schnur_20(3)", "/pi45/pi27.html", 1, "", 1, "");
addItem("10021", "Angelblei_20_X1_20Knetblei_20(6)", "/pi24/pi21.html", 1, "", 1, "");
addItem("10029", "Netze_20_X7_20Kescher_20(7)", "/pi37/pi29.html", 1, "", 1, "");
addItem("10018", "Kocher_20_X7_20Zubeh_C3_B6r_20(11)", "/pi42/pi18.html", 1, "", 1, "");
addItem("10030", "Solar_20_X1_20Licht_20(10)", "/pi39/pi30.html", 1, "", 1, "");
addItem("10017", "Messer_20_X7_20Tools_20(6)", "/pi20/pi17.html", 1, "", 1, "");
addItem("10015", "M_C3_BCckenschutz_20(2)", "/pi18/pi15.html", 1, "", 1, "");
addItem("1009", "Owner_20_X1_20Boiliehaken_20(11)", "/pi12/pi9.html", 1, "", 1, "");
addItem("10023", "Pod_20_X7_20Futteral_20(8)", "/pi43/pi23.html", 1, "", 1, "");
addItem("1004", "Schlafs_C3_A4cke_20(3)", "/pi7/pi4.html", 1, "", 1, "");
addItem("1008", "Vorfach_20_X7_20Monofil_20(10)", "/pi30/pi8.html", 1, "", 1, "");
addItem("10013", "Tacklebox_20(6)", "/pi31/pi13.html", 1, "", 1, "");
addItem("1005", "Vorfachtaschen_20(6)", "/pi8/pi5.html", 1, "", 1, "");
addItem("10011", "Zeltzubeh_C3_B6r_20(6)", "/pi41/pi11.html", 1, "", 1, "");
addItem("10022", "Zelt_20oder_20Bivvy_20(11)", "/pi34/pi22.html", 1, "", 1, "");
addItem("10031", "Funk_20_X1_20Bissanzeiger_20(5)", "/pi40/pi31.html", 1, "", 1, "");
};

var m_sSelectedOptionValue = '0';
function printCatnavDropdown(){
	document.write('<select id="catdropdown" style="width:100%"></select>');
	SMShop.base.addMember("CatnavDropdown");
};

function CatnavDropdown_windowOnLoad(args){
	var oItems = g_oPopupMenu.selectItems(0, true);
	var selCatDropDown = $('catdropdown'),oOption = null, sDepth = '';

	if(m_sSelectedOptionValue == '0'){
		oOption = selCatDropDown[selCatDropDown.length] = new Option();
		with(oOption){
			selected='selected';
			text='<Warengruppen>';
			value = '0';
		}
	};

	oItems.each(function(oItem) {
		sDepth = ''; for(var i=1;i<parseInt(oItem.depth);i++) sDepth += '-';
		oOption = selCatDropDown[selCatDropDown.length] = new Option();
		with(oOption){
			if(oItem.id == m_sSelectedOptionValue) selected = 'selected';
			text = sDepth + ' ' + oItem.caption;
			value = oItem.id;
		}}
	);

	selCatDropDown.onchange = function(){
		var oItem = g_oPopupMenu.selectSingleItem(this.value);
		
		location.href = SMOMAbsoluteRootURL + oItem.url;
		
	};
};