var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Gesundheit_X2Wohlbefinden_20(6)", "/pi1/index.html", 1, "", 1, "");
addItem("10019", "Wellness_20_X7_20Vitalit_C3_A4t_20(8)", "/pi1/pi19/index.html", 2, "", 1, "");
addItem("1006", "Belebung_X2Einreibungen_20(12)", "/pi1/pi6/index.html", 2, "", 1, "");
addItem("10025", "Natursalben_20_X4_20Cremen_20(4)", "/pi1/pi31/index.html", 2, "", 1, "");
addItem("1002", "K_C3_B6rperpflege_X2Wellness_20(14)", "/pi2/index.html", 1, "", 1, "");
addItem("1009", "Shampoo_X2Haarpflege_20(6)", "/pi2/pi9/index.html", 2, "", 1, "");
addItem("1007", "Duchgel_X2B_C3_A4der_20(10)", "/pi2/pi7/index.html", 2, "", 1, "");
addItem("1008", "Honigseifen_20(8)", "/pi2/pi8/index.html", 2, "", 1, "");
addItem("10013", "Lebensmittel_X2S_C3_BC_C3_9Fwaren_20(6)", "/pi13/index.html", 1, "", 1, "");
addItem("10023", "Honigwein_X2Schnaps_20(9)", "/pi13/pi29/index.html", 2, "", 1, "");
addItem("10024", "Bienenprodukte_20(6)", "/pi30/index.html", 1, "", 1, "");
addItem("10010", "Propolis_X2Gelee_20Royale_20(5)", "/pi30/pi10/index.html", 2, "", 1, "");
addItem("10011", "Bienenwachskerzen_20(6)", "/pi30/pi11/index.html", 2, "", 1, "");
addItem("10020", "Geschenkideen", "/http://members.aon.at/bienen-korb", 2, "", 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;
		
	};
};