var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "pomp_20_X2_20die_20Kuscheltasche", "/pomp-die-kuscheltasche/index2.html", 1, "", 1, "");
addItem("1003", "pomp_20_X2_20Taschenkollektion", "/pomp-die-kuscheltasche/pomp-taschenkollektion/index.html", 2, "", 1, "");
addItem("1004", "BOyO_20_X2_20Die_20Bilderrahmentasche", "/boyo-bilderrahmentasche/index2.html", 1, "", 1, "");
addItem("1005", "BOyO_20_X2_20Taschenkollektion", "/boyo-bilderrahmentasche/boyo-taschenkollektion/index.html", 2, "", 1, "");
addItem("1007", "STADTTASCHEN", "/stadttaschen/index.html", 1, "", 1, "");
addItem("1008", "Stadttaschen_20f_C3_BCr_20Stuttgart", "/stadttaschen/stadttaschen-stuttgart/index.html", 2, "", 1, "");
addItem("1009", "BLOON_20_X3_X3_X3wie_20ein_20Ballon", "/bloon-tasche/index.html", 1, "", 1, "");
addItem("10010", "BLOON_20_X2_20Taschenkollektion", "/bloon-tasche/bloon-taschenkollektion/index.html", 2, "", 1, "");
addItem("10011", "TAURUSPORT_20by_20travelite", "/taurusport-by-travelite/index.html", 1, "", 1, "");
addItem("10012", "TAURUSPORT_20Kollektion", "/taurusport-by-travelite/travelite-taschen/index.html", 2, "", 1, "");
addItem("10016", "TRESTON_20Reisegep_C3_A4ck", "/treston/index.html", 1, "", 1, "");
addItem("10019", "TRESTON_20Taschenkollektion", "/treston/treston-taschenkollektion/index.html", 2, "", 1, "");
addItem("10023", "Reisekoffer_20Trolleys", "/trolley-sets/index.html", 1, "", 1, "");
addItem("10024", "Reisekoffer_X2Trolleys_X2Kollektion", "/trolley-sets/trolley-sets/index.html", 2, "", 1, "");
addItem("10026", "PROS_20Wanderrucksack", "/pros-rucksack/index.html", 1, "", 1, "");
addItem("10027", "PROS_20Rucksackkollektion", "/pros-rucksack/pros-rucksackkollektion/index.html", 2, "", 1, "");
addItem("10020", "SONDERANGEBOTE", "/sonderangebote/index.html", 1, "", 1, "");
addItem("10025", "Promotion", "/promotion/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;
		
	};
};