var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "KONDOME", "/kondome-gesamt-angebot/index.html", 1, "", 1, "");
addItem("1002", "Standard_20Kondome", "/zylindrisch-glatt-naturfarben/index.html", 1, "", 1, "");
addItem("1003", "Passform_20Kondome", "/anatomisch-geformte-kondome/index.html", 1, "", 1, "");
addItem("1004", "Color_X2Kondome", "/color-kondome/index.html", 1, "", 1, "");
addItem("1005", "Bunt_20und_20aromatisiert", "/mit-frucht-aroma/index.html", 1, "", 1, "");
addItem("1006", "Stimulierende_20Kondome", "/mit-noppen-und-rippen/index.html", 1, "", 1, "");
addItem("1007", "D_C3_BCnnere_20Kondome", "/extra-duenne-kondome/index.html", 1, "", 1, "");
addItem("1008", "St_C3_A4rkere_20Kondome", "/extra-starke-kondome/index.html", 1, "", 1, "");
addItem("10011", "Latexfreie_20Kondome", "/latex-freie-kondome/index.html", 1, "", 1, "");
addItem("10021", "Spermizide_20Kondome", "/spermizid/index.html", 1, "", 1, "");
addItem("10013", "Trockene_20Kondome", "/kondome-trocken-ohne-gleitmittel/index.html", 1, "", 1, "");
addItem("10012", "Aktverl_C3_A4ngernde_20Kondome", "/kondome-fuer-laengere-liebe/index.html", 1, "", 1, "");
addItem("1009", "Extra_20kleiner_20XS", "/extra-kleinere-kondome/index.html", 1, "", 1, "");
addItem("10010", "Extra_20gr_C3_B6_C3_9Fer_20XXL", "/extra-grosse-kondome-xxl/index.html", 1, "", 1, "");
addItem("10025", "W_C3_A4rmende_20Kondome", "/kondome-mit-waermenden-gleitgel/index.html", 1, "", 1, "");
addItem("10028", "Kondome_20mit_20K_C3_BChleffekt", "/kondome-mit-kuehleffekt/index.html", 1, "", 1, "");
addItem("10019", "Gleitmittel_X2Massage", "/gleitgel-hygieneartikel/gleitgel.html", 1, "", 1, "");
addItem("10026", "Sex_X2Toys", "/toys/index.html", 1, "", 1, "");
addItem("10023", "F_C3_BCr_20die_20Frau", "/tampos/index.html", 1, "", 1, "");
addItem("10014", "Kondom_X2Mixed", "/kondom-sortimente-special/index.html", 1, "", 1, "");
addItem("10045", "Kondom_X2Automatenpackungen", "/kondompackungen-fuer-automaten/index.html", 1, "", 1, "");
addItem("10016", "100_20Kondome_20bestellen", "/kondome-im-polybeutel-ab-100-stck/index.html", 1, "", 1, "");
addItem("10024", "500_20Kondome", "/grosspack-3000-kondome/index.html", 1, "", 1, "");
addItem("10017", "1000_20Kondome", "/grosspackungen-kondome-1000er/index.html", 1, "", 1, "");
addItem("10031", "5000_20Kondome", "/london-feucht-5000-stck/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;
		
	};
};