var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "DrayTek_20Vigor_20Modem_20Router", "/draytek-vigor-adsl-modem-router/index.htm", 1, "", 1, "");
addItem("100128", "DrayTek_20ohne_20DSL_X2Modem", "/draytek-vigor-adsl-modem-router/draytek-ohne-dsl-modem/index.html", 2, "", 1, "");
addItem("100129", "DrayTek_20mit_20DSL_X2Modem", "/draytek-vigor-adsl-modem-router/draytek-mit-dsl-modem/index.html", 2, "", 1, "");
addItem("100127", "DrayTek_20VigorFly_20200", "/draytek-vigor-adsl-modem-router/draytek-vigorfly-2002/index.html", 2, "", 1, "");
addItem("1002", "DrayTek_20Vigor_202000_20Router", "/draytek-vigor-adsl-modem-router/draytek-vigor-2000-isdn-router/index.html", 2, "", 1, "");
addItem("1005", "DrayTek_20Vigor_202700_20Router", "/draytek-vigor-adsl-modem-router/vigor-2700-modem-router/index.html", 2, "", 1, "");
addItem("10050", "DrayTek_20Vigor_202820_20Router", "/draytek-vigor-adsl-modem-router/draytek-vigor-2820-router/index.html", 2, "", 1, "");
addItem("1009", "DrayTek_20Vigor_202910_20Router", "/draytek-vigor-adsl-modem-router/vigor-2910-router/index.html", 2, "", 1, "");
addItem("10010", "DrayTek_20Vigor_202910V_20Router", "/draytek-vigor-adsl-modem-router/vigor-2910v-voip-router/index.html", 2, "", 1, "");
addItem("10049", "DrayTek_20Vigor_202920_X230_20Router", "/draytek-vigor-adsl-modem-router/draytek-vigor-2900-router/index.html", 2, "", 1, "");
addItem("10011", "DrayTek_20Vigor_202950_20Router", "/draytek-vigor-adsl-modem-router/draytek-vigor-2950-serie/index.html", 2, "", 1, "");
addItem("10012", "DrayTek_20Vigor_203000_20Router", "/draytek-vigor-adsl-modem-router/draytek-vigor-3000-router/index.html", 2, "", 1, "");
addItem("10013", "DrayTek_20VigorPro_205000_20Serie", "/draytek-vigor-adsl-modem-router/draytek-vigor-pro-5500-router/index.html", 2, "", 1, "");
addItem("100130", "DrayTek_20VigorIPPBX", "/draytek-vigor-adsl-modem-router/draytek-vigorippbx/index.html", 2, "", 1, "");
addItem("10051", "DrayTek_20Vigor_20N61_20W_X2Lan", "/draytek-vigor-adsl-modem-router/draytek-vigor-n61-w-lan/index.html", 2, "", 1, "");
addItem("10065", "Zubeh_C3_B6r_20DrayTek", "/draytek-vigor-adsl-modem-router/zubehoer-draytek/index.html", 2, "", 1, "");
addItem("10016", "Synology_20NAS_20Systeme", "/synology-nas-systeme/index.htm", 1, "", 1, "");
addItem("100114", "DS110j", "/synology-nas-systeme/ds110j/index.html", 2, "", 1, "");
addItem("10092", "DS109", "/synology-nas-systeme/ds109/index.html", 2, "", 1, "");
addItem("10093", "DS109_X1", "/synology-nas-systeme/synology-ds109/index.html", 2, "", 1, "");
addItem("100125", "DS110_X1", "/synology-nas-systeme/ds110/index.html", 2, "", 1, "");
addItem("10094", "DS210j", "/synology-nas-systeme/ds210j/index.html", 2, "", 1, "");
addItem("10095", "DS209", "/synology-nas-systeme/ds209/index.html", 2, "", 1, "");
addItem("10099", "DS210_X1", "/synology-nas-systeme/ds210/index.html", 2, "", 1, "");
addItem("100119", "DS710_X1", "/synology-nas-systeme/ds710/index.html", 2, "", 1, "");
addItem("100115", "DS410j", "/synology-nas-systeme/ds410j/index.html", 2, "", 1, "");
addItem("100103", "DS409slim", "/synology-nas-systeme/ds409slim/index.html", 2, "", 1, "");
addItem("100123", "DS410", "/synology-nas-systeme/ds410/index.html", 2, "", 1, "");
addItem("100124", "DS411_X1", "/synology-nas-systeme/ds411plus/index.html", 2, "", 1, "");
addItem("100100", "RS409", "/synology-nas-systeme/rs409/index.html", 2, "", 1, "");
addItem("100102", "RS409_X1RP", "/synology-nas-systeme/rs409rp/index.html", 2, "", 1, "");
addItem("100101", "RS810_X1_X2RS810RP_X1", "/synology-nas-systeme/rs810plus/index.html", 2, "", 1, "");
addItem("100118", "DS1010_X1", "/synology-nas-systeme/ds1010/index.html", 2, "", 1, "");
addItem("100117", "VS60", "/synology-nas-systeme/vs60/index.html", 2, "", 1, "");
addItem("100104", "Zubeh_C3_B6r_20Synology", "/synology-nas-systeme/zubehoer-synology/index.html", 2, "", 1, "");
addItem("10066", "Mediaplayer_X2Recorder", "/multimedia/index.html", 1, "", 1, "");
addItem("100122", "Dvico", "/multimedia/dvico/index.html", 2, "", 1, "");
addItem("100126", "HDI_20Dune", "/multimedia/hdi-dune/index.html", 2, "", 1, "");
addItem("10090", "Thecus_20NAS_20Systeme", "/thecus-nas-systeme/index.html", 1, "", 1, "");
addItem("100105", "N3200_20Pro", "/thecus-nas-systeme/n3200-pro/index.html", 2, "", 1, "");
addItem("100106", "N4000_20Serie", "/thecus-nas-systeme/n4100-pro/index.html", 2, "", 1, "");
addItem("100107", "N5200_20B_20Pro", "/thecus-nas-systeme/n5200-b-pro/index.html", 2, "", 1, "");
addItem("100109", "N5500_20Dual_20Dom", "/thecus-nas-systeme/n5500-dual-dom/index.html", 2, "", 1, "");
addItem("100110", "i5500_20iSCSI", "/thecus-nas-systeme/i5500-iscsi/index.html", 2, "", 1, "");
addItem("100111", "1U4500", "/thecus-nas-systeme/1u4500s/index.html", 2, "", 1, "");
addItem("100112", "N7700", "/thecus-nas-systeme/n7700/index.html", 2, "", 1, "");
addItem("100113", "N8800", "/thecus-nas-systeme/n8800/index.html", 2, "", 1, "");
addItem("100120", "N0503", "/thecus-nas-systeme/n0503/index.html", 2, "", 1, "");
addItem("10055", "Zubeh_C3_B6r_X2Optionen", "/kabel-adapter/index.html", 1, "", 1, "");
addItem("10041", "Sonderangebote", "/schnaeppchen2/index.html", 1, "", 1, "");
addItem("10023", "Netzwerk", "/netzwerk/index.html", 1, "", 1, "");
addItem("10040", "Gigabit_20Ethernet_20Switch", "/netzwerk/gigabit-ethernet-switch/index.html", 2, "", 1, "");
addItem("10042", "Patchkabel", "/netzwerk/patchkabel/index.html", 2, "", 1, "");
addItem("10079", "Excito", "/excito-bubba/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;
		
	};
};