var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1004", "Vitalstoffe", "/nahrungsergaenzung/index.html", 1, "", 1, "");
addItem("10022", "Natursubstanzen_20(33)", "/nahrungsergaenzung/natursubstanzen_merimed/index.html", 2, "", 1, "");
addItem("10023", "ChinaVitalmed_20(10)", "/nahrungsergaenzung/china-vitalmed/index.html", 2, "", 1, "");
addItem("10032", "Kr_C3_A4uter_X2_20und_20Blumenessenzen_20(10)", "/nahrungsergaenzung/schlangenberg-essenzen/index.html", 2, "", 1, "");
addItem("10035", "Gelenke_20(3)", "/nahrungsergaenzung/gelenke/index.html", 2, "", 1, "");
addItem("10041", "Feel_20Good_20(1)", "/nahrungsergaenzung/feel-good/index.html", 2, "", 1, "");
addItem("1002", "Therapieger_C3_A4te", "/scenar_tefra_magnetfeld/index.html", 1, "", 1, "");
addItem("10013", "Magnetfeldtherapie", "/scenar_tefra_magnetfeld/magnetfeldtherapie/index.html", 2, "", 1, "");
addItem("10016", "Celine_20(16)", "/scenar_tefra_magnetfeld/magnetfeldtherapie/celine/index.html", 3, "", 1, "");
addItem("10019", "Q_20R_20S_20(1)", "/scenar_tefra_magnetfeld/magnetfeldtherapie/q-r-s/index.html", 3, "", 1, "");
addItem("10020", "Schober", "/scenar_tefra_magnetfeld/magnetfeldtherapie/schober/index.html", 3, "", 1, "");
addItem("10033", "B_X23000_20(2)", "/scenar_tefra_magnetfeld/magnetfeldtherapie/b-3000/index.html", 3, "", 1, "");
addItem("10037", "RhinoBeam_20(1)", "/scenar_tefra_magnetfeld/magnetfeldtherapie/rhinobeam/index.html", 3, "", 1, "");
addItem("10014", "SCENAR_20(Niederfreqenz)_20(7)", "/scenar_tefra_magnetfeld/scenar/index2.html", 2, "", 1, "");
addItem("10038", "TEFRA_20(Hochfrequenz)_20(7)", "/scenar_tefra_magnetfeld/scenar/tefra-hochfrequenz/index.html", 2, "", 1, "");
addItem("10015", "Osmotic_20W_C3_A4rme_20(1)", "/scenar_tefra_magnetfeld/osmotic/index.html", 2, "", 1, "");
addItem("1001", "Entschlackung", "/elektrolyse-fussbad/index.html", 1, "", 1, "");
addItem("10011", "Meditox_20(15)", "/elektrolyse-fussbad/meditox/index.html", 2, "", 1, "");
addItem("10031", "Medec_20Detox_20_X4_20activ_20detox_20(6)", "/elektrolyse-fussbad/medec/index.html", 2, "", 1, "");
addItem("10012", "froximun_20(6)", "/elektrolyse-fussbad/froximun/index.html", 2, "", 1, "");
addItem("1006", "Diagnostik", "/diagnostik/index.html", 1, "", 1, "");
addItem("10026", "VICTOR_20(1)", "/diagnostik/victor/index.html", 2, "", 1, "");
addItem("10036", "EquiBalance_20(1)", "/diagnostik/equibalance/index.html", 2, "", 1, "");
addItem("1005", "Sauerstoff", "/sauerstoff/index.html", 1, "", 1, "");
addItem("10024", "Sauerstofftherapie_20(2)", "/sauerstoff/sauerstofftherapie/index.html", 2, "", 1, "");
addItem("10025", "Raumioner_20(1)", "/sauerstoff/raumioner/index.html", 2, "", 1, "");
addItem("1007", "Wellness", "/activ-life/index.html", 1, "", 1, "");
addItem("10028", "Wasser_X2Aufbereitung_20(4)", "/activ-life/wasserfilteranlagen/index.html", 2, "", 1, "");
addItem("10029", "M_20B_20T_20(1)", "/activ-life/m-b-t/index.html", 2, "", 1, "");
addItem("10030", "Slimis_20(1)", "/activ-life/slimis/index.html", 2, "", 1, "");
addItem("10040", "Hautpflege_20_X7_20K_C3_B6rperpflege_20(14)", "/activ-life/pflege/index.html", 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;
		
	};
};