var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1004", "Neu_202009", "/neuheiten/index.php", 1, "", 1, "");
addItem("1005", "Kristallglas_202009", "/neuheiten/kristallglas-2009/index.php", 2, "", 1, "");
addItem("10014", "Acrylglas_202009", "/neuheiten/acryglas-neuheiten/index.php", 2, "", 1, "");
addItem("10020", "Metall_202009", "/neuheiten/metall-awards-2009/index.php", 2, "", 1, "");
addItem("10025", "Artglas_202009", "/neuheiten/kunst-trophaeen/index.php", 2, "", 1, "");
addItem("1009", "Kristallglaspokale", "/kristallglas-trophaeen/index.php", 1, "", 1, "");
addItem("1006", "Globe_20Kollektion", "/kristallglas-trophaeen/globle/index.php", 2, "", 1, "");
addItem("10010", "Crystal_20Ice", "/kristallglas-trophaeen/crystal-ice/index.php", 2, "", 1, "");
addItem("10016", "Standard", "/kristallglas-trophaeen/standard/index.php", 2, "", 1, "");
addItem("10022", "Indigo_20Crystal", "/kristallglas-trophaeen/indigo-crystal/index.php", 2, "", 1, "");
addItem("10029", "Artglas", "/kristallglas-trophaeen/kunst-trophaeen/index.php", 2, "", 1, "");
addItem("10032", "Jade_20Line", "/kristallglas-trophaeen/jade-line/index.php", 2, "", 1, "");
addItem("10038", "3D_20Line", "/kristallglas-trophaeen/3d-line/index.php", 2, "", 1, "");
addItem("10036", "Sonderanfertigungen", "/kristallglas-trophaeen/sonderanfertigungen/index.php", 2, "", 1, "");
addItem("10017", "Acrylglaspokale", "/acrylglas-trophaeen/index.php", 1, "", 1, "");
addItem("10026", "Awards_20_X1_20Uhr", "/acrylglas-trophaeen/trophaeen-mit-uhr/index.php", 2, "", 1, "");
addItem("1002", "Metallsockel", "/acrylglas-trophaeen/standard-metallsockel/index.php", 2, "", 1, "");
addItem("10012", "Indigo_20Ice", "/acrylglas-trophaeen/indigo-ice/index.php", 2, "", 1, "");
addItem("10019", "Fire_20_X7_20Ice", "/acrylglas-trophaeen/fire-and-ice/index.php", 2, "", 1, "");
addItem("10024", "Clear_20Ocean", "/acrylglas-trophaeen/clear-ocean/index.php", 2, "", 1, "");
addItem("10028", "Metal_20Screen", "/acrylglas-trophaeen/metal-screen/index.php", 2, "", 1, "");
addItem("10033", "Color_20Trophy", "/acrylglas-trophaeen/marble-kollektion/index.php", 2, "", 1, "");
addItem("10042", "Marble_20Star", "/acrylglas-trophaeen/marble-kollektion/marble-star/index.php", 3, "", 1, "");
addItem("10043", "Emirates_20Collection", "/acrylglas-trophaeen/marble-kollektion/emirates-collection/index.php", 3, "", 1, "");
addItem("10037", "Sonderanfertigungen", "/acrylglas-trophaeen/sonderanfertigungen/index.php", 2, "", 1, "");
addItem("10040", "Budget", "/acrylglas-trophaeen/low-budget/index.php", 2, "", 1, "");
addItem("10030", "Urkunden_20_X4_20Awards", "/awards-ehrungen/index.php", 1, "", 1, "");
addItem("10034", "Metall_X2Troph_C3_A4en", "/metall-trophaeen/index.php", 1, "", 1, "");
addItem("1003", "MetallicArt", "/metall-trophaeen/metallicart/index.php", 2, "", 1, "");
addItem("10013", "Themen_20Awards", "/metall-trophaeen/themen-awards/index.php", 2, "", 1, "");
addItem("10035", "Golf_20Pokale", "/golf-kollektion/index.php", 1, "", 1, "");
addItem("10039", "Hollywood_20Awards", "/star-collection/index.php", 1, "", 1, "");
addItem("10041", "Pokale", "/pokale/index.php", 1, "", 1, "");
addItem("10015", "Kleinpokale", "/pokale/kleinpokale/index.php", 2, "", 1, "");
addItem("10021", "Gro_C3_9Fpokale", "/pokale/grosspokale/index.php", 2, "", 1, "");
addItem("10027", "Pokale_20ohne_20Deckel", "/pokale/pokale-ohne-deckel/index.php", 2, "", 1, "");
addItem("10031", "Premium_20Pokale", "/pokale/premium-pokale/index.php", 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;
		
	};
};