var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Modellautos_201:43_20(634)", "/autos-143/index.html", 1, "", 1, "");
addItem("10063", "Alfa_20Romeo_20(18)", "/autos-143/alfa-romeo/index.html", 2, "", 1, "");
addItem("10051", "Aston_20Martin_20(14)", "/autos-143/aston-martin/index.html", 2, "", 1, "");
addItem("1005", "Audi_20(46)", "/autos-143/audi/index.html", 2, "", 1, "");
addItem("10028", "BMW_20(14)", "/autos-143/bmw/index.html", 2, "", 1, "");
addItem("100107", "Citroen_20(12)", "/autos-143/citroen/index.html", 2, "", 1, "");
addItem("10077", "Corvette_20(7)", "/autos-143/corvette/index.html", 2, "", 1, "");
addItem("10048", "Ferrari_20(11)", "/autos-143/ferrari/index.html", 2, "", 1, "");
addItem("100102", "Fiat_20(11)", "/autos-143/fiat/index.html", 2, "", 1, "");
addItem("10043", "Ford_20(23)", "/autos-143/ford/index.html", 2, "", 1, "");
addItem("100119", "IFA_20(DDR)_20(44)", "/autos-143/ifa-ddr/index.html", 2, "", 1, "");
addItem("10052", "Jaguar_20(7)", "/autos-143/jaguar/index.html", 2, "", 1, "");
addItem("10053", "Lamborghini_20(10)", "/autos-143/lamborghini/index.html", 2, "", 1, "");
addItem("10056", "Lancia_20(20)", "/autos-143/lancia/index.html", 2, "", 1, "");
addItem("10049", "Maserati_20(4)", "/autos-143/maserati/index.html", 2, "", 1, "");
addItem("100116", "Mazda_20(5)", "/autos-143/mazda/index.html", 2, "", 1, "");
addItem("10078", "McLaren_20(6)", "/autos-143/mclaren/index.html", 2, "", 1, "");
addItem("10047", "Mercedes_20(28)", "/autos-143/mercedes/index.html", 2, "", 1, "");
addItem("100129", "Nissan_20(5)", "/autos-143/nissan/index.html", 2, "", 1, "");
addItem("100108", "NSU_20(5)", "/autos-143/nsu/index.html", 2, "", 1, "");
addItem("10073", "Opel_20(13)", "/autos-143/opel/index.html", 2, "", 1, "");
addItem("10050", "Peugeot_20(11)", "/autos-143/peugeot/index.html", 2, "", 1, "");
addItem("1004", "Porsche_20(48)", "/autos-143/porsche/index.html", 2, "", 1, "");
addItem("100112", "Renault_20(10)", "/autos-143/renault/index.html", 2, "", 1, "");
addItem("100131", "Saab_20(2)", "/autos-143/saab/index.html", 2, "", 1, "");
addItem("10082", "Subaru_20(6)", "/autos-143/subaru/index.html", 2, "", 1, "");
addItem("100126", "Toyota_20(8)", "/autos-143/toyota/index.html", 2, "", 1, "");
addItem("100133", "Triumph_20(2)", "/autos-143/triumph/index.html", 2, "", 1, "");
addItem("10067", "Volkswagen_20(37)", "/autos-143/volkswagen/index.html", 2, "", 1, "");
addItem("100105", "Volvo_20(5)", "/autos-143/volvo/index.html", 2, "", 1, "");
addItem("10057", "sonstige_20Marken_20(63)", "/autos-143/sonstige-marken/index.html", 2, "", 1, "");
addItem("1009", "NEU_20im_20Shop_20_X2_201:43_20(48)", "/autos-143/neuheiten-143/index.html", 2, "", 1, "");
addItem("10065", "Neuank_C3_BCndigungen_20(91)", "/autos-143/neuankuendigungen-143/index.html", 2, "", 1, "");
addItem("1002", "Modellautos_201:18_20(303)", "/autos-118/index.html", 1, "", 1, "");
addItem("100121", "Alfa_20Romeo_20(4)", "/autos-118/alfa-romeo/index.html", 2, "", 1, "");
addItem("100130", "Aston_20Martin_20(4)", "/autos-118/aston-martin/index.html", 2, "", 1, "");
addItem("10084", "Audi_20(19)", "/autos-118/audi/index.html", 2, "", 1, "");
addItem("10075", "BMW_20(23)", "/autos-118/bmw/index.html", 2, "", 1, "");
addItem("100125", "Citroen_20(6)", "/autos-118/citroen/index.html", 2, "", 1, "");
addItem("10035", "Ferrari_20(16)", "/autos-118/ferrari/index.html", 2, "", 1, "");
addItem("100111", "Fiat_20(9)", "/autos-118/fiat/index.html", 2, "", 1, "");
addItem("100113", "Ford_20(8)", "/autos-118/ford/index.html", 2, "", 1, "");
addItem("10099", "Jaguar_20(4)", "/autos-118/jaguar/index.html", 2, "", 1, "");
addItem("10032", "Lamborghini_20(13)", "/autos-118/lamborghini/index.html", 2, "", 1, "");
addItem("10079", "Lotus_20(2)", "/autos-118/lotus/index.html", 2, "", 1, "");
addItem("10083", "Opel_20(11)", "/autos-118/opel/index.html", 2, "", 1, "");
addItem("10034", "Porsche_20(41)", "/autos-118/porsche/index.html", 2, "", 1, "");
addItem("100110", "Maserati_20(3)", "/autos-118/maserati/index.html", 2, "", 1, "");
addItem("10054", "Mercedes_20(27)", "/autos-118/mercedes/index.html", 2, "", 1, "");
addItem("100114", "Trabant_20(3)", "/autos-118/trabant/index.html", 2, "", 1, "");
addItem("10085", "Volkswagen_20(10)", "/autos-118/volkswagen/index.html", 2, "", 1, "");
addItem("10055", "NEU_20im_20Shop_20_X2_201:18_20(36)", "/autos-118/neuheiten-118/index.html", 2, "", 1, "");
addItem("10066", "Neuank_C3_BCndigungen_20(64)", "/autos-118/neuankuendigungen-118/index.html", 2, "", 1, "");
addItem("1007", "Modellhersteller_20(669)", "/hersteller/index.html", 1, "", 1, "");
addItem("10076", "AUTOart_20(27)", "/hersteller/autoart-models/index.html", 2, "", 1, "");
addItem("10094", "Brumm_20(6)", "/hersteller/brumm/index.html", 2, "", 1, "");
addItem("10080", "CMC_20(2)", "/hersteller/cmc/index.html", 2, "", 1, "");
addItem("100128", "Ebbro_20(12)", "/hersteller/ebbro/index.html", 2, "", 1, "");
addItem("100124", "Fujimi_20(5)", "/hersteller/fujimi/index.html", 2, "", 1, "");
addItem("10018", "Hot_20Works_20Racing_20(11)", "/hersteller/hotworksracing/index.html", 2, "", 1, "");
addItem("1008", "HPI_20Racing_20(45)", "/hersteller/hpi-racing/index.html", 2, "", 1, "");
addItem("10064", "iST_20MODELS_20(62)", "/hersteller/ist-models/index.html", 2, "", 1, "");
addItem("10013", "ixo_20MODELS_20(100)", "/hersteller/ixo/index.html", 2, "", 1, "");
addItem("10096", "Kyosho_20(20)", "/hersteller/kyosho/index.html", 2, "", 1, "");
addItem("100101", "M4_20Modelcars_20(10)", "/hersteller/m4-modelcars/index.html", 2, "", 1, "");
addItem("10019", "Mattel_X2Elite_20(25)", "/hersteller/elite/index.html", 2, "", 1, "");
addItem("10021", "1:43_20(10)", "/hersteller/elite/143/index.html", 3, "", 1, "");
addItem("10020", "1:18_20(15)", "/hersteller/elite/118/index.html", 3, "", 1, "");
addItem("10069", "Minichamps_20(57)", "/hersteller/minichamps/index.html", 2, "", 1, "");
addItem("10070", "1:43_20(38)", "/hersteller/minichamps/143/index.html", 3, "", 1, "");
addItem("10071", "1:18_20(19)", "/hersteller/minichamps/118/index.html", 3, "", 1, "");
addItem("100132", "Model_X2Icons_20(2)", "/hersteller/model-icons/index.html", 2, "", 1, "");
addItem("100109", "Mondo_20Motors_20(12)", "/hersteller/mondo-motors/index.html", 2, "", 1, "");
addItem("10015", "NOREV_20(143)", "/hersteller/norev/index.html", 2, "", 1, "");
addItem("10016", "1:43_20(77)", "/hersteller/norev/143/index.html", 3, "", 1, "");
addItem("10017", "1:18_20(66)", "/hersteller/norev/118/index.html", 3, "", 1, "");
addItem("10074", "Premium_20ClassiXXs_20(5)", "/hersteller/premium-classixxs/index.html", 2, "", 1, "");
addItem("100123", "PremiumXmodels_20(8)", "/hersteller/premiumxmodels/index.html", 2, "", 1, "");
addItem("100120", "Revell_20(5)", "/hersteller/revell/index.html", 2, "", 1, "");
addItem("10072", "Schuco_20(38)", "/hersteller/schuco/index.html", 2, "", 1, "");
addItem("100115", "Spark_20(15)", "/hersteller/spark/index.html", 2, "", 1, "");
addItem("100127", "Starline_20(12)", "/hersteller/starline/index.html", 2, "", 1, "");
addItem("10022", "Sun_20Star_20(20)", "/hersteller/sun-star/index.html", 2, "", 1, "");
addItem("10095", "Trofeu_20(7)", "/hersteller/trofeu/index.html", 2, "", 1, "");
addItem("10097", "TrueScale_20(18)", "/hersteller/truescale/index.html", 2, "", 1, "");
addItem("100103", "1:43_20(13)", "/hersteller/truescale/143/index.html", 3, "", 1, "");
addItem("100104", "1:18_20(5)", "/hersteller/truescale/118/index.html", 3, "", 1, "");
addItem("10023", "Vitesse_20(2)", "/hersteller/vitesse/index.html", 2, "", 1, "");
addItem("10060", "Modelle_20nach_20Themen_20(203)", "/fahrzeuge-nach-themen/index.html", 1, "", 1, "");
addItem("10061", "24_20Stunden_20Le_20Mans_20(98)", "/fahrzeuge-nach-themen/24-stunden-le-mans/index.html", 2, "", 1, "");
addItem("10059", "Le_20Mans_20Gewinner_20(13)", "/fahrzeuge-nach-themen/le-mans-gewinner/index.html", 2, "", 1, "");
addItem("10058", "Fahrzeuge_20der_20DDR_20(58)", "/fahrzeuge-nach-themen/ddr/index.html", 2, "", 1, "");
addItem("10037", "Nutzfahrzeuge_20(34)", "/fahrzeuge-nach-themen/nutzfahrzeuge/index.html", 2, "", 1, "");
addItem("100137", "Zubeh_C3_B6r_20(4)", "/zubehoer/index.html", 1, "", 1, "");
addItem("100135", "Figuren_201:18_20(2)", "/zubehoer/figuren-118/index.html", 2, "", 1, "");
addItem("100136", "Motoren_201:18_20(2)", "/zubehoer/motoren-118/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;
		
	};
};