var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10020", "NEXUS_20_X4_20HOLL", "/pi20/index.htm", 1, "", 1, "");
addItem("1004", "KTQ_C2_AE_X2Produkte", "/pi20/pi4/index.htm", 2, "", 1, "");
addItem("1003", "Krankenhaus", "/pi20/pi4/pi3/index.htm", 3, "", 1, "");
addItem("10018", "Rehabilitation", "/pi20/pi4/pi18/index.htm", 3, "", 1, "");
addItem("10021", "Pflegeeinrichtungen", "/pi20/pi4/pi21/index.htm", 3, "", 1, "");
addItem("10017", "proCum_20Cert_X2Produkte", "/pi20/pi17/index.htm", 2, "", 1, "");
addItem("10019", "IQMP_X2Reha", "/pi20/pi19/index.htm", 2, "", 1, "");
addItem("10022", "QKA_X2Produkte", "/pi20/pi22/index.htm", 2, "", 1, "");
addItem("10030", "QKS_X2Produkte", "/pi20/pi30/index.htm", 2, "", 1, "");
addItem("10031", "NEXUS_20_X4_20WEBZERT", "/pi31/index.htm", 1, "", 1, "");
addItem("10016", "KTQ_X2Zert", "/pi16/index.htm", 1, "", 1, "");
addItem("10028", "Schulung_X4Beratung", "/pi28/index.htm", 1, "", 1, "");
addItem("1005", "KTQ_X2Zert_20f_C3_BCr_20Visitoren", "/pi5/index.htm", 1, "", 1, "");
addItem("10023", "QB_20Krankenhaus_20(2008)", "/pi23/index.htm", 1, "", 1, "");
addItem("10025", "QB_20Rehabilitation", "/pi25/index.htm", 1, "", 1, "");
addItem("10029", "Extras", "/pi29/index.htm", 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;
		
	};
};