var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Gurte", "/pi1/index.html", 1, "", 1, "");
addItem("10032", "Klettergurte", "/pi1/pi32/index.html", 2, "", 1, "");
addItem("10033", "Gurtzubeh_C3_B6r", "/pi1/pi33/index.html", 2, "", 1, "");
addItem("1006", "Seile", "/pi6/index.html", 1, "", 1, "");
addItem("1003", "Kletterseile", "/pi6/pi3/index.html", 2, "", 1, "");
addItem("1007", "Seile_20f_C3_BCr_20Kurzklettersysteme", "/pi6/pi7/index.html", 2, "", 1, "");
addItem("1008", "Reepschn_C3_BCre", "/pi6/pi8/index.html", 2, "", 1, "");
addItem("1009", "Klemmknotenseile", "/pi6/pi9/index.html", 2, "", 1, "");
addItem("10011", "Seilzubeh_C3_B6r", "/pi6/pi11/index.html", 2, "", 1, "");
addItem("10012", "Ablass_X2_20und_20F_C3_A4llseile", "/pi6/pi12/index.html", 2, "", 1, "");
addItem("10031", "Haltesysteme", "/pi31/index.html", 1, "", 1, "");
addItem("10034", "Seilk_C3_BCrzer", "/pi34/index.html", 1, "", 1, "");
addItem("10035", "Karabiner", "/pi35/index.html", 1, "", 1, "");
addItem("10036", "PSA_X2Karabiner", "/pi35/pi36/index.html", 2, "", 1, "");
addItem("10037", "Arbeitskarabiner", "/pi35/pi37/index.html", 2, "", 1, "");
addItem("10038", "Auf_X2_20und_20Abstieg", "/pi38/index.html", 1, "", 1, "");
addItem("100152", "Handsteigklemmen", "/pi38/pi152/index.html", 2, "", 1, "");
addItem("100153", "Fu_C3_9Fsteigklemmen_X4_X2schlaufen", "/pi38/pi153/index.html", 2, "", 1, "");
addItem("100154", "Aufstiegs_X2_20und_20Sicherungsger_C3_A4te", "/pi38/pi154/index.html", 2, "", 1, "");
addItem("100155", "Falld_C3_A4mpfer_X4Schlingen", "/pi38/pi155/index.html", 2, "", 1, "");
addItem("100156", "Abseilacht", "/pi38/pi156/index.html", 2, "", 1, "");
addItem("100157", "Systeme", "/pi38/pi157/index.html", 2, "", 1, "");
addItem("10039", "PSA_X2Rollen", "/pi39/index.html", 1, "", 1, "");
addItem("10040", "Rigging", "/pi40/index.html", 1, "", 1, "");
addItem("10041", "Rigging_X2Rollen", "/pi40/pi41/index.html", 2, "", 1, "");
addItem("10042", "Seilbahnbau", "/pi40/pi42/index.html", 2, "", 1, "");
addItem("10043", "Rigging_X2Schlingen", "/pi40/pi43/index.html", 2, "", 1, "");
addItem("10044", "Seileinbau", "/pi44/index.html", 1, "", 1, "");
addItem("10045", "Steigeisen", "/pi45/index.html", 1, "", 1, "");
addItem("10046", "Bremsger_C3_A4te", "/pi46/index.html", 1, "", 1, "");
addItem("10048", "Ausr_C3_BCstungssets", "/pi48/index.html", 1, "", 1, "");
addItem("10049", "S_C3_A4gen", "/pi49/index.html", 1, "", 1, "");
addItem("10050", "Hands_C3_A4gen", "/pi49/pi50/index.html", 2, "", 1, "");
addItem("10051", "Stangens_C3_A4gen", "/pi49/pi51/index.html", 2, "", 1, "");
addItem("10052", "Helme", "/pi52/index.html", 1, "", 1, "");
addItem("10053", "Kletterhelme", "/pi52/pi53/index.html", 2, "", 1, "");
addItem("10054", "Motors_C3_A4genhelme", "/pi52/pi54/index.html", 2, "", 1, "");
addItem("10055", "Helmzubeh_C3_B6r", "/pi52/pi55/index.html", 2, "", 1, "");
addItem("10056", "Rettung", "/pi56/index.html", 1, "", 1, "");
addItem("10057", "Zubeh_C3_B6r", "/pi57/index.html", 1, "", 1, "");
addItem("10058", "Kleidung", "/pi58/index.html", 1, "", 1, "");
addItem("10059", "Arbeitskleidung", "/pi58/pi59/index.html", 2, "", 1, "");
addItem("10060", "Arbeitsschuhe", "/pi58/pi60/index.html", 2, "", 1, "");
addItem("10061", "Arbeitshandschuhe", "/pi58/pi61/index.html", 2, "", 1, "");
addItem("10062", "Freizeit", "/pi62/index.html", 1, "", 1, "");
addItem("10063", "Absperrung", "/pi63/index.html", 1, "", 1, "");
addItem("10064", "Aufbewahrung", "/pi64/index.html", 1, "", 1, "");
addItem("10065", "Safety_20Tree", "/pi65/index.html", 1, "", 1, "");
addItem("10066", "B_C3_BCcher", "/pi66/index.html", 1, "", 1, "");
addItem("10067", "Baummechanik_20und_20_X2kontrolle", "/pi66/pi67/index.html", 2, "", 1, "");
addItem("10068", "Arbeitsverfahren", "/pi66/pi68/index.html", 2, "", 1, "");
addItem("10069", "Botanik_X4Biologie_X4Krankheiten", "/pi66/pi69/index.html", 2, "", 1, "");
addItem("10070", "Geh_C3_B6lzkunde", "/pi66/pi70/index.html", 2, "", 1, "");
addItem("10071", "Baumpflege", "/pi66/pi71/index.html", 2, "", 1, "");
addItem("10072", "Verschiedene", "/pi66/pi72/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;
		
	};
};