var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10037", "Classic_20Angels", "/wendt-kuehn-angel-classic/index.html", 1, "", 1, "");
addItem("10043", "Musician_20Angels", "/wendt-kuehn-angel-classic/angels-musician/index.html", 2, "", 1, "");
addItem("10044", "Gr_C3_BCnhainichen_20Angels", "/wendt-kuehn-angel-classic/angels-gruenhainichen/index.html", 2, "", 1, "");
addItem("10039", "New_20Angel_20Series", "/wendt-kuhn-engel-white/index.html", 1, "", 1, "");
addItem("10045", "Snowflake_20Angels_201", "/wendt-kuhn-engel-white/snowflake-angel1/index.html", 2, "", 1, "");
addItem("10046", "Snowflake_20Angels_202", "/wendt-kuhn-engel-white/other-angel/index.html", 2, "", 1, "");
addItem("10047", "Toy_20Angels", "/wendt-kuhn-engel-white/spielzeugengel/index.html", 2, "", 1, "");
addItem("10048", "Christmas_20Angels", "/wendt-kuhn-engel-white/christmas-angels/index.html", 2, "", 1, "");
addItem("10049", "Goodwill_20Angels", "/wendt-kuhn-engel-white/goodwill-angel/index.html", 2, "", 1, "");
addItem("10050", "Other_20Angels", "/wendt-kuhn-engel-white/other-angel/index2.html", 2, "", 1, "");
addItem("10038", "Flower_20Children_20_X7_20Friends", "/wendt-kuehn-flower-children/index2.html", 1, "", 1, "");
addItem("10051", "Flower_20Children", "/wendt-kuehn-flower-children/index.html", 2, "", 1, "");
addItem("10052", "Other_20Figures", "/wendt-kuehn-flower-children/index3.html", 2, "", 1, "");
addItem("10041", "Accessories", "/wendt-kuehn-accessories/index.html", 1, "", 1, "");
addItem("10042", "Novelties", "/wendt-kuehn-novelties/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;
		
	};
};