var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1005", "Aluschweissdraht", "/aluschweissdraht/index.html", 1, "", 1, "");
addItem("1006", "Anwendungsgebiete", "/aluschweissdraht/anwendungsgebiete/index.html", 2, "", 1, "");
addItem("1007", "Gebrauchsanweisung", "/aluschweissdraht/gebrauchsanweisung/index.html", 2, "", 1, "");
addItem("1001", "Produkte", "/aluschweissdraht/alu-schweissdraht/index.html", 2, "", 1, "");
addItem("10016", "Dienstleistungen", "/aluschweissdraht/dienstleistungen/index.html", 2, "", 1, "");
addItem("10017", "Schulungen", "/aluschweissdraht/schulungen/index.html", 2, "", 1, "");
addItem("10018", "Presseberichte", "/aluschweissdraht/presseberichte/index.html", 2, "", 1, "");
addItem("1004", "Vakuum_X2Matte", "/vakuum-matte/index.html", 1, "", 1, "");
addItem("10011", "Werbemittel", "/vakuum-matte/werbemittel/index.html", 2, "", 1, "");
addItem("10012", "Display", "/vakuum-matte/display/index.html", 2, "", 1, "");
addItem("10013", "Die_20Technik", "/vakuum-matte/die-technik/index.html", 2, "", 1, "");
addItem("10014", "FAQ", "/vakuum-matte/faq/index.html", 2, "", 1, "");
addItem("10015", "Produkte", "/vakuum-matte/produkte/index.html", 2, "", 1, "");
addItem("1008", "Keramik_X2Additiv", "/keramik-additiv/keramik-additiv-c50-speed.html", 1, "", 1, "");
addItem("1002", "Nano_X2Cutter", "/nano-cutter/nano-cutter.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;
		
	};
};