var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("100139", "www_X3PsionStore_X3de", "/psionstore/index.html", 1, "", 1, "");
addItem("100129", "Psion_X2Service", "/psionstore/psion-service/index.htm", 2, "", 1, "");
addItem("100128", "Psion_X2Reparatur", "/psionstore/psion-reparatur/index.htm", 2, "", 1, "");
addItem("1006", "Gebraucht_20Psion_C2_B4s", "/psionstore/gebraucht-psions/index.htm", 2, "", 1, "");
addItem("100137", "Psion_X2Zubeh_C3_B6r", "/psionstore/psion-zubehoer/index.html", 2, "", 1, "");
addItem("10028", "gebrauchtes_20Psion_20Zubeh_C3_B6r", "/psionstore/psion-zubehoer/gebrauchtes-psion-zubehoer/index.html", 3, "", 1, "");
addItem("10054", "Software", "/psionstore/psion-zubehoer/software/index.html", 3, "", 1, "");
addItem("10067", "Taschen", "/psionstore/psion-zubehoer/taschen/index.html", 3, "", 1, "");
addItem("10079", "Stifte", "/psionstore/psion-zubehoer/stifte/index.html", 3, "", 1, "");
addItem("10084", "Kabel_20_X7_20Adapter", "/psionstore/psion-zubehoer/kabel-adapter/index.html", 3, "", 1, "");
addItem("10089", "CF_X2Karten", "/psionstore/psion-zubehoer/cf-karten/index.html", 3, "", 1, "");
addItem("100131", "Display_X2Kabel", "/psionstore/display-kabel/index.html", 2, "", 1, "");
addItem("100133", "Psion_X2Bilder", "/psionstore/psion-bilder/index.html", 2, "", 1, "");
addItem("100132", "Psion_X2Links", "/psionstore/psion-links/index.html", 2, "", 1, "");
addItem("100130", "Ger_C3_A4te_X2Infos", "/psionstore/geraete-infos/index.html", 2, "", 1, "");
addItem("100134", "F_X3A_X3Q_X3", "/psionstore/faq/index.html", 2, "", 1, "");
addItem("100135", "Referenzen", "/psionstore/referanzen/index.html", 2, "", 1, "");
addItem("100136", "Reparatur_X2Auftrags_X2Formular", "/psionstore/reparatur-auftrags-formular/index.html", 2, "", 1, "");
addItem("100126", "www_X3DVB_X2Cards_X3de", "/dvb-cards/index.html", 1, "", 1, "");
addItem("10071", "Zubeh_C3_B6r", "/dvb-cards/zubehoer/index.html", 2, "", 1, "");
addItem("10037", "Smartcards", "/dvb-cards/smartcards/index.html", 2, "", 1, "");
addItem("100123", "DVB_X2Cards_X2Anleitungen", "/dvb-cards/dvb-cards-anleitungen/index.html", 2, "", 1, "");
addItem("100124", "DVB_X2Cards_X2Download", "/dvb-cards/dvb-cards-download/index.html", 2, "", 1, "");
addItem("100127", "www_X3PDA_X2Reparatur_X3de", "/pda-reparatur/index.html", 1, "", 1, "");
addItem("10092", "Organizer_20Zubeh_C3_B6r", "/pda-reparatur/organizer-zubehoer/index.html", 2, "", 1, "");
addItem("10087", "XDA_20_X1_20Zubeh_C3_B6r", "/pda-reparatur/xda-zubehoer/index.html", 2, "", 1, "");
addItem("100138", "www_X3NeScom_X2GbR_X3de", "/nescom-gbr/index.html", 1, "", 1, "");
addItem("100141", "_C3_BCber_20NeScom_X2GbR", "/nescom-gbr/nescom-gbr/index.html", 2, "", 1, "");
addItem("100142", "Service", "/nescom-gbr/service/index.html", 2, "", 1, "");
addItem("100140", "Computer", "/nescom-gbr/computer/index.html", 2, "", 1, "");
addItem("100143", "PC_X2Aufr_C3_BCstungen", "/nescom-gbr/pc-aufruestungen/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;
		
	};
};