var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Navigatie", "/navigatie/index.html", 1, "", 1, "");
addItem("100148", "PC_20aan_20boord", "/navigatie/pc-aan-boord/index.html", 2, "", 1, "");
addItem("1007", "Radar", "/navigatie/radar/index.html", 2, "", 1, "");
addItem("1008", "Plotter", "/navigatie/plotter/index.html", 2, "", 1, "");
addItem("10019", "Radar_20Plotter", "/navigatie/radarplotter/index.html", 2, "", 1, "");
addItem("10020", "Radar_20Antenne", "/navigatie/dome/index.html", 2, "", 1, "");
addItem("100150", "Touch_20screen", "/navigatie/touch-screen/index.html", 2, "", 1, "");
addItem("100153", "Monitor", "/navigatie/monitor/index.html", 2, "", 1, "");
addItem("10026", "Instrumenten", "/navigatie/instrumenten/index.html", 2, "", 1, "");
addItem("10021", "GPS", "/navigatie/gps/index.html", 2, "", 1, "");
addItem("10025", "Stuurautomaat", "/navigatie/stuurautomaat/index.html", 2, "", 1, "");
addItem("100152", "Kompas", "/navigatie/kompas/index.html", 2, "", 1, "");
addItem("10039", "Module", "/navigatie/omzetters/index.html", 2, "", 1, "");
addItem("10040", "Kaarten", "/navigatie/kaarten/index.html", 2, "", 1, "");
addItem("10063", "Software", "/navigatie/software/index.html", 2, "", 1, "");
addItem("100141", "Forward_20Sounder", "/navigatie/forward-sounder/index.html", 2, "", 1, "");
addItem("100158", "Nachtzicht", "/navigatie/nachtzicht/index.html", 2, "", 1, "");
addItem("100161", "Behuizing", "/navigatie/behuizing/index.html", 2, "", 1, "");
addItem("1002", "Communicatie", "/communicatie/index.html", 1, "", 1, "");
addItem("1009", "Marifoon", "/communicatie/marifoon/index.html", 2, "", 1, "");
addItem("10010", "SSB", "/communicatie/ssb/index.html", 2, "", 1, "");
addItem("10038", "Antenne", "/communicatie/antenne/index.html", 2, "", 1, "");
addItem("10041", "Weerfax", "/communicatie/weerfax/index.html", 2, "", 1, "");
addItem("10029", "AIS", "/communicatie/ais/index.html", 2, "", 1, "");
addItem("10043", "Navtex", "/communicatie/navtex/index.html", 2, "", 1, "");
addItem("10044", "Pactor", "/communicatie/multimode-pc-terminal/index.html", 2, "", 1, "");
addItem("100151", "Wifi_20aan_20boord", "/communicatie/wifi-aan-boord/index.html", 2, "", 1, "");
addItem("10018", "Satelliet_20televisie", "/communicatie/televisie/index.html", 2, "", 1, "");
addItem("100139", "CCTV", "/communicatie/cctv/index.html", 2, "", 1, "");
addItem("1003", "Stroom", "/stroom/index.html", 1, "", 1, "");
addItem("10012", "Acculader", "/stroom/acculader/index.html", 2, "", 1, "");
addItem("10011", "Omvormer", "/stroom/omvormer/index.html", 2, "", 1, "");
addItem("10045", "Omvormer_20lader", "/stroom/omvormer-lader/index.html", 2, "", 1, "");
addItem("100104", "Stroom_20toebehoren", "/stroom/stroom-toebehoren/index.html", 2, "", 1, "");
addItem("100147", "Schakelen", "/stroom/schakelen/index.html", 2, "", 1, "");
addItem("100137", "Scheidingstrafo", "/stroom/scheidingstrafo/index.html", 2, "", 1, "");
addItem("100105", "DC_X2DC_20converters", "/stroom/dc-dc-converters/index.html", 2, "", 1, "");
addItem("100145", "Accu_20Box", "/stroom/accu-box/index.html", 2, "", 1, "");
addItem("100166", "Accu_20Start", "/stroom/accu-start/index.html", 2, "", 1, "");
addItem("10090", "Accu_20Start_X4Licht", "/stroom/startlicht-accu/index.html", 2, "", 1, "");
addItem("10093", "Accu_20Semi_X2tractie", "/stroom/semi-traktie/index.html", 2, "", 1, "");
addItem("10092", "Accu_20AGM_20Deep_20Cycle", "/stroom/agm-accu/index.html", 2, "", 1, "");
addItem("100162", "Accu_20AGM_20Start_X4Licht", "/stroom/accu-agm-startlicht/index.html", 2, "", 1, "");
addItem("10091", "Accu_20GEL", "/stroom/gel-accu/index.html", 2, "", 1, "");
addItem("100117", "Tractie", "/stroom/tractie/index.html", 2, "", 1, "");
addItem("100167", "VMF", "/stroom/vmf/index.html", 2, "", 1, "");
addItem("100175", "Fullriver", "/stroom/fullriver/index.html", 2, "", 1, "");
addItem("100164", "Banner", "/stroom/banner/index.html", 2, "", 1, "");
addItem("100171", "Cellpower", "/stroom/cellpower/index.html", 2, "", 1, "");
addItem("100168", "Dynac", "/stroom/dynac/index.html", 2, "", 1, "");
addItem("100169", "Exide", "/stroom/exide/index.html", 2, "", 1, "");
addItem("100174", "Fiamm", "/stroom/fiamm/index.html", 2, "", 1, "");
addItem("100173", "Mastervolt", "/stroom/mastervolt/index.html", 2, "", 1, "");
addItem("100163", "Odyssey", "/stroom/odyssey/index.html", 2, "", 1, "");
addItem("100114", "Optima", "/stroom/optima/index.html", 2, "", 1, "");
addItem("100172", "PBQ", "/stroom/pbq/index.html", 2, "", 1, "");
addItem("100165", "Trojan", "/stroom/trojan/index.html", 2, "", 1, "");
addItem("100155", "Varta", "/stroom/varta/index.html", 2, "", 1, "");
addItem("100170", "Victron", "/stroom/victron/index.html", 2, "", 1, "");
addItem("100134", "Accuzoeker_20Varta", "/stroom/accuzoeker-varta/index.html", 2, "", 1, "");
addItem("100128", "Accuzoeker_20Personenauto", "/stroom/accuzoeker-personenauto/index.html", 2, "", 1, "");
addItem("100129", "Accuzoeker_20Bedrijfsauto", "/stroom/accuzoeker-bedrijfsauto/index.html", 2, "", 1, "");
addItem("100130", "Accuzoeker_20Motor", "/stroom/accuzoeker-motor/index.html", 2, "", 1, "");
addItem("100131", "Accuzoeker_20Quad_20en_20ATV", "/stroom/accuzoeker-quad-en-atv/index.html", 2, "", 1, "");
addItem("100132", "Accuzoeker_20Jetski", "/stroom/accuzoeker-jetski/index.html", 2, "", 1, "");
addItem("100133", "Accuzoeker_20Tractor", "/stroom/accuzoeker-tractor/index.html", 2, "", 1, "");
addItem("100111", "Energie", "/energie/index.html", 1, "", 1, "");
addItem("10066", "Generator", "/energie/generator/index.html", 2, "", 1, "");
addItem("100110", "Zonnepaneel", "/energie/zonnepaneel/index.html", 2, "", 1, "");
addItem("100112", "Windgenerator", "/energie/windgenerator/index.html", 2, "", 1, "");
addItem("100113", "Brandstofcel", "/energie/brandstofcel/index.html", 2, "", 1, "");
addItem("10046", "Klimaat", "/klimaat/index.html", 1, "", 1, "");
addItem("100126", "Verwarmen_20toebehoren", "/klimaat/verwarmen-toebehoren/index.html", 2, "", 1, "");
addItem("10050", "Koelen", "/klimaat/koelen/index.html", 2, "", 1, "");
addItem("10049", "Verwarmen", "/klimaat/verwarmen/index.html", 2, "", 1, "");
addItem("100127", "Koken", "/klimaat/kooktoestel/index.html", 2, "", 1, "");
addItem("100119", "Boiler", "/klimaat/boiler/index.html", 2, "", 1, "");
addItem("100121", "Hydrofoor", "/klimaat/hydrofoor/index.html", 2, "", 1, "");
addItem("1005", "Veiligheid", "/veiligheid/index.html", 1, "", 1, "");
addItem("10098", "Navigatieverlichting", "/veiligheid/navigatieverlichting/index.html", 2, "", 1, "");
addItem("10099", "Dekverlichting", "/veiligheid/navigatieverlichting/dekverlichting/index.html", 3, "", 1, "");
addItem("100100", "Schepen_20tot_2012_20meter", "/veiligheid/navigatieverlichting/schepen-tot-12-meter/index.html", 3, "", 1, "");
addItem("100101", "Schepen_20tot_2020_20meter", "/veiligheid/navigatieverlichting/schepen-tot-20-meter/index.html", 3, "", 1, "");
addItem("100102", "Schepen_20to_2050_20meter", "/veiligheid/navigatieverlichting/schepen-to-50-meter/index.html", 3, "", 1, "");
addItem("100108", "Boot_20beveiliging_20systeem", "/veiligheid/boot-detectie-systeem/index.html", 2, "", 1, "");
addItem("10015", "Epirb", "/veiligheid/epirb/index.html", 2, "", 1, "");
addItem("10016", "Reddingsvlot", "/veiligheid/reddingsvlot/index.html", 2, "", 1, "");
addItem("100106", "Reddingsvest", "/veiligheid/reddingsvest/index.html", 2, "", 1, "");
addItem("10037", "Persoonlijke_20veiligheid", "/veiligheid/persoonlijke-veiligheid/index.html", 2, "", 1, "");
addItem("10062", "Radar_20reflector", "/veiligheid/radar-reflector/index.html", 2, "", 1, "");
addItem("10094", "Apparatuur_20sloten", "/veiligheid/schermslot/index.html", 2, "", 1, "");
addItem("100138", "Brand_20blussysteem", "/veiligheid/brand-blussysteem/index.html", 2, "", 1, "");
addItem("100116", "Vissen", "/vissen/index.html", 1, "", 1, "");
addItem("10027", "Fishfinder", "/vissen/fishfinder/index.html", 2, "", 1, "");
addItem("100159", "Downrigger", "/vissen/downrigger/index.html", 2, "", 1, "");
addItem("10067", "Boot", "/boot/index.html", 1, "", 1, "");
addItem("10095", "Rubberboot", "/boot/rubberboot/index.html", 2, "", 1, "");
addItem("100149", "Rubberboot_20toebehoren", "/boot/rubberboot-toebehoren/index.html", 2, "", 1, "");
addItem("100125", "Kajak", "/boot/kajak/index.html", 2, "", 1, "");
addItem("100109", "Boottrailer", "/boot/boottrailer/index.html", 2, "", 1, "");
addItem("10068", "Dieselmotor", "/boot/dieselmotor/index.html", 2, "", 1, "");
addItem("10096", "Electromotor", "/boot/electromotor/index.html", 2, "", 1, "");
addItem("100124", "Buitenboordmotor", "/boot/buitenboordmotor/index.html", 2, "", 1, "");
addItem("10051", "Boegschroef", "/boot/boegschroef/index.html", 2, "", 1, "");
addItem("10056", "Vuilwatertank", "/boot/vuilwatertank/index.html", 2, "", 1, "");
addItem("100143", "Tankmeter", "/boot/tankmeter/index.html", 2, "", 1, "");
addItem("100118", "Ankerlier", "/boot/ankerlier/index.html", 2, "", 1, "");
addItem("100120", "Ramen", "/boot/ramen/index.html", 2, "", 1, "");
addItem("100122", "Meter", "/boot/niveaumeter/index.html", 2, "", 1, "");
addItem("100123", "Besturing", "/boot/besturing/index.html", 2, "", 1, "");
addItem("10058", "Jachtlak", "/boot/jachtlak/index.html", 2, "", 1, "");
addItem("10059", "Antifouling", "/boot/antifouling/index.html", 2, "", 1, "");
addItem("10060", "Vernis", "/boot/vernis/index.html", 2, "", 1, "");
addItem("10061", "Grondmaterialen", "/boot/grondmaterialen/index.html", 2, "", 1, "");
addItem("10030", "2dehands", "/2dehands/index.html", 1, "", 1, "");
addItem("10031", "Navigatie", "/2dehands/navigatie/index.html", 2, "", 1, "");
addItem("10032", "Communicatie", "/2dehands/communicatie/index.html", 2, "", 1, "");
addItem("10033", "Stroomvoorziening", "/2dehands/stroomvoorziening/index.html", 2, "", 1, "");
addItem("10034", "Comfort", "/2dehands/comfort/index.html", 2, "", 1, "");
addItem("10035", "Veiligheid", "/2dehands/veiligheid/index.html", 2, "", 1, "");
addItem("100142", "Boot", "/2dehands/boot/index.html", 2, "", 1, "");
addItem("100144", "Vissen", "/2dehands/vissen/index.html", 2, "", 1, "");
addItem("100156", "Op=Op", "/opop/index.html", 1, "", 1, "");
addItem("10065", "Nieuws", "/nieuws/index.html", 1, "", 1, "");
addItem("10069", "Info_20en_20prijzen", "/info-en-prijzen/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;
		
	};
};