var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10083", "Neuheiten", "/neuheiten-august/index.html", 1, "", 1, "");
addItem("1006", "Whisky_X4Whiskey", "/whisky/index.html", 1, "", 1, "");
addItem("10034", "Schottland", "/whisky/whisky-schottland/index.html", 2, "", 1, "");
addItem("10078", "Speyside", "/whisky/whisky-schottland/speyside/index.html", 3, "", 1, "");
addItem("10080", "Islay", "/whisky/whisky-schottland/islay/index.html", 3, "", 1, "");
addItem("10076", "Highlands", "/whisky/whisky-schottland/highlands/index.html", 3, "", 1, "");
addItem("10077", "Lowlands", "/whisky/whisky-schottland/lowlands/index.html", 3, "", 1, "");
addItem("10075", "Inseln", "/whisky/whisky-schottland/inseln/index.html", 3, "", 1, "");
addItem("10079", "Campbeltown", "/whisky/whisky-schottland/campbeltown/index.html", 3, "", 1, "");
addItem("10074", "Blended", "/whisky/whisky-schottland/blended/index.html", 3, "", 1, "");
addItem("1008", "USA", "/whisky/whiskey-usa/index.html", 2, "", 1, "");
addItem("10081", "Bourbon", "/whisky/whiskey-usa/bourbon/index.html", 3, "", 1, "");
addItem("10082", "Rye", "/whisky/whiskey-usa/rye/index.html", 3, "", 1, "");
addItem("100115", "Tennessee", "/whisky/whiskey-usa/tennessee/index.html", 3, "", 1, "");
addItem("10056", "Kanada", "/whisky/whisky-kanada/index.html", 2, "", 1, "");
addItem("10035", "Irland", "/whisky/whiskey-irland/index.html", 2, "", 1, "");
addItem("10057", "Japan", "/whisky/whisky-japan/index.html", 2, "", 1, "");
addItem("10043", "Andere", "/whisky/whisky-andere/index.html", 2, "", 1, "");
addItem("10023", "Wodka", "/wodka/index.html", 1, "", 1, "");
addItem("10071", "Flavored_20Vodka", "/wodka/flavored-vodka/index.html", 2, "", 1, "");
addItem("10024", "Gin", "/gin/index.html", 1, "", 1, "");
addItem("10037", "Genever_X4Corenwijn", "/genever/index.html", 1, "", 1, "");
addItem("10025", "Rum,_20Ron,_20Rhum", "/rum/index.html", 1, "", 1, "");
addItem("10088", "Karibik", "/rum/karibik/index.html", 2, "", 1, "");
addItem("10096", "Anguilla", "/rum/karibik/anguilla/index.html", 3, "", 1, "");
addItem("10097", "Antigua", "/rum/karibik/antigua/index.html", 3, "", 1, "");
addItem("10098", "Aruba", "/rum/karibik/aruba/index.html", 3, "", 1, "");
addItem("100110", "Bahamas", "/rum/karibik/bahamas/index.html", 3, "", 1, "");
addItem("100100", "Barbados", "/rum/karibik/barbados/index.html", 3, "", 1, "");
addItem("100101", "Dominikanische_20Republik", "/rum/karibik/dom-republik/index.html", 3, "", 1, "");
addItem("100102", "Grenada", "/rum/karibik/grenada/index.html", 3, "", 1, "");
addItem("100103", "Guadeloupe", "/rum/karibik/guadeloupe/index.html", 3, "", 1, "");
addItem("100104", "Haiti", "/rum/karibik/haiti/index.html", 3, "", 1, "");
addItem("100105", "Jamaika", "/rum/karibik/jamaika/index.html", 3, "", 1, "");
addItem("100106", "Kuba", "/rum/karibik/kuba/index.html", 3, "", 1, "");
addItem("100107", "Marie_20Galante", "/rum/karibik/marie-galante/index.html", 3, "", 1, "");
addItem("100108", "Martinique", "/rum/karibik/martinique/index.html", 3, "", 1, "");
addItem("100109", "Puerto_20Rico", "/rum/karibik/puerto-rico/index.html", 3, "", 1, "");
addItem("100111", "St_X3_20Kitts", "/rum/karibik/st-kitts/index.html", 3, "", 1, "");
addItem("100112", "St_X3_20Lucia", "/rum/karibik/st-lucia/index.html", 3, "", 1, "");
addItem("100113", "Trinidad", "/rum/karibik/trinidad/index.html", 3, "", 1, "");
addItem("10095", "Virgin_20Islands", "/rum/karibik/virgin-islands/index.html", 3, "", 1, "");
addItem("100114", "Andere", "/rum/karibik/andere/index.html", 3, "", 1, "");
addItem("10087", "S_C3_BCdamerika", "/rum/suedamerika/index.html", 2, "", 1, "");
addItem("10093", "Mittelamerika", "/rum/mittelamerika/index.html", 2, "", 1, "");
addItem("10092", "Australien", "/rum/australien/index.html", 2, "", 1, "");
addItem("10089", "Asien", "/rum/asien/index.html", 2, "", 1, "");
addItem("10090", "Afrika", "/rum/afrika/index.html", 2, "", 1, "");
addItem("10091", "Europa", "/rum/europa/index.html", 2, "", 1, "");
addItem("10094", "Nordamerika", "/rum/nordamerika/index.html", 2, "", 1, "");
addItem("10044", "Cachaca", "/cachaca/index.html", 1, "", 1, "");
addItem("10040", "Tequila,_20Sotol", "/tequila/index.html", 1, "", 1, "");
addItem("10085", "100_25_20Agave", "/tequila/100-agave/index.html", 2, "", 1, "");
addItem("10086", "Mixto", "/tequila/mixto/index.html", 2, "", 1, "");
addItem("10026", "Cognac,_20Brandy", "/cognac/index.html", 1, "", 1, "");
addItem("10039", "Calvados,_20Applejack", "/calvados/index.html", 1, "", 1, "");
addItem("10059", "Pisco", "/pisco/index.html", 1, "", 1, "");
addItem("10048", "Edeldestillate", "/edeldestillate/index.html", 1, "", 1, "");
addItem("1002", "Lik_C3_B6re", "/likoere/index.html", 1, "", 1, "");
addItem("10072", "The_20Bitter_20Truth", "/likoere/the-bitter-truth/index.html", 2, "", 1, "");
addItem("10052", "Zuidam", "/likoere/zuidam/index.html", 2, "", 1, "");
addItem("100118", "Merlet", "/likoere/merlet/index.html", 2, "", 1, "");
addItem("10051", "Marie_20Brizard", "/likoere/marie-brizard/index.html", 2, "", 1, "");
addItem("10050", "BOLS", "/likoere/bols/index.html", 2, "", 1, "");
addItem("10053", "De_20Kuyper", "/likoere/de-kuyper/index.html", 2, "", 1, "");
addItem("10073", "Boudier", "/likoere/boudier/index.html", 2, "", 1, "");
addItem("10031", "Aperitiv", "/aperitiv/index.html", 1, "", 1, "");
addItem("10058", "Absinth,_20Pastis", "/absinth-pastis/index.html", 1, "", 1, "");
addItem("10047", "Kr_C3_A4uterbitter", "/kraeuterbitter/index.html", 1, "", 1, "");
addItem("10036", "Akvavit", "/akvavit/index.html", 1, "", 1, "");
addItem("1005", "The_20Secret_20Treasures", "/secret-treasures/index.html", 1, "", 1, "");
addItem("10032", "Cocktail_20Bitters", "/bitters/index.html", 1, "", 1, "");
addItem("10042", "Cocktailzutaten", "/cocktailzutaten/index.html", 1, "", 1, "");
addItem("10033", "Champagner", "/champagner/index.html", 1, "", 1, "");
addItem("10064", "Grappa", "/grappa/index.html", 1, "", 1, "");
addItem("10045", "Port_X4Sherry", "/port/index.html", 1, "", 1, "");
addItem("10046", "B_C3_BCcher", "/buecher/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;
		
	};
};