var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Orlux_20Futter_20(47)", "/pi1/index.html", 1, "", 1, "");
addItem("1002", "Witte_20Molen_20(15)", "/pi2/index.html", 1, "", 1, "");
addItem("1003", "Bogena_20und_20Aleckwa_20(21)", "/pi3/index.html", 1, "", 1, "");
addItem("1004", "CeDe_20(26)", "/pi4/index.html", 1, "", 1, "");
addItem("1005", "Nester_20und_20Nistmaterial_20(21)", "/pi5/index.html", 1, "", 1, "");
addItem("1006", "Exotenk_C3_B6rbchen_20u_X3_20Nistkasten_20(11)", "/pi6/index.html", 1, "", 1, "");
addItem("1007", "Nistkasten_20f_C3_BCr_20WS_20und_20GS_20(21)", "/pi7/index.html", 1, "", 1, "");
addItem("1008", "Vogeltransport_X2_20und_20Versandkisten_20(7)", "/pi8/index.html", 1, "", 1, "");
addItem("1009", "Kalk_X2_20und_20Mineralbl_C3_B6cke_20(12)", "/pi9/index.html", 1, "", 1, "");
addItem("10029", "Raubmilben_20(3)", "/pi29/index.html", 1, "", 1, "");
addItem("10010", "Insektensprays_20u_X3_20Desinfektionsmittel_20(6)", "/pi10/index.html", 1, "", 1, "");
addItem("10011", "Futtern_C3_A4pfe_20u_X3_20Tr_C3_A4nken_20(10)", "/pi11/index.html", 1, "", 1, "");
addItem("10013", "Vitaminpreperate_20(11)", "/pi13/index.html", 1, "", 1, "");
addItem("10014", "K_C3_B6rnermischungen_20f_C3_BCr_20Sittiche_20(16)", "/pi14/index.html", 1, "", 1, "");
addItem("10017", "Futtermischung_20f_C3_BCr_20Exoten_20(4)", "/pi17/index.html", 1, "", 1, "");
addItem("10018", "Futtermischung_20f_C3_BCr_20Kanarien_20(4)", "/pi18/index.html", 1, "", 1, "");
addItem("10019", "Futtermischungen_20f_C3_BCr_20Waldv_C3_B6gel_20(8)", "/pi19/index.html", 1, "", 1, "");
addItem("10022", "Futter_20f_C3_BCr_20Kreuzschn_C3_A4bel_20(8)", "/pi22/index.html", 1, "", 1, "");
addItem("10020", "Zeisig_20und_20Finken_20Futter_20(34)", "/pi20/index.html", 1, "", 1, "");
addItem("10021", "Stieglitz_20Major_20(8)", "/pi21/index.html", 1, "", 1, "");
addItem("10023", "Keimfutter_20(11)", "/pi23/index.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;
		
	};
};