var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10037", "Annemarie_20B_C3_B6rlind_20_X2_20Produktphilosophie", "/annemarie-boerlind-produktphilosophie/index.html", 1, "", 1, "");
addItem("1001", "BOERLIND", "/boerlind/index.html", 1, "", 1, "");
addItem("1005", "NatuRoyale", "/boerlind/naturoyale/index.html", 2, "", 1, "");
addItem("1006", "LL_20Regeneration", "/boerlind/ll-regeneration/index.html", 2, "", 1, "");
addItem("1007", "system_20absolute", "/boerlind/system-absolute/index.html", 2, "", 1, "");
addItem("10019", "CERAMIDE_20_X7_20NATURSOME_20_X7_20NATUREPAIR", "/boerlind/ceramide-natursome/index.html", 2, "", 1, "");
addItem("10015", "Rosentau", "/boerlind/rosentau/index.html", 2, "", 1, "");
addItem("10014", "ZZ_20sensitive", "/boerlind/zz-sensitive/index.html", 2, "", 1, "");
addItem("10013", "Z_20_X7_20ZZ", "/boerlind/z-zz/index.html", 2, "", 1, "");
addItem("10012", "Mischhaut", "/boerlind/mischhaut/index.html", 2, "", 1, "");
addItem("10010", "teenCare", "/boerlind/purifing-care/index.html", 2, "", 1, "");
addItem("10016", "Bodylind", "/boerlind/bodylind/index.html", 2, "", 1, "");
addItem("10017", "Haarpflege", "/boerlind/haarpflege/index.html", 2, "", 1, "");
addItem("10018", "Spezialpflege", "/boerlind/spezialpflege/index.html", 2, "", 1, "");
addItem("10020", "For_20Men", "/boerlind/for-men/index.html", 2, "", 1, "");
addItem("10021", "Puravera_20Colours", "/boerlind/puravera-colours/index.html", 2, "", 1, "");
addItem("10036", "Dekorative_20Kosmetik", "/boerlind/dekorative-kosmetik/index.html", 2, "", 1, "");
addItem("1002", "TAUTROPFEN", "/tautropfen/index.html", 1, "", 1, "");
addItem("1008", "Sanddorn", "/tautropfen/sanddorn/index.html", 2, "", 1, "");
addItem("10022", "Rosentau", "/tautropfen/rosentau/index.html", 2, "", 1, "");
addItem("10023", "Wascherde", "/tautropfen/wascherde/index.html", 2, "", 1, "");
addItem("10024", "Special_20Care", "/tautropfen/spezial-pflege/index.html", 2, "", 1, "");
addItem("10025", "AMALUR", "/tautropfen/amalur/index.html", 2, "", 1, "");
addItem("10026", "CHARISMA", "/tautropfen/charisma/index.html", 2, "", 1, "");
addItem("1003", "DADO_X2SENS", "/dado-sens/index.html", 1, "", 1, "");
addItem("1009", "regeneration_20E", "/dado-sens/regeneration-e/index.html", 2, "", 1, "");
addItem("10030", "ProBalance", "/dado-sens/probalance/index.html", 2, "", 1, "");
addItem("10029", "Ectoin", "/dado-sens/ectoin/index.html", 2, "", 1, "");
addItem("10027", "Extroderm", "/dado-sens/extroderm/index.html", 2, "", 1, "");
addItem("10028", "PurDerm", "/dado-sens/purderm/index.html", 2, "", 1, "");
addItem("1004", "FAQ", "/faq/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;
		
	};
};