var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Angebot_20der_20Woche", "/pi1/index.html", 1, "", 1, "");
addItem("1002", "Beamer", "/pi2/index.html", 1, "", 1, "");
addItem("1008", "Neuger_C3_A4te", "/pi2/pi8/index.html", 2, "", 1, "");
addItem("1009", "Demoger_C3_A4te", "/pi2/pi9/index.html", 2, "", 1, "");
addItem("1003", "LCD_20_X4_20TV", "/pi3/index.html", 1, "", 1, "");
addItem("10010", "Neuger_C3_A4te", "/pi3/pi10/index.html", 2, "", 1, "");
addItem("10020", "LCD_20TV_20bis_2032_22", "/pi3/pi10/pi20/index.html", 3, "", 1, "");
addItem("10021", "LCD_20TV_20bis_2037_22", "/pi3/pi10/pi21/index.html", 3, "", 1, "");
addItem("10022", "LCD_20TV_20bis_2042_22", "/pi3/pi10/pi22/index.html", 3, "", 1, "");
addItem("10023", "LCD_20TV_20bis_2057_22", "/pi3/pi10/pi23/index.html", 3, "", 1, "");
addItem("10011", "Demoger_C3_A4te", "/pi3/pi11/index.html", 2, "", 1, "");
addItem("10024", "LCD_20TV_20bis_2032_22", "/pi3/pi11/pi24/index.html", 3, "", 1, "");
addItem("10025", "LCD_20TV_20bis_2037_22", "/pi3/pi11/pi25/index.html", 3, "", 1, "");
addItem("10026", "LCD_20TV_20bis_2042_22", "/pi3/pi11/pi26/index.html", 3, "", 1, "");
addItem("10027", "LCD_20TV_20bis_2057_22", "/pi3/pi11/pi27/index.html", 3, "", 1, "");
addItem("1004", "Plasma_20_X4_20TV", "/pi4/index.html", 1, "", 1, "");
addItem("10012", "Neuger_C3_A4te", "/pi4/pi12/index.html", 2, "", 1, "");
addItem("10028", "Plasma_20TV_20bis_2032_22", "/pi4/pi12/pi28/index.html", 3, "", 1, "");
addItem("10029", "Plasma_20TV_20bis_2037_22", "/pi4/pi12/pi29/index.html", 3, "", 1, "");
addItem("10030", "Plamsa_20TV_20bis_2042_22", "/pi4/pi12/pi30/index.html", 3, "", 1, "");
addItem("10031", "Plasma_20TV_20bis_2057_22", "/pi4/pi12/pi31/index.html", 3, "", 1, "");
addItem("10013", "Demoger_C3_A4te", "/pi4/pi13/index.html", 2, "", 1, "");
addItem("10032", "Plasma_20TV_20bis_2032_22", "/pi4/pi13/pi32/index.html", 3, "", 1, "");
addItem("10033", "Plasma_20TV_20bis_2037_22", "/pi4/pi13/pi33/index.html", 3, "", 1, "");
addItem("10034", "Plamsa_20TV_20bis_2042_22", "/pi4/pi13/pi34/index.html", 3, "", 1, "");
addItem("10035", "Plasma_20TV_20bis_2057_22", "/pi4/pi13/pi35/index.html", 3, "", 1, "");
addItem("1005", "TFT_20_20Monitore", "/pi5/index.html", 1, "", 1, "");
addItem("10014", "Neuger_C3_A4te", "/pi5/pi14/index.html", 2, "", 1, "");
addItem("10015", "Demoger_C3_A4te", "/pi5/pi15/index.html", 2, "", 1, "");
addItem("1006", "Notebooks", "/pi6/index.html", 1, "", 1, "");
addItem("10016", "Neuger_C3_A4te", "/pi6/pi16/index.html", 2, "", 1, "");
addItem("10017", "Demoger_C3_A4te", "/pi6/pi17/index.html", 2, "", 1, "");
addItem("1007", "Desktop_20_20PCs", "/pi7/index.html", 1, "", 1, "");
addItem("10018", "Neuger_C3_A4te", "/pi7/pi18/index.html", 2, "", 1, "");
addItem("10019", "Demoger_C3_A4te", "/pi7/pi19/index.html", 2, "", 1, "");
addItem("10037", "Schn_C3_A4ppchen_20des_20Monats", "/pi37/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;
		
	};
};