var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10016", "Antitranspirante", "/antitranspirante/index.html", 1, "", 1, "");
addItem("1001", "Iontophoreseger_C3_A4tesets", "/iontophoresegeraet/index.html", 1, "", 1, "");
addItem("1009", "Idromed", "/idromed/index.html", 2, "", 1, "");
addItem("10011", "Hidrex", "/hidrex/index.html", 2, "", 1, "");
addItem("10012", "Iontophoreseger_C3_A4te", "/iontophoresegeraete/index.html", 1, "", 1, "");
addItem("1007", "Garantier_C3_BCckl_C3_A4ufer", "/garantieruecklaeufervorfuehrgeraete/index.html", 1, "", 1, "");
addItem("10013", "Zubeh_C3_B6r_X4Ersatzteile", "/zubehoer-ersatzteile/index.html", 1, "", 1, "");
addItem("1008", "Trusted_20Shops_20Versicherung", "/trusted-shops-verischerung/index.html", 1, "", 1, "");
addItem("1006", "Geld_X2zur_C3_BCck_X2Aktion", "/infos-zur-geld-zurueck-aktion/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;
		
	};
};