var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "PELI_20Cases", "/peli-cases/index.html", 1, "", 1, "");
addItem("1006", "Laptop_20Cases", "/peli-cases/laptop-koffer/index.html", 2, "", 1, "");
addItem("1007", "Micro_20Cases_E2_84_A2", "/peli-cases/micro-cases/index.html", 2, "", 1, "");
addItem("1008", "Small_20Cases", "/peli-cases/kleine-schutzkoffer/index.html", 2, "", 1, "");
addItem("1009", "Medium_20Cases", "/peli-cases/mittlere-schutzkoffer/index.html", 2, "", 1, "");
addItem("10010", "Large_20Cases", "/peli-cases/grosse-schutzkoffer/index.html", 2, "", 1, "");
addItem("10045", "Cube_20Cases", "/peli-cases/cube-cases/index.html", 2, "", 1, "");
addItem("10078", "Waffenkoffer", "/peli-cases/waffenkoffer/index.html", 2, "", 1, "");
addItem("10013", "Case_20Zubeh_C3_B6r", "/peli-cases/case-zubehoer/index.html", 2, "", 1, "");
addItem("10039", "Schaumstoffe", "/peli-cases/case-zubehoer/schaumstoffe/index.html", 3, "", 1, "");
addItem("10044", "InstaPak", "/peli-cases/case-zubehoer/instapak/index.html", 3, "", 1, "");
addItem("10040", "Stegausr_C3_BCstung", "/peli-cases/case-zubehoer/stegausruestung-divider/index.html", 3, "", 1, "");
addItem("10041", "Einbaurahmen", "/peli-cases/case-zubehoer/einbaurahmen-panell-frame/index.html", 3, "", 1, "");
addItem("10042", "Deckeleinteiler", "/peli-cases/case-zubehoer/deckeleinteiler/index.html", 3, "", 1, "");
addItem("10043", "Sonstiges_20Zubeh_C3_B6r", "/peli-cases/case-zubehoer/sonstiges-zubehoer/index.html", 3, "", 1, "");
addItem("1002", "PELI_20Lights", "/peli-lights/index.html", 1, "", 1, "");
addItem("10026", "Little_20Lights", "/peli-lights/mittlere-taschenlampen/index.html", 2, "", 1, "");
addItem("10027", "Medium_20Lights", "/peli-lights/medium-duty-lights/index.html", 2, "", 1, "");
addItem("10033", "Profi_20Lights", "/peli-lights/profi-lights/index.html", 2, "", 1, "");
addItem("10030", "Recoil_20LED", "/peli-lights/recoil-led/index.html", 2, "", 1, "");
addItem("10029", "LED_20Lights", "/peli-lights/led-series/index.html", 2, "", 1, "");
addItem("10031", "Light_20Kits", "/peli-lights/light-kits/index.html", 2, "", 1, "");
addItem("10032", "Zone_200_20und_201", "/peli-lights/zone-0-und-1/index.html", 2, "", 1, "");
addItem("10076", "Kopflampen", "/peli-lights/kopflampen/index.html", 2, "", 1, "");
addItem("10037", "Tauchlampen", "/peli-lights/spezial-lampen/tauchlampen/index.html", 2, "", 1, "");
addItem("10014", "Zubeh_C3_B6r", "/peli-lights/light-zubehoer/index.html", 2, "", 1, "");
addItem("10057", "Lampen_20Module", "/peli-lights/light-zubehoer/lampen-module/index.html", 3, "", 1, "");
addItem("10059", "Helmhalterungen", "/peli-lights/light-zubehoer/helmhalterungen/index.html", 3, "", 1, "");
addItem("10062", "Stromversorgung", "/peli-lights/light-zubehoer/stromversorgung/index.html", 3, "", 1, "");
addItem("10065", "Sonstiges_20Zubeh_C3_B6r", "/peli-lights/light-zubehoer/sonstiges-zubehoer/index.html", 3, "", 1, "");
addItem("10080", "Hardigg_20Cases", "/hardigg-cases/index.html", 1, "", 1, "");
addItem("10081", "Black_20Box_20Rack_20Mount_20Koffer", "/hardigg-cases/blackbox-rack-mount-case/index.html", 2, "", 1, "");
addItem("10082", "Versandkoffer_20Large", "/hardigg-cases/large-shipping-case/index.html", 2, "", 1, "");
addItem("10086", "Versandkoffer_20X_X2Large", "/hardigg-cases/versandkoffer-x-large/index.html", 2, "", 1, "");
addItem("10087", "Versandkoffer_20XX_X2Large", "/hardigg-cases/versandkoffer-xx-large/index.html", 2, "", 1, "");
addItem("10085", "Sonderprodukte", "/hardigg-cases/specialty-product/index.html", 2, "", 1, "");
addItem("10072", "Notfall_20und_20Einsatzausr_C3_BCstung", "/notfall-und-einsatzausruestung/index.html", 1, "", 1, "");
addItem("10046", "EMS_20Notfallkoffer", "/notfall-und-einsatzausruestung/ems-cases/index.html", 2, "", 1, "");
addItem("10073", "Mobile_20Notfallbeleuchtung", "/notfall-und-einsatzausruestung/mobile-notfallbeleuchtung/index.html", 2, "", 1, "");
addItem("10074", "Taschenlampen_20ex_20gesch_C3_BCtzt", "/notfall-und-einsatzausruestung/taschenlampen-ex-geschuetzt/index.html", 2, "", 1, "");
addItem("10047", "RESTPOSTEN", "/abverkauf/index.html", 1, "", 1, "");
addItem("10079", "Information", "/information/index.html", 1, "", 1, "");
addItem("1003", "_C3_9Cber_20PELI_20Cases", "/information/ueber-peli-schutzkoffer/index.html", 2, "", 1, "");
addItem("10024", "Gr_C3_BCnde_20f_C3_BCr_20einen_20PELI_20Schutzkoffer", "/information/ueber-peli-schutzkoffer/gruende-fuer-ein-peli-case/index.html", 3, "", 1, "");
addItem("1004", "Zertifikate", "/information/ueber-peli-schutzkoffer/zertifikate/index.html", 3, "", 1, "");
addItem("10021", "PELI_20Qualit_C3_A4tsgarantie", "/information/ueber-peli-schutzkoffer/peli-qualitaetsgarantie/index.html", 3, "", 1, "");
addItem("10056", "Erstaunliche_20Geschichten", "/information/ueber-peli-schutzkoffer/story/index.html", 3, "", 1, "");
addItem("1005", "_C3_9Cber_20PELI_20Lights", "/information/ueber-peli-taschenlampen/index.html", 2, "", 1, "");
addItem("10048", "Sicherheitszulassungen", "/information/ueber-peli-taschenlampen/sicherheitszulassungen/index.html", 3, "", 1, "");
addItem("10049", "ATEX_X2Direktiven", "/information/ueber-peli-taschenlampen/atex-direktiven/index.html", 3, "", 1, "");
addItem("10051", "Lite_X2Technologie", "/information/ueber-peli-taschenlampen/taschenlampentechnologie/index.html", 3, "", 1, "");
addItem("10055", "FAQ", "/information/ueber-peli-taschenlampen/faq/index.html", 3, "", 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;
		
	};
};