var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10010", "50_25_20Rabatt", "/pi10/index.htm", 1, "", 1, "");
addItem("10027", "Swiss_20Souvenirs", "/pi27/index.htm", 1, "", 1, "");
addItem("1004", "Gl_C3_A4ser", "/pi27/pi4/index.htm", 2, "", 1, "");
addItem("10019", "Tassen", "/pi27/pi19/index.htm", 2, "", 1, "");
addItem("10028", "Thermosbecher_20und_20Flaschen", "/pi27/pi28/index.htm", 2, "", 1, "");
addItem("10031", "Swiss_20Military", "/pi31/index.htm", 1, "", 1, "");
addItem("1008", "Uhren", "/pi31/pi8/index.htm", 2, "", 1, "");
addItem("10012", "Bekleidung_20Swiss_20Military", "/pi31/pi12/index.htm", 2, "", 1, "");
addItem("10034", "T_X2Shirts_20Swiss_20Design", "/pi34/index.htm", 1, "", 1, "");
addItem("1009", "woman", "/pi34/pi9/index.htm", 2, "", 1, "");
addItem("10021", "Unisex", "/pi34/pi21/index.htm", 2, "", 1, "");
addItem("10024", "Kinder", "/pi34/pi24/index.htm", 2, "", 1, "");
addItem("10029", "Caps_20und_20M_C3_BCtzen", "/pi34/pi29/index.htm", 2, "", 1, "");
addItem("10035", "Schals_20und_20T_C3_BCcher", "/pi34/pi35/index.htm", 2, "", 1, "");
addItem("10037", "Alprausch", "/pi37/index.htm", 1, "", 1, "");
addItem("10043", "Tischdekorationen", "/pi43/index.htm", 1, "", 1, "");
addItem("10011", "Bad", "/pi43/pi11/index.htm", 2, "", 1, "");
addItem("10015", "K_C3_BCche", "/pi43/pi15/index.htm", 2, "", 1, "");
addItem("10044", "Alpine_20Club_20Switzerland", "/pi44/index.htm", 1, "", 1, "");
addItem("10047", "B_C3_BCrowelt", "/pi47/index.htm", 1, "", 1, "");
addItem("10048", "B_C3_BCcher,_20Spiele,_20DVD_20Schweiz", "/pi48/index.htm", 1, "", 1, "");
addItem("10051", "Lederwaren", "/pi51/index.htm", 1, "", 1, "");
addItem("10052", "Swiss_20Army_20Recycling", "/pi52/index.htm", 1, "", 1, "");
addItem("10056", "Kunst_20und_20Kuh", "/pi56/index.htm", 1, "", 1, "");
addItem("10057", "Pins", "/pi57/index.htm", 1, "", 1, "");
addItem("10026", "Pin_20_C3_96sterreich", "/pi57/pi26/index.htm", 2, "", 1, "");
addItem("10058", "Schl_C3_BCsselanh_C3_A4nger", "/pi58/index.htm", 1, "", 1, "");
addItem("10016", "Motiv_20Swiss", "/pi58/pi16/index.htm", 2, "", 1, "");
addItem("10059", "Accessoires", "/pi59/index.htm", 1, "", 1, "");
addItem("1003", "F_C3_BCr_20den_20Herrn", "/pi59/pi3/index.htm", 2, "", 1, "");
addItem("10014", "Diverses", "/pi59/pi14/index.htm", 2, "", 1, "");
addItem("10025", "Kosmetik", "/pi59/pi25/index.htm", 2, "", 1, "");
addItem("10060", "Michel_20Jordi", "/pi60/index.htm", 1, "", 1, "");
addItem("10017", "Sport_20Uhren", "/pi60/pi17/index.htm", 2, "", 1, "");
addItem("10022", "Damenuhren", "/pi60/pi22/index.htm", 2, "", 1, "");
addItem("10036", "Schreibger_C3_A4te", "/pi60/pi36/index.htm", 2, "", 1, "");
addItem("10038", "Armb_C3_A4nder_20f_C3_BCr_20Uhren", "/pi60/pi38/index.htm", 2, "", 1, "");
addItem("10041", "Geschirr", "/pi60/pi41/index.htm", 2, "", 1, "");
addItem("10061", "Outdoor_20_X1_20Sport", "/pi61/index.htm", 1, "", 1, "");
addItem("1002", "Flachm_C3_A4nner", "/pi61/pi2/index.htm", 2, "", 1, "");
addItem("10062", "Wenger_20Uhren_20_X7_20Messer", "/pi62/index.htm", 1, "", 1, "");
addItem("10018", "Taschenmesser", "/pi62/pi18/index.htm", 2, "", 1, "");
addItem("10054", "Wenger_20Uhren", "/pi62/pi54/index.htm", 2, "", 1, "");
addItem("10063", "Gef_C3_BCllte_20Ideen", "/pi63/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;
		
	};
};