var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10021", "Decoramic_X2Schilder", "/pi21/index.html", 1, "", 1, "");
addItem("1002", "Wolkenschilder_20wei_C3_9F", "/pi21/pi2/index.html", 2, "", 1, "");
addItem("1003", "Wolkenschilder_20blau", "/pi21/pi3/index.html", 2, "", 1, "");
addItem("1007", "Oval_20Klassik_20klein", "/pi21/pi7/index.html", 2, "", 1, "");
addItem("1008", "Oval_20Klassik_20gro_C3_9F", "/pi21/pi8/index.html", 2, "", 1, "");
addItem("1009", "Oval_20Klassik_20mit_20wei_C3_9Fem_20Rand", "/pi21/pi9/index.html", 2, "", 1, "");
addItem("10017", "Kleiner_20Bogen", "/pi21/pi17/index.html", 2, "", 1, "");
addItem("10018", "Gro_C3_9Fer_20Bogen", "/pi21/pi18/index.html", 2, "", 1, "");
addItem("10022", "Familien_X2T_C3_BCrschilder", "/pi21/pi22/index.html", 2, "", 1, "");
addItem("10010", "Keramik_X2Schilder", "/pi10/index.html", 1, "", 1, "");
addItem("10023", "Klassik_20Art", "/pi10/pi23/index.html", 2, "", 1, "");
addItem("10024", "Landhaus_20Stil", "/pi10/pi24/index.html", 2, "", 1, "");
addItem("1004", "Zubeh_C3_B6r", "/pi4/index.html", 1, "", 1, "");
addItem("10030", "B_C3_BCcher_20f_C3_BCr_20Hochzeiten,_20Ehrungen_20und_20mehr", "/pi30/index.html", 1, "", 1, "");
addItem("10012", "Kinderbesteck", "/pi12/index.html", 1, "", 1, "");
addItem("10015", "Bilderrahmen", "/pi15/index.html", 1, "", 1, "");
addItem("10011", "Schl_C3_BCsselanh_C3_A4nger", "/pi11/index.html", 1, "", 1, "");
addItem("10027", "Visitenkartenetuis_20_X7_20Kugelschreiber", "/pi27/index.html", 1, "", 1, "");
addItem("10026", "Wein_X2_X7_20Flaschenzubeh_C3_B6r", "/pi26/index.html", 1, "", 1, "");
addItem("10013", "Messing_X2Schilder", "/pi13/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;
		
	};
};