var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1005", "Die_20Reiki_X2Geschichte", "/usui-reiki/index.html", 1, "", 1, "");
addItem("1007", "Das_20Reiki_X2System", "/einweihung/index.html", 1, "", 1, "");
addItem("1008", "Die_20Reiki_X2Lebensregeln", "/reiki-de/index.html", 1, "", 1, "");
addItem("1006", "Reiki_X2Symbol", "/symbol/index.html", 1, "", 1, "");
addItem("1009", "Heilung_20durch_20Reiki", "/heilung-durch-reiki/index.html", 1, "", 1, "");
addItem("10011", "Wie_20lerne_20ich_20Reiki?", "/master/index.html", 1, "", 1, "");
addItem("10014", "Erster_20Reiki_20Grad", "/master/erster-grad/index.html", 2, "", 1, "");
addItem("10015", "Zweiter_20Reiki_20Grad", "/master/zweiter-reiki-grad/index.html", 2, "", 1, "");
addItem("10016", "Dritter_20Reiki_20Grad", "/master/dritter-reiki-grad/index.html", 2, "", 1, "");
addItem("10017", "Chakra", "/chakra/index.html", 1, "", 1, "");
addItem("10024", "Kronen_20Chakra", "/chakra/kronen-chakra/index.html", 2, "", 1, "");
addItem("10023", "Drittes_20Auge_20Stirn_20Chakra", "/chakra/drittes-auge-stirn-chakra/index.html", 2, "", 1, "");
addItem("10022", "Kehl_20Chakra", "/chakra/kelch-chakra/index.html", 2, "", 1, "");
addItem("10021", "Herz_20Chakra", "/chakra/herz-chakra/index.html", 2, "", 1, "");
addItem("10020", "Solarplexus_20Chakra", "/chakra/solarplexus-chakra/index.html", 2, "", 1, "");
addItem("10019", "Sakral_20Chakra", "/chakra/sakral-chakra/index.html", 2, "", 1, "");
addItem("10018", "Wurzel_20Chakra", "/chakra/wurzel-chakra/index.html", 2, "", 1, "");
addItem("10025", "Anfahrt", "/reiki-meister/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;
		
	};
};