var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10017", "Deal_20of_20the_20Week", "/pi17/index.html", 1, "", 1, "");
addItem("1006", "Servers", "/pi6/index.html", 1, "", 1, "");
addItem("1007", "AMD", "/pi6/pi7/index.html", 2, "", 1, "");
addItem("1008", "Intel", "/pi6/pi8/index.html", 2, "", 1, "");
addItem("1009", "SPARC", "/pi6/pi9/index.html", 2, "", 1, "");
addItem("10010", "RISC", "/pi6/pi10/index.html", 2, "", 1, "");
addItem("1002", "Plasma_20Screens", "/pi2/index.html", 1, "", 1, "");
addItem("10025", "Plasma_20Screens", "/pi2/pi25/index.html", 2, "", 1, "");
addItem("10022", "Apple", "/pi22/index.html", 1, "", 1, "");
addItem("1005", "PCs", "/pi5/index.html", 1, "", 1, "");
addItem("10023", "AMD", "/pi5/pi23/index.html", 2, "", 1, "");
addItem("10024", "Intel", "/pi5/pi24/index.html", 2, "", 1, "");
addItem("10011", "Notebooks", "/pi11/index.html", 1, "", 1, "");
addItem("10012", "TFT_20Monitors", "/pi12/index.html", 1, "", 1, "");
addItem("10013", "15_22_20_X2_2019_22_20TFT_X4LCD_20Monitors", "/pi12/pi13/index.html", 2, "", 1, "");
addItem("10014", "20_22_20_X2_2030_22_20TFT_X4LCD_20Monitors", "/pi12/pi14/index.html", 2, "", 1, "");
addItem("10015", "32_22_20_X2_2063_22_20TFT_X4LCD_20Monitors", "/pi12/pi15/index.html", 2, "", 1, "");
addItem("10016", "Network_20Products", "/pi16/index.html", 1, "", 1, "");
addItem("10026", "Storage_20Products", "/pi26/index.html", 1, "", 1, "");
addItem("10027", "Projectors", "/pi27/index.html", 1, "", 1, "");
addItem("10028", "1000_20_X2_202000_20ANSI_20Lumens", "/pi27/pi28/index.html", 2, "", 1, "");
addItem("10029", "2000_20_X2_203000_20ANSI_20Lumens", "/pi27/pi29/index.html", 2, "", 1, "");
addItem("10030", "3000_X1_20ANSI_20Lumens", "/pi27/pi30/index.html", 2, "", 1, "");
addItem("10031", "Printers", "/pi31/index.html", 1, "", 1, "");
addItem("10032", "Mono", "/pi31/pi32/index.html", 2, "", 1, "");
addItem("10033", "Components", "/pi33/index.html", 1, "", 1, "");
addItem("10034", "Hard_20Disks", "/pi33/pi34/index.html", 2, "", 1, "");
addItem("10035", "Memory", "/pi33/pi35/index.html", 2, "", 1, "");
addItem("10036", "Graphic_20Cards", "/pi33/pi36/index.html", 2, "", 1, "");
addItem("10037", "Network_20and_20Communication", "/pi33/pi37/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;
		
	};
};