var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "ABC_20Ausr_C3_BCstung", "/abc/index.html", 1, "", 1, "");
addItem("1002", "Masken", "/abc/tauchmasken/index.html", 2, "", 1, "");
addItem("10054", "optische_20Gl_C3_A4ser", "/abc/tauchmasken/optische-glaeser/index.html", 3, "", 1, "");
addItem("10055", "Zubeh_C3_B6r", "/abc/tauchmasken/zubehoer/index.html", 3, "", 1, "");
addItem("1003", "Schnorchel", "/abc/schnorchel/index.html", 2, "", 1, "");
addItem("1004", "Flossen", "/abc/flossen/index.html", 2, "", 1, "");
addItem("100158", "Full_20Food", "/abc/flossen/full-food/index.html", 3, "", 1, "");
addItem("10039", "Zubeh_C3_B6r", "/abc/flossen/zubehoer/index.html", 3, "", 1, "");
addItem("100104", "Schnorcheln", "/schnorcheln2/index.html", 1, "", 1, "");
addItem("100105", "Maskensets", "/schnorcheln2/maskensets/index.html", 2, "", 1, "");
addItem("100106", "Flossen", "/schnorcheln2/flossen/index.html", 2, "", 1, "");
addItem("100107", "Komplettsets", "/schnorcheln2/komplettsets/index.html", 2, "", 1, "");
addItem("100108", "Kids", "/schnorcheln2/kids/index.html", 2, "", 1, "");
addItem("100109", "Schutzkleidung", "/schnorcheln2/schutzkleidung/index.html", 2, "", 1, "");
addItem("100110", "Schuhe", "/schnorcheln2/schuhe/index.html", 2, "", 1, "");
addItem("100113", "Taschen", "/schnorcheln2/taschen/index.html", 2, "", 1, "");
addItem("100112", "Zubeh_C3_B6r", "/schnorcheln2/zubehoer/index.html", 2, "", 1, "");
addItem("1006", "Atemregler", "/atemregler/index.html", 1, "", 1, "");
addItem("100135", "Apeks", "/atemregler/apeks/index.html", 2, "", 1, "");
addItem("100141", "Octopusse", "/atemregler/apeks/octopusse/index.html", 3, "", 1, "");
addItem("100142", "Sets", "/atemregler/apeks/sets/index.html", 3, "", 1, "");
addItem("100136", "Aqualung", "/atemregler/aqualung/index.html", 2, "", 1, "");
addItem("100144", "Octopusse", "/atemregler/aqualung/octopusse/index.html", 3, "", 1, "");
addItem("100145", "Sets", "/atemregler/aqualung/sets/index.html", 3, "", 1, "");
addItem("100137", "Mares", "/atemregler/mares/index.html", 2, "", 1, "");
addItem("100148", "Octopusse", "/atemregler/mares/octopusse/index.html", 3, "", 1, "");
addItem("100149", "Sets", "/atemregler/mares/sets/index.html", 3, "", 1, "");
addItem("100138", "Oceanic", "/atemregler/oceanic/index.html", 2, "", 1, "");
addItem("100151", "Sets", "/atemregler/oceanic/sets/index.html", 3, "", 1, "");
addItem("10038", "Zubeh_C3_B6r", "/atemregler/zubehoer/index.html", 2, "", 1, "");
addItem("10018", "Tarierjackets", "/tarierjackets/index.html", 1, "", 1, "");
addItem("100130", "Aqualung", "/tarierjackets/aqualung/index.html", 2, "", 1, "");
addItem("100131", "Mares", "/tarierjackets/mares2/index.html", 2, "", 1, "");
addItem("100132", "Oceanic", "/tarierjackets/oceanic2/index.html", 2, "", 1, "");
addItem("100133", "Seemann_20Sub", "/tarierjackets/seemann-sub2/index.html", 2, "", 1, "");
addItem("10047", "Zubeh_C3_B6r", "/tarierjackets/zubehoer/index.html", 2, "", 1, "");
addItem("1009", "Tauchcomputer", "/tauchcomputer/index.html", 1, "", 1, "");
addItem("100114", "Mares", "/tauchcomputer/mares2/index.html", 2, "", 1, "");
addItem("100118", "Zubeh_C3_B6r", "/tauchcomputer/mares2/zubehoer/index.html", 3, "", 1, "");
addItem("100115", "Oceanic", "/tauchcomputer/oceanic2/index.html", 2, "", 1, "");
addItem("100119", "Zubeh_C3_B6r", "/tauchcomputer/oceanic2/zubehoer/index.html", 3, "", 1, "");
addItem("100116", "Suunto", "/tauchcomputer/suunto2/index.html", 2, "", 1, "");
addItem("100120", "Zubeh_C3_B6r", "/tauchcomputer/suunto2/zubehoer/index.html", 3, "", 1, "");
addItem("100117", "Seemann_20Sub", "/tauchcomputer/seemann-sub2/index.html", 2, "", 1, "");
addItem("100160", "Aeris", "/tauchcomputer/aeris/index.html", 2, "", 1, "");
addItem("1008", "Instrumente", "/instrumente/index.html", 1, "", 1, "");
addItem("1007", "Tauchanz_C3_BCge", "/tauchanzuege/index.html", 1, "", 1, "");
addItem("10029", "1_20_X2_203_20mm_20Neopren", "/tauchanzuege/1-3-mm/index.html", 2, "", 1, "");
addItem("10030", "4_20_X2_205_20mm_20Neopren", "/tauchanzuege/4-5-mm-neopren/index.html", 2, "", 1, "");
addItem("10031", "6_20_X2_207_20mm_20Neopren", "/tauchanzuege/6-7-mm-neopren/index.html", 2, "", 1, "");
addItem("10033", "Zubeh_C3_B6r", "/tauchanzuege/zubehoer/index.html", 2, "", 1, "");
addItem("10032", "Trockentauchanz_C3_BCge", "/tauchanzuege/trockenanzuege/index.html", 2, "", 1, "");
addItem("10034", "Trockentauchzubeh_C3_B6r", "/tauchanzuege/trockentauchzubehoer/index.html", 2, "", 1, "");
addItem("10041", "Kopfhauben", "/tauchanzuege/kopfhauben/index.html", 2, "", 1, "");
addItem("10022", "Handschuhe", "/handschuhe/index.html", 1, "", 1, "");
addItem("10023", "F_C3_BCsslinge", "/fuesslinge/index.html", 1, "", 1, "");
addItem("10046", "Messer", "/messer/index.html", 1, "", 1, "");
addItem("10010", "Taschen_20_X7_20Beh_C3_A4lter", "/taschen-behaelter/index.html", 1, "", 1, "");
addItem("100154", "Aqualung", "/taschen-behaelter/aqualung/index.html", 2, "", 1, "");
addItem("100155", "Mares", "/taschen-behaelter/mares/index.html", 2, "", 1, "");
addItem("100156", "Oceanic", "/taschen-behaelter/oceanic/index.html", 2, "", 1, "");
addItem("100157", "Seemann_20Sub", "/taschen-behaelter/seemann-sub/index.html", 2, "", 1, "");
addItem("10014", "Lampen", "/lampen/index.html", 1, "", 1, "");
addItem("10044", "Akku", "/lampen/akku/index.html", 2, "", 1, "");
addItem("10045", "Batterie", "/lampen/batterie/index.html", 2, "", 1, "");
addItem("10012", "Sicherheit", "/sicherheit/index.html", 1, "", 1, "");
addItem("10042", "Flaschen_20_X7_20Blei", "/flaschen-blei/index.html", 1, "", 1, "");
addItem("10011", "Pflege", "/pflege/index.html", 1, "", 1, "");
addItem("10013", "Foto", "/foto/index.html", 1, "", 1, "");
addItem("10019", "Logb_C3_BCcher", "/logbuecher/index.html", 1, "", 1, "");
addItem("10017", "Tools", "/tools/index.html", 1, "", 1, "");
addItem("10056", "Kids", "/kids/index.html", 1, "", 1, "");
addItem("10015", "Padi", "/padi/index.html", 1, "", 1, "");
addItem("10024", "Sonderposten", "/restposten/index.html", 1, "", 1, "");
addItem("100159", "ABC", "/restposten/abc/index.html", 2, "", 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;
		
	};
};