var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Sakralorgeln", "/sakralorgeln/index.html", 1, "", 1, "");
addItem("1002", "Johannus", "/sakralorgeln/johannus/index.html", 2, "", 1, "");
addItem("10016", "Studio", "/sakralorgeln/johannus/studio/index.html", 3, "", 1, "");
addItem("10017", "Opus", "/sakralorgeln/johannus/opus/index.html", 3, "", 1, "");
addItem("10018", "Vivaldi", "/sakralorgeln/johannus/vivaldi/index.html", 3, "", 1, "");
addItem("10019", "Symphonica", "/sakralorgeln/johannus/symphonica/index.html", 3, "", 1, "");
addItem("10020", "Exclusive_20Design", "/sakralorgeln/johannus/exclusive-design/index.html", 3, "", 1, "");
addItem("10021", "Monarke", "/sakralorgeln/johannus/monarke/index.html", 3, "", 1, "");
addItem("1003", "Content", "/sakralorgeln/content/index.html", 2, "", 1, "");
addItem("10024", "Content_20Expander", "/sakralorgeln/content/content-expander/index.html", 3, "", 1, "");
addItem("10025", "Content_20D_204100", "/sakralorgeln/content/content-d-4100/index.html", 3, "", 1, "");
addItem("10026", "Content_20Etude", "/sakralorgeln/content/content-etude/index.html", 3, "", 1, "");
addItem("10027", "Content_20D_204200", "/sakralorgeln/content/content-d-4200/index.html", 3, "", 1, "");
addItem("10028", "Content_20D_204300", "/sakralorgeln/content/content-d-4300/index.html", 3, "", 1, "");
addItem("10029", "Content_20D_204700", "/sakralorgeln/content/content-d-4700/index.html", 3, "", 1, "");
addItem("10030", "Content_20D_205400_20_X2_205800", "/sakralorgeln/content/content-d-5400-5800/index.html", 3, "", 1, "");
addItem("10031", "Content_20Mondri", "/sakralorgeln/content/content-mondri/index.html", 3, "", 1, "");
addItem("10032", "Content_20Pastorale_20P", "/sakralorgeln/content/content-pastorale-p-mit-orgelpfeifen/index.html", 3, "", 1, "");
addItem("10033", "Content_20D_206000_20Serie", "/sakralorgeln/content/content-d-6000-serie/index.html", 3, "", 1, "");
addItem("1004", "Roland", "/sakralorgeln/roland/index.html", 2, "", 1, "");
addItem("1005", "Rodgers", "/sakralorgeln/rodgers/index.html", 2, "", 1, "");
addItem("1006", "Eminent", "/sakralorgeln/eminent/index.html", 2, "", 1, "");
addItem("10036", "Amadeus_X2Serie", "/sakralorgeln/eminent/amadeus-serie/index.html", 3, "", 1, "");
addItem("10037", "E_X2Serie", "/sakralorgeln/eminent/e-serie/index.html", 3, "", 1, "");
addItem("10038", "Cantate_X2Serie", "/sakralorgeln/eminent/cantate-serie/index.html", 3, "", 1, "");
addItem("10039", "Capella_X2Serie", "/sakralorgeln/eminent/capella-serie/index.html", 3, "", 1, "");
addItem("1007", "Monarke", "/sakralorgeln/monarke/index.html", 2, "", 1, "");
addItem("1008", "Sakralorgeln_20f_C3_BCr_20Kirchen", "/sakralorgeln-fuer-kirchen/index.html", 1, "", 1, "");
addItem("1009", "Monarke", "/sakralorgeln-fuer-kirchen/monarke/index.html", 2, "", 1, "");
addItem("10010", "Johannus_20Ecclesia", "/sakralorgeln-fuer-kirchen/ecclesia/index.html", 2, "", 1, "");
addItem("10011", "Heimorgeln", "/heimorgeln/index.html", 1, "", 1, "");
addItem("10012", "Roland_20Atelier:_20Modelle", "/heimorgeln/roland-atelier/index.html", 2, "", 1, "");
addItem("10022", "Roland_20Atelier:_20Vorstellung", "/heimorgeln/roland-atelier-vorstellung/index.html", 2, "", 1, "");
addItem("10023", "Roland_20Atelier:_20Video", "/heimorgeln/roland-atelier-video/index.html", 2, "", 1, "");
addItem("10042", "Roland_20VR_X2700", "/heimorgeln/roland-vr-700/index.html", 2, "", 1, "");
addItem("10046", "Noten_20und_20Software", "/heimorgeln/noten-software/index.html", 2, "", 1, "");
addItem("10015", "Digitalpianos", "/digitalpianos/index.html", 1, "", 1, "");
addItem("10034", "Roland_20F_X2110", "/digitalpianos/roland/index.html", 2, "", 1, "");
addItem("10043", "Roland_20HP_X2Serie", "/digitalpianos/roland-hp-serie/index.html", 2, "", 1, "");
addItem("10040", "Noten_20_X2_20Shop", "/http://www.orgel-noten.com", 1, "", 1, "");
addItem("10013", "Angebote", "/angebote/index.html", 1, "", 1, "");
addItem("10041", "Links", "/links/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;
		
	};
};