var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10022", "Trauringe", "/trauringe/index.html", 1, "", 1, "");
addItem("10043", "Twin_20Sets_20Gelbgold", "/twin-set-gold/index.html", 2, "", 1, "");
addItem("10044", "Twin_20Sets_20Wei_C3_9Fgold", "/twin-sets-weissgold/index.html", 2, "", 1, "");
addItem("10021", "Twin_20Sets_20Bicolor", "/partnerringe-twin-sets/index.html", 2, "", 1, "");
addItem("10045", "Twin_20Sets_20Silber", "/twin-sets-silber/index.html", 2, "", 1, "");
addItem("10039", "Paarringe_20ohne_20Stein", "/paarringe/index.html", 2, "", 1, "");
addItem("10018", "Trauringe_20Gold_20333", "/trauringe-gold-333/index.html", 1, "", 1, "");
addItem("10028", "Gelbgold", "/gelbgold-333/index.html", 2, "", 1, "");
addItem("10029", "Rotgold", "/rotgold-333/index.html", 2, "", 1, "");
addItem("10032", "Wei_C3_9Fgold", "/weissgold-333/index.html", 2, "", 1, "");
addItem("10033", "Rosegold", "/rosegold-333/index.html", 2, "", 1, "");
addItem("10030", "Bicolor", "/bicolor-333/index.html", 2, "", 1, "");
addItem("1005", "Trauringe_20Gold_20585", "/trauringe-585/index.html", 1, "", 1, "");
addItem("1004", "Gelbgold", "/gelbgold-585/index.html", 2, "", 1, "");
addItem("1006", "Rotgold", "/rotgold-585/index.html", 2, "", 1, "");
addItem("1002", "Wei_C3_9Fgold", "/weissgold-585/index.html", 2, "", 1, "");
addItem("10011", "Rosegold", "/rosegold-585/index.html", 2, "", 1, "");
addItem("10013", "Graugold", "/graugold-585/index.html", 2, "", 1, "");
addItem("1009", "Bicolor", "/bicolor-585/index.html", 2, "", 1, "");
addItem("1007", "Trauringe_20Gold_20750", "/trauringe-750/index.html", 1, "", 1, "");
addItem("1003", "Gelbgold", "/gelbgold-750/index.html", 2, "", 1, "");
addItem("1008", "Wei_C3_9Fgold", "/weissgold-750/index.html", 2, "", 1, "");
addItem("10040", "Bicolor", "/bicolor-750/index.html", 2, "", 1, "");
addItem("1001", "Platin", "/platin-750/index.html", 2, "", 1, "");
addItem("10034", "Schmuck_20_X7_20Ringe", "/schmuck-ringe/index.html", 1, "", 1, "");
addItem("10038", "Einzelne_20Ringe", "/einzelne-ringe/index.html", 2, "", 1, "");
addItem("10023", "Freundschaftsringe", "/freundschaftsringe/index.html", 2, "", 1, "");
addItem("10019", "Silberringe", "/damenringe-silber/index.html", 2, "", 1, "");
addItem("10020", "Herrenringe", "/herrenringe/index.html", 2, "", 1, "");
addItem("10035", "Wissenswertes", "/ringe-messen/index.html", 1, "", 1, "");
addItem("10036", "Ringma_C3_9Fe", "/ringmass/index.html", 2, "", 1, "");
addItem("10037", "Brillianten", "/brillianten/index.html", 2, "", 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;
		
	};
};