var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Alepp_20Naturkosmetik", "/alepp/index.html", 1, "", 1, "");
addItem("1002", "Naturseifen", "/alepp/naturseifen/index.html", 2, "", 1, "");
addItem("1005", "Naturblock", "/alepp/naturseifen/naturblock/index.html", 3, "", 1, "");
addItem("1004", "Fl_C3_BCssigseife", "/alepp/naturseifen/fluessigseife/index.html", 3, "", 1, "");
addItem("1006", "Formseife", "/alepp/naturseifen/formseife/index.html", 3, "", 1, "");
addItem("1007", "Mini_20G_C3_A4steseifen", "/http://www.natur-lädchen.de/index.php/de/Mini-Gaesteseife-Alepp-Naturkosmetik/l-KAT18", 3, "", 1, "_self");
addItem("1003", "Natur_20Cremes", "/http://www.natur-lädchen.de/index.php/de/Naturcremes-Alepp-Naturkosmetik/l-KAT19", 2, "", 1, "_self");
addItem("1008", "Wellness_X2Produkte", "/alepp/wellness-produkte/index.html", 2, "", 1, "");
addItem("10014", "Schwarzwaldkosmetik", "/schwarzwaldkosmetik/index.html", 1, "", 1, "");
addItem("10015", "Styx_20Naturkosmetik", "/styx-naturkosmetik/index.html", 1, "", 1, "");
addItem("10017", "Rosengarten_20Naturkosmetik", "/styx-naturkosmetik/rosengarten-naturkosmetik/index.html", 2, "", 1, "");
addItem("10040", "Rosengarten_20Reisegr_C3_B6_C3_9Fen", "/styx-naturkosmetik/rosengarten-naturkosmetik/rosengarten-reisegroessen/index.html", 3, "", 1, "");
addItem("10021", "Stutenmilch_20Naturkosmetik", "/styx-naturkosmetik/stutenmilch-naturkosmetik/index.html", 2, "", 1, "");
addItem("10019", "Moor_20Naturkosmetik", "/styx-naturkosmetik/moor-naturkosmetik/index.html", 2, "", 1, "");
addItem("10026", "Aromatherapie", "/styx-naturkosmetik/aromatherapie/index.html", 2, "", 1, "");
addItem("10042", "Aromatherapie_20Reisegr_C3_B6_C3_9Fen", "/styx-naturkosmetik/aromatherapie/aromatherapie-reisegroessen/index.html", 3, "", 1, "");
addItem("10038", "Black_20Sea_20Sportswear", "/nn-sports/index.html", 1, "", 1, "_self");
addItem("10039", "Badeanz_C3_BCge", "/nn-sports/badeanzuege/index.html", 2, "black-sea-logo.png", 1, "");
addItem("10041", "Bundle_20Angebote", "/bundle-angebote/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;
		
	};
};