var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Home", "/index.html", 1, "", 1, "_self");
addItem("10029", "Unternehmen", "/unternehmen/index.html", 1, "", 1, "_self");
addItem("10030", "Presse", "/unternehmen/presse/index.html", 2, "", 1, "_self");
addItem("10035", "Partner", "/unternehmen/partner/index.html", 2, "", 1, "_self");
addItem("1002", "Produkte", "/produkte/index.html", 1, "", 1, "");
addItem("1006", "Handscanner", "/produkte/handscanner/index.html", 2, "", 1, "");
addItem("10015", "Kabelgebunden", "/produkte/handscanner/kabelgebunden/index.html", 3, "", 1, "");
addItem("10016", "Funk_20_X4_20Bluetooth", "/produkte/handscanner/funk-bluetooth/index.html", 3, "", 1, "");
addItem("10017", "1D_20_X4_20Linear", "/produkte/handscanner/1d-linear/index.html", 3, "", 1, "");
addItem("10018", "2D", "/produkte/handscanner/2d/index.html", 3, "", 1, "");
addItem("1007", "Mobile_20Datenerfassung", "/produkte/mobile-datenerfassung/index.html", 2, "", 1, "");
addItem("10019", "Mobil_20_X4_20Batch", "/produkte/mobile-datenerfassung/mobil-batch/index.html", 3, "", 1, "");
addItem("10020", "WLAN_20_X4_20GSM_X2GPRS", "/produkte/mobile-datenerfassung/wlan-gsm-gprs/index.html", 3, "", 1, "");
addItem("1008", "Station_C3_A4re_20Scanner", "/produkte/stationaere-scanner/index.html", 2, "", 1, "");
addItem("10021", "Kassenscanner", "/produkte/stationaere-scanner/kassenscanner/index.html", 3, "", 1, "");
addItem("10022", "F_C3_B6rdertechnik", "/produkte/stationaere-scanner/foerdertechnik/index.html", 3, "", 1, "");
addItem("1009", "Drucken", "/produkte/drucken/index.html", 2, "", 1, "");
addItem("10023", "Printer", "/produkte/drucken/printer/index.html", 3, "", 1, "");
addItem("10032", "Mobile_20Drucker", "/produkte/drucken/mobile-drucker/index.html", 3, "", 1, "");
addItem("10024", "Druckercontroller", "/produkte/drucken/druckercontroller/index.html", 3, "", 1, "");
addItem("10025", "Druck_X2_20_X4_20Labelsoftware", "/produkte/drucken/druck-labelsoftware/index.html", 3, "", 1, "");
addItem("10010", "Stapler_X2PC", "/produkte/industrie-pc/index.html", 2, "", 1, "");
addItem("10011", "Funktechnik", "/produkte/funktechnik/index.html", 2, "", 1, "");
addItem("10012", "Sonderl_C3_B6sungen", "/produkte/sonderloesungen/index.html", 2, "", 1, "");
addItem("10013", "Verbrauchsmaterial", "/produkte/verbrauchsmaterial/index.html", 2, "", 1, "");
addItem("10026", "Etiketten", "/produkte/verbrauchsmaterial/etiketten/index.html", 3, "", 1, "");
addItem("10027", "Thermotransferfolie", "/produkte/verbrauchsmaterial/thermotransferfolie/index.html", 3, "", 1, "");
addItem("10014", "Transpondertechnik", "/produkte/transpondertechnik/index.html", 2, "", 1, "");
addItem("10028", "Tiefk_C3_BChlbereich", "/produkte/tiefkuehlbereich/index.html", 2, "", 1, "");
addItem("1003", "Sonderl_C3_B6sungen", "/sonderloesungen/index.html", 1, "", 1, "");
addItem("1004", "Service", "/service/index.html", 1, "", 1, "");
addItem("10039", "Handb_C3_BCcher", "/service/handbuecher/index.html", 2, "", 1, "");
addItem("1005", "Aktuelles", "/aktuelles/index.html", 1, "", 1, "");
addItem("10031", "Messe", "/aktuelles/messe/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;
		
	};
};