var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Etikettendrucker", "/etikettendrucker/index.html", 1, "", 1, "");
addItem("1002", "Zebra", "/zebra/index.html", 2, "", 1, "");
addItem("1003", "TSC", "/etikettendrucker-neu/tsc/index.html", 2, "", 1, "");
addItem("10050", "CAB", "/etikettendrucker/cab/index.html", 2, "", 1, "");
addItem("10051", "Sato", "/etikettendrucker/sato/index.html", 2, "", 1, "");
addItem("10052", "Datamax", "/etikettendrucker/datamax/index.html", 2, "", 1, "");
addItem("1004", "Handscanner", "/barcodescanner/index.html", 1, "", 1, "");
addItem("10014", "Datalogic", "/barcodescanner/datalogic/index.html", 2, "", 1, "");
addItem("10015", "Honeywell", "/barcodescanner/handheld-products/index.html", 2, "", 1, "");
addItem("10019", "Cognex", "/barcodescanner/cognex/index.html", 2, "", 1, "");
addItem("10063", "POS_20_X2_20Scanner", "/pos-scanner/index.html", 1, "", 1, "");
addItem("10018", "Fixscanner", "/fixscanner/index.html", 1, "", 1, "");
addItem("1005", "Mobile_20Datenerfassung", "/mobile-datenerfassung/index.html", 1, "", 1, "");
addItem("10022", "Datalogic", "/mobile-datenerfassung/datalogic/index.html", 2, "", 1, "");
addItem("10023", "Honeywell", "/mobile-datenerfassung/handheld-products/index.html", 2, "", 1, "");
addItem("1006", "Software", "/software/index.html", 1, "", 1, "");
addItem("10025", "Codesoft", "/software/codesoft/index.html", 2, "", 1, "");
addItem("10026", "Bar_20Tender", "/software/bar-tender/index.html", 2, "", 1, "");
addItem("10055", "Sonderprogrammierung", "/software/kundenspezifische-sonderprogrammierung/index.html", 2, "", 1, "");
addItem("1008", "Thermotransferfolie", "/thermotransferfolie/index.html", 1, "", 1, "");
addItem("10057", "ARMOR", "/thermotransferfolie/armor/index.html", 2, "", 1, "");
addItem("10058", "RICOH", "/thermotransferfolie/ricoh/index.html", 2, "", 1, "");
addItem("10059", "ITW_20_X2_20Thermalfilms", "/thermotransferfolie/itw-thermalfilms/index.html", 2, "", 1, "");
addItem("10060", "Unsere_20Hausmarke", "/thermotransferfolie/unsere-hausmarke/index.html", 2, "", 1, "");
addItem("1007", "Etiketten", "/etiketten/index.html", 1, "", 1, "");
addItem("10064", "Schlaufenetiketten", "/etiketten/schlaufenetiketten/index.html", 2, "", 1, "");
addItem("1009", "Etikettieranlagen", "/etikettieranlagen/index.html", 1, "", 1, "");
addItem("10010", "Dienstleistungen", "/dienstleistungen/index.html", 1, "", 1, "");
addItem("10062", "Termine_20Codesoftschulung", "/dienstleistungen/termine-codesoftschulung/index.html", 2, "", 1, "");
addItem("10056", "Analyse_20_X7_20Beratung", "/dienstleistungen/analyse-beratung/index.html", 2, "", 1, "");
addItem("10044", "Druckservice", "/dienstleistungen/druckservice/index.html", 2, "", 1, "");
addItem("10039", "Service_20_X7_20Reparatur", "/dienstleistungen/service-reparatur/index.html", 2, "", 1, "");
addItem("10041", "Wartungsvertr_C3_A4ge", "/dienstleistungen/wartungsvertraege/index.html", 2, "", 1, "");
addItem("10042", "Funkausleuchtung", "/dienstleistungen/funkausleuchtung/index.html", 2, "", 1, "");
addItem("10043", "Installation", "/dienstleistungen/installation/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;
		
	};
};