var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10075", "SALE_20_25_20(Shirts_20nur_2015_20_E2_82_AC)_20(15)", "/pi75/index.html", 1, "", 1, "");
addItem("10017", "M_C3_A4dels_20(20)", "/pi17/index.html", 1, "", 1, "");
addItem("10025", "T_X2Shirts_20(10)", "/pi17/pi25/index.html", 2, "", 1, "");
addItem("10064", "tiefer_20V_X2Ausschnitt_20(1)", "/pi17/pi25/pi64/index.html", 3, "", 1, "");
addItem("10028", "tiefer_20Rundhals_X2Ausschnitt_20(1)", "/pi17/pi25/pi28/index.html", 3, "", 1, "");
addItem("10026", "V_X2Ausschnitt_20(4)", "/pi17/pi25/pi26/index.html", 3, "", 1, "");
addItem("10027", "Rundhals_X2Ausschnitt_20(4)", "/pi17/pi25/pi27/index.html", 3, "", 1, "");
addItem("10030", "Tank_20Tops_20(1)", "/pi17/pi30/index.html", 2, "", 1, "");
addItem("10029", "Longsleeves_20(4)", "/pi17/pi29/index.html", 2, "", 1, "");
addItem("10068", "Kapuzenjacke_20(1)", "/pi17/pi68/index.html", 2, "", 1, "");
addItem("10046", "Kapuzenpullover_20(4)", "/pi17/pi46/index.html", 2, "", 1, "");
addItem("10020", "Nager_20H_C3_A4ngematten_20(19)", "/pi20/index.html", 1, "", 1, "");
addItem("10022", "Beutel_20(17)", "/pi22/index.html", 1, "", 1, "");
addItem("10058", "die_20Liebenden_20(1)", "/pi22/pi58/index.html", 2, "", 1, "");
addItem("10031", "Berlin_20Motiv_20(1)", "/pi22/pi31/index.html", 2, "", 1, "");
addItem("10034", "Meerschweinchenmotiv_20(10)", "/pi22/pi34/index.html", 2, "", 1, "");
addItem("10032", "M_C3_BCmmler_20Motiv_20(2)", "/pi22/pi32/index.html", 2, "", 1, "");
addItem("10050", "Gl_C3_BCckschwein_20Motiv_20(2)", "/pi22/pi50/index.html", 2, "", 1, "");
addItem("10057", "MINI_20_X2_20Beutel_20(1)", "/pi22/pi57/index.html", 2, "", 1, "");
addItem("10021", "Accessoires_20(29)", "/pi21/index.html", 1, "", 1, "");
addItem("10023", "Schwei_C3_9Fband_20_X4_20Pulsw_C3_A4rmer_20(3)", "/pi21/pi23/index.html", 2, "", 1, "");
addItem("10073", "Button_20(26)", "/pi21/pi73/index.html", 2, "", 1, "");
addItem("10038", "25_20mm_20Button_20(einzelne_20Motive)_20(21)", "/pi21/pi73/pi38/index.html", 3, "", 1, "");
addItem("10069", "59_20mm_20Button_20(5)", "/pi21/pi73/pi69/index.html", 3, "", 1, "");
addItem("10070", "mit_20MEERSCHWEINn_20Motiv_20(5)", "/pi21/pi73/pi69/pi70/index.html", 4, "", 1, "");
addItem("10065", "Taschenspiegel_20(5)", "/pi65/index.html", 1, "", 1, "");
addItem("10067", "mit_20MEERSCHWEIN_20Motiv_20(5)", "/pi65/pi67/index.html", 2, "", 1, "");
addItem("10039", "Geschenk_20_X2_20Ideen_20(7)", "/pi39/index.html", 1, "", 1, "");
addItem("10040", "Kirschkernkissen_20(7)", "/pi39/pi40/index.html", 2, "", 1, "");
addItem("10019", "Kinder_20(8)", "/pi19/index.html", 1, "", 1, "");
addItem("10051", "T_X2Shirts_20(8)", "/pi19/pi51/index.html", 2, "", 1, "");
addItem("10018", "M_C3_A4nner_20T_X2Shirts_20(4)", "/pi18/index.html", 1, "", 1, "");
addItem("10053", "T_X2Shirts_20(4)", "/pi18/pi53/index.html", 2, "", 1, "");
addItem("10024", "SAUgute_20Angebote_20(4)", "/pi24/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;
		
	};
};