var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10025", "Aminos_C3_A4uren_20(12)", "/aminosaeuren-freie/index.html", 1, "", 1, "");
addItem("10046", "Amino_20Liquid_20500ml", "/seite-nicht-gefunden-404.html", 2, "", 1, "");
addItem("10045", "Amino_20Liquid_201_X3000ml", "/aminosaeuren-freie/amino-liquid-1000-ml.html", 2, "", 1, "");
addItem("10047", "AminoPur_20Powertabs", "/aminosaeuren-freie/aminopur-powertabs.html", 2, "", 1, "");
addItem("1001", "Arginin_20700_20_X2_20120_20Kapseln", "/arginin/l-arginine-700-zutaten-l-arginin-base.html", 2, "", 1, "_top");
addItem("10049", "Arginine_20_X2_20300g_20Pulver_20L_X2Arginin_20Base", "/arginin/l-arginin-pulver-zutaten-l-arginin-base.html", 2, "", 1, "");
addItem("10048", "BCAA_202000", "/aminosaeuren-freie/bcaa-2000.html", 2, "", 1, "");
addItem("1002", "Glutamin_20(3)", "/glutamin/index.html", 2, "", 1, "");
addItem("1008", "L_X2Lysin_20400_20_X2_20120_20Kapseln", "/aminosaeuren-freie/l-lysine-400-120-kapseln.html", 2, "", 1, "_top");
addItem("10060", "L_X2Lysine_20150g_20Granulat_X4Pulver", "/aminosaeuren-freie/l-lysine-150g-pulver.html", 2, "", 1, "");
addItem("10028", "Arginin_20(2)", "/arginin/index.html", 1, "", 1, "_self");
addItem("1005", "Biotin_20(1)", "/biotin/index.html", 1, "", 1, "");
addItem("100113", "Chrom_20(1)", "/chrom/index.html", 1, "", 1, "");
addItem("10029", "Creatin_20(5)", "/creatin/index.html", 1, "", 1, "");
addItem("10053", "Creatin_20Monohydrat_20500g_20Pulver", "/creatin/creatin-monohydrat.html", 2, "", 1, "");
addItem("10054", "Creatine_20800_20_X2_20200_20Kapseln", "/creatin/creatine-800-200-kapseln.html", 2, "", 1, "");
addItem("10055", "Creatine_20800_20_X2_20625_20Kapseln", "/creatin/creatine-800-625-kapseln.html", 2, "", 1, "");
addItem("10056", "ZELL_20DESIGN", "/creatin/zell-design.html", 2, "", 1, "");
addItem("1003", "Eiweiss_X2Protein_20(7)", "/eiweiss-protein/index-eiweiss.html", 1, "", 1, "");
addItem("10037", "American_20Weight_20Gain_201_X3500g", "/eiweiss-protein/weight-gaine-1350g.html", 2, "", 1, "");
addItem("10038", "American_20Weight_20Gain_205_X3000g", "/eiweiss-protein/weight-gain-4500g.html", 2, "", 1, "");
addItem("10039", "Pro85_X1_201_X3000g", "/eiweiss-protein/protein-eiweiss-pro85-1kg.html", 2, "", 1, "");
addItem("10040", "Pro85_X1_204_X3000g", "/eiweiss-protein/pro85-4000g.html", 2, "", 1, "");
addItem("10041", "Whey_20Pro_20750g", "/eiweiss-protein/whey-pro-750g.html", 2, "", 1, "");
addItem("10042", "Whey_20Pro_202_X3500g", "/eiweiss-protein/whey-pro-2500g.html", 2, "", 1, "");
addItem("10010", "Fols_C3_A4ure_20(1)", "/folsaeure/index.html", 1, "", 1, "");
addItem("10031", "Glutamin_20(3)", "/glutamin/index.html", 1, "", 1, "");
addItem("10099", "Glucosamin_20(1)", "/glucosamin/index.html", 1, "", 1, "");
addItem("100105", "Gutes_20f_C3_BCr_20Gelenke_20(1)", "/gutes-fuer-gelenke/index.html", 1, "", 1, "");
addItem("10030", "L_X2Carnitin_20und_20Fatburner_20(5)", "/carnitin/index.html", 1, "", 1, "");
addItem("10050", "L_X2Carnitine_20500_20_X2_20120_20Kapseln", "/carnitin/l-carnitine-500-120-kapseln.html", 2, "", 1, "");
addItem("10051", "L_X2Carnitine_20500_20_X2_2080_20Kapseln", "/carnitin/l-carnitine-500-80-kapseln.html", 2, "", 1, "");
addItem("10052", "L_X2Carnitine_20Liquid_20_X2_20500ml", "/carnitin/l-carnitine-liquid-500ml.html", 2, "", 1, "");
addItem("10032", "Lysin_20(2)", "/lysin/index.html", 1, "", 1, "");
addItem("10043", "L_X2Lysine_20400_20_X2_20120_20Kapseln", "/aminosaeuren-freie/l-lysine-400-120-kapseln.html", 2, "", 1, "");
addItem("10044", "L_X2Lysine_20_X2_20150g_20Granulat", "/aminosaeuren-freie/l-lysine-150g-pulver.html", 2, "", 1, "");
addItem("100101", "Magnesium_20(1)", "/magnesium/index.html", 1, "", 1, "");
addItem("100116", "Methionin_20(1)", "/methionin/index.html", 1, "", 1, "");
addItem("100104", "Mineralstoffe_20(2)", "/mineralstoffe/index.html", 1, "", 1, "");
addItem("100115", "Phenylalanin_20(1)", "/phenylalanin/phenylalanin-dlpa-dl-phenylalanin.html", 1, "", 1, "");
addItem("100110", "Protein_20PRO85_20PLUS_20(3)", "/protein-pro85-plus/index.html", 1, "", 1, "");
addItem("100117", "Pyruvat_20(1)", "/pyruvat/pyruvat-plus.html", 1, "", 1, "");
addItem("100119", "Taurin_20(1)", "/taurin/taurin-750-120-kapseln-880mg-inhalt-pro.html", 1, "", 1, "");
addItem("10034", "Tribulus_20(1)", "/tribulus/bierstedt-tribulus-590-info.html", 1, "", 1, "");
addItem("100118", "Tyrosin_20(2)", "/tyrosin/index.html", 1, "", 1, "");
addItem("100106", "Vitalit_C3_A4t_20(3)", "/vitalitaet/index.html", 1, "", 1, "");
addItem("100107", "Weight_20Gainer_20(4)", "/weight-gainer/index.html", 1, "", 1, "");
addItem("100108", "Whey_20Protein_20(2)", "/whey-protein/index.html", 1, "", 1, "");
addItem("100100", "Zink_20(1)", "/zink/index.html", 1, "", 1, "");
addItem("10081", "Zubeh_C3_B6r_20(1)", "/trainings-zubehoer/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;
		
	};
};