var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1005", "Film_20scanners_20(46)", "/filmscanner/index.html", 1, "", 1, "");
addItem("1001", "Braun_20(2)", "/filmscanner/braun/index.html", 2, "", 1, "");
addItem("10012", "Canon_20(4)", "/filmscanner/canon/index.html", 2, "", 1, "");
addItem("10022", "Epson_20(6)", "/filmscanner/epson/index.html", 2, "", 1, "");
addItem("100166", "Hasselblad_20(2)", "/filmscanner/hasselblad/index.html", 2, "", 1, "");
addItem("10070", "HP_20(2)", "/filmscanner/hp/index.html", 2, "", 1, "");
addItem("10032", "Microtek_20(2)", "/filmscanner/microtek/index.html", 2, "", 1, "");
addItem("10045", "Nikon_20(8)", "/filmscanner/nikon/index.html", 2, "", 1, "");
addItem("10050", "Plustek_20(3)", "/filmscanner/plustek/index.html", 2, "", 1, "");
addItem("10052", "Quato_20(1)", "/filmscanner/quato/index.html", 2, "", 1, "");
addItem("10055", "Reflecta_20(16)", "/filmscanner/reflecta/index.html", 2, "", 1, "");
addItem("10016", "Film_20scanner_20accessories_20(63)", "/filmscanner-accessories/index.html", 1, "", 1, "");
addItem("100168", "Canon_20(3)", "/filmscanner-accessories/canon/index.html", 2, "", 1, "");
addItem("100165", "Epson_20(7)", "/filmscanner-accessories/epson/index.html", 2, "", 1, "");
addItem("100167", "Hasselblad_20(22)", "/filmscanner-accessories/hasselblad/index.html", 2, "", 1, "");
addItem("10034", "Nikon_20(16)", "/filmscanner-accessories/nikon/index.html", 2, "", 1, "");
addItem("10042", "Plustek_20(2)", "/filmscanner-accessories/plustek/index.html", 2, "", 1, "");
addItem("10046", "Quato_20(2)", "/filmscanner-accessories/quato/index.html", 2, "", 1, "");
addItem("10059", "Reflecta_20(11)", "/filmscanner-accessories/reflecta/index.html", 2, "", 1, "");
addItem("10023", "Colour_20management_20(24)", "/colour-management/index.html", 1, "", 1, "");
addItem("1007", "Display_20calibration_20(4)", "/colour-management/display-calibration/index.html", 2, "", 1, "");
addItem("10015", "Printer_20profiling_20(3)", "/colour-management/printer-profiling/index.html", 2, "", 1, "");
addItem("10028", "TV_20calibration_20(2)", "/colour-management/tv-calibration/index.html", 2, "", 1, "");
addItem("100150", "IT_X28_20Targets_20(13)", "/colour-management/it-8-targets/index.html", 2, "", 1, "");
addItem("100155", "Digital_20camera_20targets_20(2)", "/colour-management/digital-camera-targets/index.html", 2, "", 1, "");
addItem("10035", "Software_20(21)", "/software/index.html", 1, "", 1, "");
addItem("10010", "SilverFast_20(9)", "/software/silverfast/index.html", 2, "", 1, "");
addItem("10011", "Adobe_20(4)", "/software/adobe/index.html", 2, "", 1, "");
addItem("10031", "LaserSoft,_20SilverFast_20(4)", "/software/lasersoft/index.html", 2, "", 1, "");
addItem("10039", "Digital_20photography_20(4)", "/software/digital-photography/index.html", 2, "", 1, "");
addItem("10038", "Books_20(3)", "/books/index.html", 1, "", 1, "");
addItem("10044", "Light_20panels_20(17)", "/light-panels/index.html", 1, "", 1, "");
addItem("10063", "Cleaning_20(49)", "/cleaning/index.html", 1, "", 1, "");
addItem("10064", "Cleaning_20tissues_20(5)", "/cleaning/cleaning-tissues/index.html", 2, "", 1, "");
addItem("10065", "Anti_20static_20brushes_20(14)", "/cleaning/anti-static-brushes/index.html", 2, "", 1, "");
addItem("10066", "Cleaning_20brushes_20(3)", "/cleaning/cleaning-brushes/index.html", 2, "", 1, "");
addItem("10067", "Cleaning_20sets_20(10)", "/cleaning/cleaning-sets/index.html", 2, "", 1, "");
addItem("100156", "Film_20cleaning_20devices_20(8)", "/cleaning/film-cleaning-devices/index.html", 2, "", 1, "");
addItem("10068", "Miscellaneous_20(3)", "/cleaning/etc/index.html", 2, "", 1, "");
addItem("100159", "Photo_20accesories_20(13)", "/photo-accessories/index.html", 1, "", 1, "");
addItem("100160", "Shooting_20tables_20(2)", "/photo-accessories/shooting-tables/index.html", 2, "", 1, "");
addItem("100164", "Display_20protection_20(3)", "/photo-accessories/display-protection/index.html", 2, "", 1, "");
addItem("100161", "Lamps_20(2)", "/photo-accessories/lamps/index.html", 2, "", 1, "");
addItem("100162", "Cutting_20machines_20(6)", "/photo-accessories/cutting-machines/index.html", 2, "", 1, "");
addItem("10049", "Slide_20photography_20(86)", "/slide-photography/index.html", 1, "", 1, "");
addItem("10069", "Slide_20mounts_20(21)", "/slide-photography/slide-mounts/index.html", 2, "", 1, "");
addItem("10024", "Slide_20magazines_20(11)", "/slide-photography/slide-magazines/index.html", 2, "", 1, "");
addItem("10013", "Slide_20viewers_20(13)", "/slide-photography/slide-viewers/index.html", 2, "", 1, "");
addItem("1004", "Filing_20sheets_20(13)", "/slide-photography/filing-sheets/index.html", 2, "", 1, "");
addItem("100157", "Slide_20cassettes_20(7)", "/slide-photography/slide-cassettes/index.html", 2, "", 1, "");
addItem("10085", "Magnifiers_20(16)", "/slide-photography/magnifier/index.html", 2, "", 1, "");
addItem("10036", "CD_20archiving_20(5)", "/slide-photography/slide-accessories/index.html", 2, "", 1, "");
addItem("10053", "Miscellaneous_20accessories_20(11)", "/accessories/index.html", 1, "", 1, "");
addItem("10027", "Targets_20(1)", "/accessories/targets/index.html", 2, "", 1, "");
addItem("10040", "External_20hard_20disk_20drives_20(1)", "/accessories/external-hard-disk-drives/index.html", 2, "", 1, "");
addItem("10051", "Cables_20(6)", "/accessories/cables/index.html", 2, "", 1, "");
addItem("100163", "Replacement_20parts_20(2)", "/accessories/replacement-parts/index.html", 2, "", 1, "");
addItem("10057", "Miscellaneous_20(1)", "/accessories/etc/index.html", 2, "", 1, "");
addItem("10054", "Screens_20and_20projectors_20(6)", "/screens-projectors/index.html", 1, "", 1, "");
addItem("10014", "Slide_20projectors_20(6)", "/screens-projectors/slide-projectors/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;
		
	};
};