var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1007", "Die_20Kanzlei", "/die-kanzlei/kanzlei-dortmund.html", 1, "", 1, "");
addItem("1008", "Kompetenz", "/kompetenz/rechtsanwalt.html", 1, "", 1, "");
addItem("10011", "Fachanwalt", "/kompetenz/fachanwalt/fachanwalt-spiralski-dortmund.html", 2, "", 1, "");
addItem("10012", "Gebiete", "/kompetenz/fachanwalt/gebiete/rechtsgebiete.html", 3, "", 1, "");
addItem("10013", "Mehr_20Qualifikation", "/kompetenz/fachanwalt/mehr-qualifikation/anwalt-dortmund.html", 3, "", 1, "");
addItem("10014", "Kenntnisse", "/kompetenz/fachanwalt/kenntnisse/rechtsgebiete.html", 3, "", 1, "");
addItem("10015", "Praxiserfahrung", "/kompetenz/fachanwalt/praxiserfahrung/fachanwalt-rechtsanwalt.html", 3, "", 1, "");
addItem("10016", "DAV", "/kompetenz/dav/deutscher-anwaltsverein.html", 2, "", 1, "");
addItem("10017", "AG_20Verkehrsrecht", "/kompetenz/ag-verkehrsrecht/verkehrsrecht-dortmund.html", 2, "", 1, "");
addItem("10018", "AG_20Familienrecht", "/kompetenz/ag-familienrecht/familienrecht.html", 2, "", 1, "");
addItem("10019", "AG_20Arbeitsrecht", "/kompetenz/ag-arbeitsrecht/arbeitsrecht-dortmund.html", 2, "", 1, "");
addItem("1009", "Rechtsgebiete", "/rechtsgebiete/rechtsgebiete.html", 1, "", 1, "");
addItem("10022", "Familienrecht", "/rechtsgebiete/familienrecht/familienrecht-dortmund.html", 2, "", 1, "");
addItem("10023", "Verkehrsrecht", "/rechtsgebiete/verkehrsrecht/verkehrsrecht-dortmund.html", 2, "", 1, "");
addItem("10020", "Arbeitsrecht", "/rechtsgebiete/arbeitsrecht/arbeitsrecht-dortmund.html", 2, "", 1, "");
addItem("10010", "Service", "/service/index.html", 1, "", 1, "");
addItem("10025", "Aktuelles", "/service/aktuelles/index.html", 2, "", 1, "");
addItem("10026", "Dokumente", "/service/dokumente/index.html", 2, "", 1, "");
addItem("10027", "Rechtslinks", "/service/rechtslinks/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;
		
	};
};