var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10028", "Angebote", "/angebote/index.htm", 1, "", 1, "");
addItem("10043", "Restposten", "/angebote/restposten/index.htm", 2, "", 1, "");
addItem("10050", "Tojiro_20Geschenksets", "/tojiro-geschenksets/index.htm", 1, "", 1, "");
addItem("10018", "SekiRyu,_20einlagige_20Messer", "/sekiryu-einlagige-messer/index.htm", 1, "", 1, "");
addItem("10023", "Tojiro_20DP_203_20Lagen", "/tojiro-dp-3-lagen/index.htm", 1, "", 1, "");
addItem("10033", "Tojiro_20DP_203_20Lagen_20HQ", "/japanische-kochmesser/index.htm", 1, "", 1, "");
addItem("10048", "Tojiro_20_22Zen_22_203_20Lagen", "/tojiro-zen/index.htm", 1, "", 1, "");
addItem("10025", "Tojiro_20DP_20Damaskus_2037_20Lagen", "/tojiro-dp-damaszener-messer/index.htm", 1, "", 1, "");
addItem("10020", "HighQuality", "/tojiro-dp-damaszener-messer/damast-hq/index.htm", 2, "", 1, "");
addItem("10017", "Rundgriff", "/tojiro-dp-damaszener-messer/rundgriff/index2.htm", 2, "", 1, "");
addItem("1003", "Ecowood", "/tojiro-dp-damaszener-messer/damaststahl-ecowood/index.htm", 2, "", 1, "");
addItem("10034", "Tojiro_20_22Sippu_22_20Damast", "/japan-messer/index.htm", 1, "", 1, "");
addItem("10044", "Tojiro_20Aogami", "/tojiro-aogami/index.htm", 1, "", 1, "");
addItem("10045", "Tojiro_20Aogami_20Damast", "/tojiro-aogami-damast/index.htm", 1, "", 1, "");
addItem("10031", "Tojiro_20_22Flash_22_20Damast", "/tojiro-flash-damast/index.htm", 1, "", 1, "");
addItem("1002", "Die_20kleineren_20Messer", "/tojiro-flash-damast/die-kleineren-messer/index.htm", 2, "", 1, "");
addItem("10014", "Die_20grossen_20Messer", "/tojiro-flash-damast/die-grossen-messer/index.htm", 2, "", 1, "");
addItem("10024", "Tojiro_20Damaskus_20PRO_2063_20Lagen", "/tojiro-damaskus-pro-63-lagen/index.htm", 1, "", 1, "");
addItem("10022", "Metallgriff", "/tojiro-damaskus-pro-63-lagen/metallgriff/index.htm", 2, "", 1, "");
addItem("10030", "Tojiro_20Yasuki_20Shirogami", "/tojiro-yasuki-shirogami/index.htm", 1, "", 1, "");
addItem("10032", "Takefu_20Knife_20Village", "/handgeschmiedete-messer/index.htm", 1, "", 1, "");
addItem("1004", "Hideo_20Kitaoka", "/handgeschmiedete-messer/hideo-kitaoka/index.htm", 2, "", 1, "");
addItem("10047", "f_C3_BCr_20Linksh_C3_A4nder", "/handgeschmiedete-messer/hideo-kitaoka/t/index.htm", 3, "", 1, "");
addItem("10019", "Sirou_20Kamo", "/handgeschmiedete-messer/sirou-kamo/index.htm", 2, "", 1, "");
addItem("10027", "Schleifsteine", "/schleifstein/index.htm", 1, "", 1, "");
addItem("10036", "Messerset", "/messerset-japan/index.htm", 1, "", 1, "");
addItem("10049", "Brisa_20Bonita_20Kindermesser", "/brisa-bonita-kindermesser/index.htm", 1, "", 1, "");
addItem("10051", "Messerbl_C3_B6cke_20und_20Schneidebretter", "/messerbloecke-und-schneidebretter/index.htm", 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;
		
	};
};