var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Fliesen,Stein,Klinker,Naturstein_20reinigen,_20pflegen_20und_20sch_C3_BCtzen_20(22)", "/fliesensteinklinkernaturstein-reinigen-pflegen-und-schuetzen/fliesen-stein.html", 1, "", 1, "");
addItem("1002", "Graffiti_20Beseitigung_20und_20Schutz_20(7)", "/graffiti-beseitigung-und-schutz/graffitientfernung.html", 1, "", 1, "");
addItem("1003", "Haus_20_X7_20Wohnbereich_20(17)", "/haus-garten/haus-und-wohnen.html", 1, "", 1, "");
addItem("1006", "K_C3_BCche_20(17)", "/kueche/index.html", 1, "", 1, "");
addItem("1007", "Sanit_C3_A4r_20(10)", "/sanitaer/index.html", 1, "", 1, "");
addItem("10015", "Garten_X2_20u_X3_20Au_C3_9Fenbereich_20(18)", "/garten-und-aussenbereich/garten-aussenbereich.html", 1, "", 1, "");
addItem("1008", "Textilien_20(6)", "/textilien/teppichboden.html", 1, "", 1, "");
addItem("1004", "Holz_20im_20Garten_20(2)", "/holz-im-garten/index.html", 1, "", 1, "");
addItem("10014", "Auto,_20KFZ,Werkstatt_20(19)", "/auto-kfzwerkstatt/index.html", 1, "", 1, "");
addItem("1005", "Kleb_X2_20und_20Dichtstoffe_20(6)", "/kleb-und-dichtstoffe/index.html", 1, "", 1, "");
addItem("1009", "Nano_X2Technologie_20(2)", "/nano-technologie/nano.html", 1, "", 1, "");
addItem("10010", "Reinigungssprays_20(6)", "/reinigungssprays/index.html", 1, "", 1, "");
addItem("10011", "Handpflege_20(2)", "/handpflege/index.html", 1, "", 1, "");
addItem("10020", "Desinfektion_20(4)", "/desinfektion/index.html", 1, "", 1, "");
addItem("10012", "Profi_X2Reinigungs_X2Chemie_20(9)", "/profi-sortiment/profireinigungsmittel.html", 1, "", 1, "");
addItem("10013", "Zubeh_C3_B6r_20und_20Maschinen_20(1)", "/zubehoer-und-maschinen/index.html", 1, "", 1, "");
addItem("10016", "Beduftungsger_C3_A4te_20(12)", "/beduftungsgeraete/raumluftoptimierung.html", 1, "", 1, "");
addItem("10017", "Dufte_20D_C3_BCfte_20Aerosol_X2Dispenser_20(6)", "/dufte-duefte-arosoldispenser/duftmarketing2.html", 1, "", 1, "");
addItem("10019", "Direktanwender", "/direktanwender/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;
		
	};
};