var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Leistungen", "/pi1/index.html", 1, "", 1, "");
addItem("10029", "Gestaltung", "/pi1/pi29/index.html", 2, "", 1, "");
addItem("1009", "Pr_C3_A4parationen", "/pi9/index.html", 1, "", 1, "");
addItem("10028", "Altpr_C3_A4parate", "/pi9/pi28/index.html", 2, "", 1, "");
addItem("10033", "Pr_C3_A4parationen_20in_20Pforzheim", "/pi9/pi33/index.html", 2, "", 1, "");
addItem("10022", "S_C3_A4ugetiere", "/pi22/index.html", 1, "", 1, "");
addItem("1008", "Fische", "/pi8/index.html", 1, "", 1, "");
addItem("1007", "V_C3_B6gel", "/pi7/index.html", 1, "", 1, "");
addItem("10032", "Fotogalerie", "/http://praeparationen-neumann.de/Praeparationen/", 1, "", 1, "_blank");
addItem("1004", "Verk_C3_A4ufe", "/pi4/index.html", 1, "", 1, "");
addItem("1002", "Tipps", "/pi2/index.html", 1, "", 1, "");
addItem("10034", "Troph_C3_A4enbehandlung", "/pi2/pi34/index.html", 2, "", 1, "");
addItem("10027", "Workshops", "/pi27/index.html", 1, "", 1, "");
addItem("1003", "Downloads", "/pi3/index.html", 1, "", 1, "");
addItem("10030", "Links", "/pi30/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='<Themen>';
			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;
		
	};
};