var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10069", "Freundschaftsringe_20Silber", "/freundschaftsringe-silber/index.htm", 1, "", 1, "");
addItem("10076", "Bruno_20Banani_20Ringe", "/freundschaftsringe-silber/bruno-banani-ringe/index.htm", 2, "", 1, "");
addItem("10070", "Trauringe_20Edelstahl", "/trauringe-edelstahl/index.htm", 1, "", 1, "");
addItem("10071", "Titanringe", "/trauringe-titan/index.htm", 1, "", 1, "");
addItem("10084", "Titan_20Edelstahl_20Ringe", "/trauringe-titan/trauringe-titan-edelstahl/index.htm", 2, "", 1, "");
addItem("10081", "Tungsten_X4Wolfram_20_X2_20Keramik", "/trauringe-tungsten-wolfram/index.htm", 1, "", 1, "");
addItem("10073", "Eheringe", "/trauringe-gold/index.htm", 1, "", 1, "");
addItem("10072", "Palladium_20Trauringe", "/trauringe-palladium/index.htm", 1, "", 1, "");
addItem("10074", "Platin_20Trauringe", "/trauringe-platin/index.htm", 1, "", 1, "");
addItem("10043", "Ringe_20mit_20Lasergravur", "/trauringe-mit-lasergravur/index.htm", 1, "", 1, "");
addItem("10077", "Silberringe", "/trauringe-mit-lasergravur/silber/index.htm", 2, "", 1, "");
addItem("10078", "Edelstahlringe", "/trauringe-mit-lasergravur/edelstahl/index.htm", 2, "", 1, "");
addItem("10080", "Titan_20Ringe", "/trauringe-mit-lasergravur/titan/index.htm", 2, "", 1, "");
addItem("10079", "Bicolorringe", "/trauringe-mit-lasergravur/bicolor/index.htm", 2, "", 1, "");
addItem("10083", "Trauringe_20Gold", "/trauringe-mit-lasergravur/gold/index.htm", 2, "", 1, "");
addItem("10060", "Ringgr_C3_B6_C3_9Fenhilfe", "/ringgroessenhilfe/index.htm", 1, "", 1, "");
addItem("10087", "Kleine_20Schatztruhe", "/kleine-schatztruhe/index.htm", 1, "", 1, "");
addItem("10075", "Taufring", "/taufring/index.htm", 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;
		
	};
};