var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10032", "Tauchen", "/pi32/index.html", 1, "", 1, "");
addItem("10040", "TAUCHKURSE", "/pi32/pi40/index.html", 2, "", 1, "");
addItem("10048", "OPEN_20WATER_20DIVER_20OWD", "/pi32/pi40/pi48/index.html", 3, "", 1, "");
addItem("10058", "Advanced_20Adventure_20Diver", "/pi32/pi40/pi58/index.html", 3, "", 1, "");
addItem("10050", "Advanced_20Open_20Water_20Diver", "/pi32/pi40/pi50/index.html", 3, "", 1, "");
addItem("10053", "SPEZIALKURSE", "/pi32/pi40/pi53/index.html", 3, "", 1, "");
addItem("10087", "Ausr_C3_BCstung_20und_20Technik", "/pi32/pi40/pi53/pi87/index.html", 4, "", 1, "");
addItem("10063", "Digitale_20Fotografie", "/pi32/pi40/pi53/pi63/index.html", 4, "", 1, "");
addItem("10062", "Enriched_20Air_20NITROX", "/pi32/pi40/pi53/pi62/index.html", 4, "", 1, "");
addItem("10060", "Navigation", "/pi32/pi40/pi53/pi60/index.html", 4, "", 1, "");
addItem("10061", "Nachttauchen", "/pi32/pi40/pi53/pi61/index.html", 4, "", 1, "");
addItem("10086", "Suchen_20und_20Bergen", "/pi32/pi40/pi53/pi86/index.html", 4, "", 1, "");
addItem("10066", "Tarierung_20in_20Perfektion", "/pi32/pi40/pi53/pi66/index.html", 4, "", 1, "");
addItem("10065", "Trockentauchen", "/pi32/pi40/pi53/pi65/index.html", 4, "", 1, "");
addItem("10054", "Stress_20_X7_20Rescue_20Kurs", "/pi32/pi40/pi54/index.html", 3, "", 1, "");
addItem("10052", "Scuba_20Skills_20Update", "/pi32/pi40/pi52/index.html", 3, "", 1, "");
addItem("10059", "KINDERKURSE", "/pi32/pi40/pi59/index.html", 3, "", 1, "");
addItem("10067", "Indoor_20Diver", "/pi32/pi40/pi67/index.html", 3, "", 1, "");
addItem("10051", "Referral_20Kurs", "/pi32/pi40/pi51/index.html", 3, "", 1, "");
addItem("10049", "Scuba_20Diver", "/pi32/pi40/pi49/index.html", 3, "", 1, "");
addItem("10055", "DiveCon_20_X4_20Divemaster", "/pi32/pi40/pi55/index.html", 3, "", 1, "");
addItem("10069", "TAUCHGANGSBEGLEITUNG", "/pi32/pi69/index.html", 2, "", 1, "");
addItem("10046", "Bildergalerie", "/http://www.nicedive4u.de/My Albums/tauchen/album/index.html", 2, "", 1, "_blank");
addItem("10083", "SCHNUPPERTAUCHEN_20OSTSEE_20ab_2010_20Jahre", "/pi32/pi83/index.html", 2, "", 1, "");
addItem("10084", "SCHNUPPERTAUCHEN_20POOL_20ab_208_20Jahre", "/pi32/pi84/index.html", 2, "", 1, "");
addItem("10085", "KitzWorld", "/pi32/pi85/index.html", 2, "", 1, "");
addItem("10038", "Verleih", "/pi32/pi38/index.html", 2, "", 1, "");
addItem("10034", "Revision_20_X4_20Service", "/pi32/pi34/index.html", 2, "", 1, "");
addItem("10081", "Taucher_X2Notdienst", "/pi32/pi81/index.html", 2, "", 1, "");
addItem("10092", "Tauchreisen_20Cocktail_20Divers", "/http://www.cocktaildivers.de/de/booking.php?partner=nicedive4u ", 2, "", 1, "_blank");
addItem("10036", "Tauchreisen_20Indo_20Diver", "/http://indo-diver.com", 2, "", 1, "_blank");
addItem("10056", "Incentives", "/pi32/pi56/index.html", 2, "", 1, "");
addItem("10073", "VIP_20Taucher", "/pi32/pi73/index.html", 2, "", 1, "");
addItem("10080", "Download_20Formulare", "/pi32/pi80/index.html", 2, "", 1, "");
addItem("10089", "Gutschein", "/pi32/pi89/index.html", 2, "", 1, "");
addItem("10090", "Stellenangebote", "/pi32/pi90/index.html", 2, "", 1, "");
addItem("10091", "Tauchversicherung", "/pi32/pi91/index.html", 2, "", 1, "");
addItem("10088", "Verkauf", "/pi88/index.html", 1, "", 1, "");
addItem("10033", "Unterwasser_X2Fotoshooting", "/pi33/index.html", 1, "", 1, "_self");
addItem("10077", "Fotoshooting_20Portrait_X4Ganzk_C3_B6rper_X4Akt", "/http://www.nicedive4u.de/My Albums/portrait_ganzkoerper_akt/album/index.html", 2, "", 1, "_blank");
addItem("10044", "Fotoshooting_20beim_20Baby_X2_20_X7_20Kinderschwimmen", "/http://www.nicedive4u.de/My%20Albums/babyschwimmen/album/index.html", 2, "", 1, "_blank");
};

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;
		
	};
};