var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("100217", "Kabeltastatur", "/kabel_tastatur/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100224", "Tastaturen_20mit_20Kabel", "/kabel_tastatur/standardtastatur/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100238", "Beleuchtete_20Tastaturen", "/kabel_tastatur/beleuchtete_tastatur/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100225", "Ergonomische_20Tastaturen", "/kabel_tastatur/ergonomische_tastatur/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100242", "Kompakt_X2Tastaturen", "/kabel_tastatur/kompakt_tastatur/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100327", "Medizin_X2Tastaturen", "/kabel_tastatur/medizin_tastatur/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100227", "Tastaturen_20mit_20Trackball_X4Touchpad", "/kabel_tastatur/tastatur_mit_trackball/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100334", "Tastatur_X2Maus_X2Sets", "/kabel_tastatur/tastatur-maus-sets/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100218", "Funktastatur", "/funk_tastaturen/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100221", "Trackball,_20Keypad,_20Touchpad", "/trackballs-keypads/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100222", "Presenter,_20Grafiktablett", "/presenter-grafiktablet/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100140", "Maus_20mit_20Kabel", "/kabelmaus/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100141", "Kabel_X2M_C3_A4use", "/kabelmaus/optische_maus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100156", "CAD_20_X4_203D_20Mouse", "/kabelmaus/cad_3d_maus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100142", "Ergonomische_20M_C3_A4use", "/kabelmaus/ergonomische_maus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100149", "Gamerm_C3_A4use", "/kabelmaus/gamer_maus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100147", "Mini_X2M_C3_A4use", "/kabelmaus/notebook_maus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100166", "Funkmaus", "/funkmaus/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100167", "Funkm_C3_A4use", "/funkmaus/optische_funkmaus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100193", "Ergonomische_20M_C3_A4use", "/funkmaus/ergonomische_funkmaus/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100198", "Mini_X2M_C3_A4use", "/funkmaus/funkmaus_fuer_notebook/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100335", "Monitor", "/monitor/index.html", 1, "", 1, "");
addItem("100220", "Computerzubeh_C3_B6r", "/computerzubehoer/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100319", "PC_X2Zubeh_C3_B6r", "/computerzubehoer/computerzubehoer_stick_bungee_hub_reader/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100307", "Mauspads_20_X2_20Handauflagen", "/computerzubehoer/mauspad/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100313", "Kabel_20_X2_20Adapter", "/computerzubehoer/kabel_adapter/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100317", "Headsets", "/computerzubehoer/kopfhoerer_headset/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("100320", "Arbeitskonsolen", "/computerzubehoer/arbeitskonsole/index.html", 2, "tastatur_pcm_big.gif", 1, "");
addItem("1008", "Neue_20Produkte", "/neue_produkte_maus_tastatur/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100127", "Werbedruck", "/werbedruck_firmenlogo/index.html", 1, "tastatur_pcm_big.gif", 1, "");
addItem("100332", "Produkt_C3_BCbersicht", "/produktuebersicht/index.html", 1, "", 1, "");
addItem("100133", "Infos_20_X7_20Tipps", "/information_maus_tastatur/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;
		
	};
};