var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10042", "CA_X4MA_X4TEC_20SHOP", "/zum-camatec-shop/index.html", 1, "", 1, "");
addItem("1002", "Unsere_20Produkte_20f_C3_BCr_20Ihren_20Automaten_20(F_C3_BCllprodukte)", "/zum-camatec-shop/fuellprodukte/index.html", 2, "", 1, "");
addItem("10039", "Nestl_C3_A9_20_X4_20Nescaf_C3_A9", "/zum-camatec-shop/fuellprodukte/nescafe-produkte/index.html", 3, "", 1, "");
addItem("10011", "L_C3_B6slicher_20Bohnenkaffee", "/zum-camatec-shop/fuellprodukte/instant/index.html", 3, "", 1, "");
addItem("1005", "Nescaf_C3_A9_20Komo", "/zum-camatec-shop/fuellprodukte/nescafe-komo/index.html", 3, "", 1, "");
addItem("10010", "Ganze_20Bohne", "/zum-camatec-shop/fuellprodukte/ganze-bohne/index.html", 3, "", 1, "");
addItem("1009", "Gemahlene_20Bohne", "/zum-camatec-shop/fuellprodukte/feine-bohne/index.html", 3, "", 1, "");
addItem("1004", "Nescaf_C3_A9_20Cafeterie", "/zum-camatec-shop/fuellprodukte/nescafe/index.html", 3, "", 1, "");
addItem("10013", "Kakao_20und_20Erg_C3_A4nzung", "/zum-camatec-shop/fuellprodukte/kakao-und-ergaenzung/index.html", 3, "", 1, "");
addItem("10027", "Suppen", "/zum-camatec-shop/fuellprodukte/suppen/index.html", 3, "", 1, "");
addItem("10028", "Incup_20Systeme_20Jede", "/zum-camatec-shop/fuellprodukte/incup-systeme-jede/index.html", 3, "", 1, "");
addItem("10029", "Trendige_20Mixgetr_C3_A4nke", "/zum-camatec-shop/fuellprodukte/trendige-mixgetraenke/index.html", 3, "", 1, "");
addItem("1006", "Pomino_20und_20Minipom", "/zum-camatec-shop/fuellprodukte/pomino/index.html", 3, "", 1, "");
addItem("10020", "Pomino_20CO_C2_B2", "/zum-camatec-shop/fuellprodukte/pomino/pomino-co/index.html", 4, "", 1, "");
addItem("10021", "Pomino_20Zubeh_C3_B6r", "/zum-camatec-shop/fuellprodukte/pomino/pomino-zubehoer/index.html", 4, "", 1, "");
addItem("10031", "Milchprodukte", "/zum-camatec-shop/fuellprodukte/milchprodukte/index.html", 3, "", 1, "");
addItem("10041", "Lavazza_20Shop", "/zum-camatec-shop/fuellprodukte/lavazza-shop/index.html", 3, "", 1, "");
addItem("10045", "Tee", "/zum-camatec-shop/fuellprodukte/tee/index.html", 3, "", 1, "");
addItem("10050", "CA_20Vending_20Produkte", "/zum-camatec-shop/fuellprodukte/ca-vending-produkte/index.html", 3, "ca-vending-produkte-gesamt-bild-s.jpg", 1, "");
addItem("1001", "Automaten", "/zum-camatec-shop/automaten/verpflegungsautomaten-kaltgetrankeautomaten.html", 2, "", 1, "");
addItem("10017", "Hei_C3_9Fgetr_C3_A4nkeautomaten", "/zum-camatec-shop/automaten/heissgetraenke/heissgetrenkeautomaten.html", 3, "", 1, "");
addItem("10024", "Ganze_20Bohne", "/zum-camatec-shop/automaten/heissgetraenke/ganze-bohne/index.html", 4, "", 1, "");
addItem("10032", "Table_20Top", "/zum-camatec-shop/automaten/heissgetraenke/ganze-bohne/table-top/index.html", 5, "", 1, "");
addItem("10035", "Standger_C3_A4t", "/zum-camatec-shop/automaten/heissgetraenke/ganze-bohne/standgeraet/index.html", 5, "", 1, "");
addItem("10025", "Gemahlene_20Bohne", "/zum-camatec-shop/automaten/heissgetraenke/feine-bohne/index.html", 4, "", 1, "");
addItem("10033", "Table_20Top", "/zum-camatec-shop/automaten/heissgetraenke/feine-bohne/table-top/index.html", 5, "", 1, "");
addItem("10036", "Standger_C3_A4t", "/zum-camatec-shop/automaten/heissgetraenke/feine-bohne/standgeraet/index.html", 5, "", 1, "");
addItem("10026", "L_C3_B6slicher_20Bohnenkaffee", "/zum-camatec-shop/automaten/heissgetraenke/loeslicher-kaffee/index.html", 4, "", 1, "");
addItem("10034", "Table_20Top", "/zum-camatec-shop/automaten/heissgetraenke/loeslicher-kaffee/table-top/index.html", 5, "", 1, "");
addItem("10037", "Standger_C3_A4t", "/zum-camatec-shop/automaten/heissgetraenke/loeslicher-kaffee/standgeraet/index.html", 5, "", 1, "");
addItem("10044", "Mengenbr_C3_BCher", "/zum-camatec-shop/automaten/heissgetraenke/mengenbrueher/mengenbrueher2.html", 4, "", 1, "");
addItem("10018", "Kaltgetr_C3_A4nkeautomaten_20_X7_20Kombiger_C3_A4te", "/zum-camatec-shop/automaten/kaltgetraenke-und-kombigeraete/index.html", 3, "", 1, "");
addItem("10019", "Snack_X2_20und_20S_C3_BC_C3_9Fwarenautomaten", "/zum-camatec-shop/automaten/snack-und-warenautomaten/index.html", 3, "", 1, "");
addItem("10038", "Gebrauchte_20Getr_C3_A4nkeautomaten", "/zum-camatec-shop/automaten/gebrauchte-geraete/index.html", 3, "", 1, "");
addItem("10040", "Automatenstra_C3_9Fen", "/zum-camatec-shop/automaten/index2.html", 3, "", 1, "");
addItem("10053", "Tafelwasser_20Automaten", "/zum-camatec-shop/automaten/tafelwasser-automaten/index.html", 3, "", 1, "");
addItem("10016", "Automaten_X2Zubeh_C3_B6r", "/zum-camatec-shop/zubehoer/index.html", 2, "", 1, "");
addItem("10023", "Sonstiges", "/zum-camatec-shop/zubehoer/sonstiges/index.html", 3, "", 1, "");
addItem("10047", "M_C3_B6bel", "/zum-camatec-shop/moebel/index.html", 2, "", 1, "");
addItem("10048", "Gebrauchte_20M_C3_B6bel", "/zum-camatec-shop/moebel/gebrauchte-moebel/index.html", 3, "", 1, "");
addItem("10049", "Nescafe_20M_C3_B6bel", "/zum-camatec-shop/moebel/nescafe-moebel/index.html", 3, "", 1, "");
addItem("10052", "Automaten_20Unterschr_C3_A4nke", "/zum-camatec-shop/moebel/automaten-unterschraenke/index.html", 3, "", 1, "");
addItem("10022", "Becher", "/zum-camatec-shop/becher/index.html", 2, "", 1, "");
addItem("10046", "Wasserfilter", "/zum-camatec-shop/wasserfilter/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;
		
	};
};