var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1002090", "diverse_20Ersatzteile_20laut_20Anfrage", "/diverse-ersatzteile-laut-anfrage/index2.html", 1, "", 1, "");
addItem("1002091", "absolute_20Topseller", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002093", "Abgastechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002094", "Antriebstechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002097", "Bremstechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("10089", "Elektrotechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "zuendk_.gif", 1, "");
addItem("1002102", "Federungstechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002099", "Getriebetechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002095", "Klimatechnik", "/seite-nicht-gefunden-404.html", 1, "", 1, "");
addItem("1002100", "Kupplungstechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002096", "K_C3_BChltechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002098", "Lenkungstechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002103", "Radlagertechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002101", "Sto_C3_9Fd_C3_A4mpfertechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002108", "Kraftstofftechnik", "/http://www.guth-ersatzteile.com/kontakt.html", 1, "", 1, "");
addItem("1002110", "Karosserieteile", "/http://www.guth-ersatzteile.com/kontakt.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='<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;
		
	};
};