var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1008", "Handball_20_7C_20AIR_X2Body_20185_20(4)", "/air-body-185/index.html", 1, "", 1, "");
addItem("10018", "Zubeh_C3_B6r_20_7C_20Erg_C3_A4nzungen_20(10)", "/air-body-185/ergaenzungen/index.html", 2, "", 1, "");
addItem("10019", "Miete_20(1)", "/air-body-185/miete/index.html", 2, "", 1, "");
addItem("1009", "Handball_20_7C_20AIR_X2Body_20junior_20(3)", "/air-body-junior/index.html", 1, "", 1, "");
addItem("10020", "Zubeh_C3_B6r_20_7C_20Erg_C3_A4nzungen_20(10)", "/air-body-junior/zubehoer/index.html", 2, "", 1, "");
addItem("10022", "Miete_20(1)", "/air-body-junior/miete/index.html", 2, "", 1, "");
addItem("10010", "Fu_C3_9Fball_20_7C_20AIR_X2Body_20185_20(6)", "/fussball-air-body-185/index.html", 1, "", 1, "");
addItem("10013", "Zubeh_C3_B6r_20_7C_20Erg_C3_A4nzungen_20(13)", "/fussball-air-body-185/ergaenzungen/index.html", 2, "", 1, "");
addItem("10015", "Miete_20(1)", "/fussball-air-body-185/miete/index.html", 2, "", 1, "");
addItem("10011", "Fu_C3_9Fball_20_7C_20AIR_X2Body_20junior_20(3)", "/fussball-air-body-junior/index.html", 1, "", 1, "");
addItem("10023", "Zubeh_C3_B6r_20_7C_20Erg_C3_A4nzungen_20(13)", "/fussball-air-body-junior/zubehoer/index.html", 2, "", 1, "");
addItem("10025", "Miete_20(1)", "/fussball-air-body-junior/miete/index.html", 2, "", 1, "");
addItem("1003", "AIR_X2Body_20_7C_20Zubeh_C3_B6r_20(16)", "/air-body/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;
		
	};
};