var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10020", "Displays_20nach_20Gr_C3_B6_C3_9Fe", "/displays/index.html", 1, "", 1, "");
addItem("10021", "_X7lt_X8_2030_22", "/displays/20/index.html", 2, "", 1, "");
addItem("10022", "31_20_X2_2040_22", "/displays/30/index.html", 2, "", 1, "");
addItem("10023", "41_20_X2_2050_22", "/displays/40-50/index.html", 2, "", 1, "");
addItem("10024", "51_20_X2_2060_22", "/displays/51-60/index.html", 2, "", 1, "");
addItem("10025", "_X7gt_X8_2061_22", "/displays/61-70/index.html", 2, "", 1, "");
addItem("10031", "Displays_20nach_20Herstellern", "/displays-nach-herstellern/index.html", 1, "", 1, "");
addItem("10034", "Conrac", "/displays-nach-herstellern/conrac/index.html", 2, "", 1, "");
addItem("10033", "LG", "/displays-nach-herstellern/lg/index.html", 2, "", 1, "");
addItem("10032", "NEC", "/displays-nach-herstellern/nec/index.html", 2, "", 1, "");
addItem("10035", "Panasonic", "/displays-nach-herstellern/panasonic/index.html", 2, "", 1, "");
addItem("10036", "Samsung", "/displays-nach-herstellern/samsung/index.html", 2, "", 1, "");
addItem("10038", "Sanyo", "/displays-nach-herstellern/sanyo/index.html", 2, "", 1, "");
addItem("10039", "SLD", "/displays-nach-herstellern/sld/index.html", 2, "", 1, "");
addItem("10037", "Sonstige", "/displays-nach-herstellern/sonstige/index.html", 2, "", 1, "");
addItem("10010", "Interaktive_20Touch_X2Displays", "/interaktive-displays/index.html", 1, "", 1, "");
addItem("10029", "Plasma_20Transportcase", "/plasma-transportcase/index.html", 1, "", 1, "");
addItem("10028", "Resistente_20Displays", "/resistente-displays/index.html", 1, "", 1, "");
addItem("10030", "_C3_96l_X2,_20rauch_X2_20und_20staubgesch_C3_BCtzt", "/resistente-displays/oel-rauch-und-staubgeschuetzt/index.html", 2, "", 1, "");
addItem("10027", "Wetterfest", "/resistente-displays/wetterfeste-displays/index.html", 2, "", 1, "");
addItem("10026", "Touch_X2Overlay_X2Panels", "/touch-overlay-panels/index.html", 1, "", 1, "");
addItem("10040", "Schutzgeh_C3_A4use", "/schutzgehaeuse/index.html", 1, "", 1, "");
addItem("10015", "Zubeh_C3_B6r", "/zubehoer/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;
		
	};
};