var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10028", "Sichtschutz_20aus_20Weide_20_X7_20Haselnu_C3_9F", "/sichtschutz-aus-weide/index.html", 1, "", 1, "");
addItem("10041", "Schmelzfeuer", "/large-cows/index.html", 1, "", 1, "");
addItem("10042", "Gartenfackeln", "/neue-kuehe-herbst-2006/index.html", 1, "", 1, "");
addItem("1009", "Feuerschalen_20_X7_20Grills", "/kunst-mehr/index.html", 1, "", 1, "");
addItem("10047", "Gartengie_C3_9Fkannen", "/seite-nicht-gefunden-404.html", 1, "", 1, "");
addItem("10015", "Garten_20_X2_20Dekoration", "/gartendekoration/index.html", 1, "", 1, "");
addItem("10029", "Gartenfiguren_20Steinfiguren", "/gartendekoration/steinfiguren/index.html", 2, "", 1, "");
addItem("10043", "Gartenwerkzeug_20v_X3_20Sneeboer", "/gartendekoration/sneeboer-gartenwerkzeug/index.html", 2, "", 1, "");
addItem("10051", "Gartendeko_20_X7_20N_C3_BCtzliches", "/unsere-weihnachtsaktion/index.html", 1, "", 1, "");
addItem("10025", "Vogelh_C3_A4user_20_X7_20Schmetterlingskasten", "/vogelhaeuser-futterscheune/index.html", 1, "", 1, "");
addItem("10032", "Wasserspeier", "/herzobjekte/index.html", 1, "", 1, "");
addItem("10036", "Gartenbrunnen", "/leuchttuerme-2/index.html", 1, "", 1, "");
addItem("10046", "Gartenscheren_20von_20Felco", "/engel/engel/index.html", 1, "", 1, "");
addItem("10010", "Gartenbeleuchtung", "/feuerstellen/index.html", 1, "", 1, "");
addItem("10053", "Klangspiele_20_X7_20Gongs", "/buchtipps/index.html", 1, "", 1, "");
addItem("10019", "Historische_20Aussenbeleuchtung", "/buesten/komponisten/index.html", 1, "", 1, "");
addItem("10052", "Sonnenuhren", "/lampions/zengarten/index.html", 1, "", 1, "");
addItem("10049", "Briefk_C3_A4sten", "/briefkasten/index.html", 1, "", 1, "");
addItem("10050", "Gartenthermometer_20_X7_20Wetterstationen", "/wetterstationen-thermometer/index.html", 1, "", 1, "");
addItem("10055", "Gart_20_X1_20Art_20Design_X2Gartensystem", "/engel/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;
		
	};
};