var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1003", "Modellbahn_20(6801)", "/modellbahn/index.html", 1, "", 1, "");
addItem("10077", "Barin_20(8)", "/modellbahn/barin/index.html", 2, "barin-medium.jpg", 1, "");
addItem("10017", "Bemo_20(200)", "/modellbahn/bemo/index.html", 2, "bemo-medium.jpg", 1, "");
addItem("10018", "Bloxxs_20(64)", "/modellbahn/bloxxs/index.html", 2, "bloxxs-medium.jpg", 1, "");
addItem("10019", "Brawa_20(124)", "/modellbahn/brawa/index.html", 2, "brawa-medium.jpg", 1, "");
addItem("10011", "Busch_20(186)", "/modellbahn/busch/index.html", 2, "buschrot-medium.gif", 1, "");
addItem("10025", "ESU_20(60)", "/modellbahn/esu/index.html", 2, "esu-medium.jpg", 1, "");
addItem("10026", "Faller_20(231)", "/modellbahn/faller/index.html", 2, "faller-medium.jpg", 1, "");
addItem("10027", "Fides_20(19)", "/modellbahn/fides/index.html", 2, "fides-medium.jpg", 1, "");
addItem("10028", "Fleischmann_20(305)", "/modellbahn/fleischmann/index.html", 2, "fleischmann-medium.jpg", 1, "");
addItem("10031", "Hag_20(85)", "/modellbahn/hag/index.html", 2, "hag-medium-2.jpg", 1, "");
addItem("10032", "Heki_20(140)", "/modellbahn/heki/index.html", 2, "heki-medium.jpg", 1, "");
addItem("10033", "Herpa_20(240)", "/modellbahn/herpa/index.html", 2, "herpa-medium.jpg", 1, "");
addItem("10035", "Kibri_20(137)", "/modellbahn/kibri/index.html", 2, "kibri-medium.jpg", 1, "");
addItem("10037", "Lebu_20(6)", "/modellbahn/lebu/index.html", 2, "lebu-medium.jpg", 1, "");
addItem("10039", "LGB_20(102)", "/modellbahn/lgb/index.html", 2, "lgb-medium.jpg", 1, "");
addItem("10040", "LH_20Modellbautechnik_20(8)", "/modellbahn/lh-modellbautechnik/index.html", 2, "lh-modellbau-medium-2.jpg", 1, "");
addItem("10041", "Liliput_20(89)", "/modellbahn/liliput/index.html", 2, "liliput-medium.jpg", 1, "");
addItem("10042", "Littfinksi_20(51)", "/modellbahn/littfinksi/index.html", 2, "ldt-logo-medium.jpg", 1, "");
addItem("10070", "Littke_20(5)", "/modellbahn/littke/index.html", 2, "littke-modelle-medium.gif", 1, "");
addItem("10044", "Luft_20Modellbau_20(3)", "/modellbahn/luft-modellbau/index.html", 2, "modellbau-luft-medium.jpg", 1, "");
addItem("10045", "Lux_20(8)", "/modellbahn/lux/index.html", 2, "lux-medium.jpg", 1, "");
addItem("10046", "Mader_20(13)", "/modellbahn/mader/index.html", 2, "mader-medium.jpg", 1, "");
addItem("1004", "M_C3_A4rklin_20(702)", "/modellbahn/maerklin/index.html", 2, "maerklin-medium.jpg", 1, "");
addItem("10048", "Massoth_20(169)", "/modellbahn/massoth/index.html", 2, "massoth-medium-2.jpg", 1, "");
addItem("10072", "Microscale_20Models_20(421)", "/modellbahn/microscale-models/index.html", 2, "microscale-medium.jpg", 1, "");
addItem("10051", "Noch_20(1885)", "/modellbahn/noch/index.html", 2, "noch-medium.jpg", 1, "");
addItem("10052", "Peco_20(58)", "/modellbahn/peco/index.html", 2, "peco-medium.jpg", 1, "");
addItem("10053", "Piko_20(45)", "/modellbahn/piko/index.html", 2, "piko-medium.jpg", 1, "");
addItem("10054", "Pola_20(21)", "/modellbahn/pola/index.html", 2, "pola-medium.jpg", 1, "");
addItem("10055", "Preiser_20(193)", "/modellbahn/preiser/index.html", 2, "preiser-medium.jpg", 1, "");
addItem("10059", "Roco_20(617)", "/modellbahn/roco/index.html", 2, "roco-medium.jpg", 1, "");
addItem("10060", "Sommerfeldt_20(97)", "/modellbahn/sommerfeldt/index.html", 2, "sommerfeldt-medium.jpg", 1, "");
addItem("10062", "Titan_20(5)", "/modellbahn/titan/index.html", 2, "titan-medium.jpg", 1, "");
addItem("10063", "Trix_20(219)", "/modellbahn/trix/index.html", 2, "trix-medium.jpg", 1, "");
addItem("10010", "Viessmann_20(132)", "/modellbahn/viessmann/index.html", 2, "viessmann-medium.jpg", 1, "");
addItem("10065", "Vollmer_20(112)", "/modellbahn/vollmer/index.html", 2, "vollmer-medium.jpg", 1, "");
addItem("10066", "Wiking_20(28)", "/modellbahn/wiking/index.html", 2, "wiking-medium.gif", 1, "");
addItem("10068", "Zimo_20(13)", "/modellbahn/zimo/index.html", 2, "zimo-medium.jpg", 1, "");
addItem("1005", "RC_X2Modellbau_20(1395)", "/rc-modellbau/index.html", 1, "", 1, "");
addItem("10022", "Carson_20(63)", "/rc-modellbau/carson/index.html", 2, "carson-medium.jpg", 1, "");
addItem("10024", "E_X2Flite_20(80)", "/rc-modellbau/e-flite/index.html", 2, "e-flite-medium.jpg", 1, "");
addItem("10030", "Graupner_20(223)", "/rc-modellbau/graupner/index.html", 2, "graupner-medium.jpg", 1, "");
addItem("10034", "HPI_20(31)", "/rc-modellbau/hpi/index.html", 2, "hpi-medium.jpg", 1, "");
addItem("10036", "Kyosho_20(3)", "/rc-modellbau/kyosho/index.html", 2, "kyosho-medium.jpg", 1, "");
addItem("10043", "LRP_20(93)", "/rc-modellbau/lrp/index.html", 2, "lrp-medium.jpg", 1, "");
addItem("10050", "Multiplex_20(99)", "/rc-modellbau/multiplex/index.html", 2, "multiplex-medium.jpg", 1, "");
addItem("10058", "Robbe_20(474)", "/rc-modellbau/robbe/index.html", 2, "robbe-medium.jpg", 1, "");
addItem("10061", "Tamiya_20(329)", "/rc-modellbau/tamiya/index.html", 2, "tamiya-medium.jpg", 1, "");
addItem("1006", "Slotcar_20(157)", "/slottcar/index.html", 1, "", 1, "");
addItem("10021", "Carrera_20(157)", "/slottcar/carrera/index.html", 2, "carrera-medium.jpg", 1, "");
addItem("10016", "Modellbau_20(709)", "/modellbau/index.html", 1, "", 1, "");
addItem("10023", "Constructo_20(147)", "/modellbau/constructo/index.html", 2, "constructo-medium.jpg", 1, "");
addItem("10029", "Games_20Workshop_20(249)", "/modellbau/games-workshop/index.html", 2, "games-wo-medium.jpg", 1, "");
addItem("10056", "Proxxon_20(29)", "/modellbau/proxxon/index.html", 2, "proxxon-medium.gif", 1, "");
addItem("10057", "Revell_20(252)", "/modellbau/revell/index.html", 2, "revell-medium.jpg", 1, "");
addItem("10067", "Wilesco_20(8)", "/modellbau/wilesco/index.html", 2, "wilesco-medium.gif", 1, "");
addItem("10071", "UH_20Modell_20(24)", "/modellbau/uh-modell/index.html", 2, "uh-medium.jpg", 1, "");
addItem("10069", "Spielwaren_20(254)", "/spielwaren/index.html", 1, "", 1, "");
addItem("10038", "Lego_20(254)", "/spielwaren/lego/index.html", 2, "lego-medium.gif", 1, "");
addItem("1008", "Aktionen_20(3)", "/aktionen/index.html", 1, "", 1, "");
addItem("10074", "Neu_20(2)", "/neu/index.html", 1, "", 1, "");
addItem("10076", "Monats_20Hit_20(2)", "/monats-hit/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='<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;
		
	};
};