var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1006", "News", "/news/index.html", 1, "", 1, "");
addItem("10012", "DSL_20_X4_20Festnetz", "/dsl-festnetz/index.html", 1, "", 1, "");
addItem("1003", "DSL_20Anbieter", "/dsl-festnetz/dsl-anbieter/index.html", 2, "", 1, "");
addItem("1001", "1_X71_20DSL", "/dsl-festnetz/dsl-anbieter/11-dsl/index.html", 3, "", 1, "");
addItem("10010", "ARCOR_20DSL", "/dsl-festnetz/dsl-anbieter/arcor-dsl/index.html", 3, "", 1, "");
addItem("10017", "freenet_20DSL", "/dsl-festnetz/dsl-anbieter/freenet-dsl/index.html", 3, "", 1, "");
addItem("10030", "T_X2COM_20_X4_20T_X2Online_20DSL", "/dsl-festnetz/dsl-anbieter/t-com-t-online-dsl/index.html", 3, "", 1, "");
addItem("10042", "Festnetz_20Telefone", "/dsl-festnetz/festnetz-telefone/index.html", 2, "", 1, "");
addItem("10018", "Handys_20ohne_20Vertrag", "/handys-ohne-vertrag/index.html", 1, "", 1, "");
addItem("100151", "Nokia", "/handys-ohne-vertrag/nokia/index.html", 2, "", 1, "");
addItem("100152", "Samsung", "/handys-ohne-vertrag/samsung/index.html", 2, "", 1, "");
addItem("100153", "Motorola", "/handys-ohne-vertrag/motorola/index.html", 2, "", 1, "");
addItem("100154", "Sony_20Ericsson", "/handys-ohne-vertrag/sony-ericsson/index.html", 2, "", 1, "");
addItem("100155", "LG_20Electronics", "/handys-ohne-vertrag/lg-electronics/index.html", 2, "", 1, "");
addItem("100156", "HTC", "/handys-ohne-vertrag/htc/index.html", 2, "", 1, "");
addItem("100157", "BlackBerry", "/handys-ohne-vertrag/blackberry/index.html", 2, "", 1, "");
addItem("100158", "Emporia", "/handys-ohne-vertrag/emporia/index.html", 2, "", 1, "");
addItem("100178", "Sonstige", "/handys-ohne-vertrag/sonstige/index.html", 2, "", 1, "");
addItem("10027", "Handys_20mit_20Vertrag", "/http://www.handymitvertrag.de", 1, "", 1, "_blank");
addItem("100143", "Handyzubeh_C3_B6r", "/handyzubehoer/index.html", 1, "", 1, "");
addItem("100144", "Akkus", "/handyzubehoer/akkus/index.html", 2, "", 1, "");
addItem("100146", "Taschen", "/handyzubehoer/taschen/index.html", 2, "", 1, "");
addItem("100145", "Headsets", "/handyzubehoer/headsets/index.html", 2, "", 1, "");
addItem("100147", "Datenkabel", "/handyzubehoer/datenkabel/index.html", 2, "", 1, "");
addItem("10023", "SIM_X2Karten", "/handyzubehoer/sim-karten/index.html", 2, "", 1, "");
addItem("100148", "Ladeger_C3_A4te", "/handyzubehoer/ladegeraete/index.html", 2, "", 1, "");
addItem("100149", "Speicherkarten", "/handyzubehoer/speicherkarten/index.html", 2, "", 1, "");
addItem("10035", "Handyversicherung", "/handyzubehoer/handyversicherung/index.html", 2, "", 1, "");
addItem("100150", "Sonstiges", "/handyzubehoer/sonstiges/index.html", 2, "", 1, "");
addItem("100159", "Navigation", "/navigation/index.html", 1, "", 1, "");
addItem("100160", "Mobile_20Ger_C3_A4te", "/navigation/mobile-geraete/index.html", 2, "", 1, "");
addItem("100161", "Zubeh_C3_B6r", "/navigation/zubehoer/index.html", 2, "", 1, "");
addItem("100162", "Multimedia_20_X7_20Co_X3", "/multimedia/index.html", 1, "", 1, "");
addItem("100215", "Beamer", "/multimedia/beamer/index.html", 2, "", 1, "");
addItem("100170", "MP3_20Player", "/multimedia/mp3-player/index.html", 2, "", 1, "");
addItem("100216", "Digitale_20Bilderrahmen", "/multimedia/bilderrahmen/index.html", 2, "", 1, "");
addItem("100214", "Notebooks_20_X4_20Netbooks", "/multimedia/notebooks-netbooks/index.html", 2, "", 1, "");
addItem("100238", "Sonstiges", "/multimedia/sonstiges/index.html", 2, "", 1, "");
addItem("10032", "Klingelt_C3_B6ne_20_X4_20Logos", "/klingeltoene-logos/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;
		
	};
};