var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1009", "Hoof_20Boots", "/hoof-boots/index.htm", 1, "", 1, "");
addItem("10028", "Easyboot_20Glove", "/hoof-boots/easyboot-glove/index.htm", 2, "", 1, "");
addItem("10029", "Easyboot_20Edge", "/hoof-boots/easyboot-edge/index.htm", 2, "", 1, "");
addItem("10030", "Renegade_20Hoof_20Boots", "/hoof-boots/renegade-hoof-boots/index.htm", 2, "", 1, "");
addItem("10016", "Easyboot_202007", "/hoof-boots/easyboot/index.htm", 2, "", 1, "");
addItem("10026", "Easyboot_20Epic", "/hoof-boots/easyboot-epic/index.htm", 2, "", 1, "");
addItem("10027", "Easyboot_20Bare", "/hoof-boots/easyboot-bare/index.htm", 2, "", 1, "");
addItem("1007", "Soaking_20Boot", "/hoof-boots/soaking-boot/index.htm", 2, "", 1, "");
addItem("10025", "Old_20Mac_X9s", "/hoof-boots/old-macs/index.htm", 2, "", 1, "");
addItem("1004", "BOA_20Horse_20Boot", "/hoof-boots/boa-horse-boot/index.htm", 2, "", 1, "");
addItem("10019", "Marquis_20supergrip", "/hoof-boots/marquis-supergrip/index.htm", 2, "", 1, "");
addItem("10015", "Swiss_20Horse_20Boot", "/hoof-boots/swiss-horse-boot/index.htm", 2, "", 1, "");
addItem("1008", "Dallmer_20Clog", "/hoof-boots/dallmer-clog/index.htm", 2, "", 1, "");
addItem("10010", "Barrier_20Boot", "/hoof-boots/barrier-boot/index.htm", 2, "", 1, "");
addItem("10013", "Farriers_20Tools", "/farriers-tools/index.htm", 1, "", 1, "");
addItem("10032", "Hoof_20Knives", "/farriers-tools/hoof-knives/index.htm", 2, "", 1, "");
addItem("10033", "Horse_20Rasps", "/farriers-tools/hoof-rasps/index.htm", 2, "", 1, "");
addItem("10037", "Sharpening_20Tools", "/farriers-tools/sharpening-tools/index.htm", 2, "", 1, "");
addItem("10038", "Farrier_X9s_20Hammers", "/farriers-tools/farriers-hammers/index.htm", 2, "", 1, "");
addItem("10056", "Hoof_20Stand", "/farriers-tools/hoof-stand/index.htm", 2, "", 1, "");
addItem("10058", "Din_C2_B4s_20Hoof_20Blades", "/farriers-tools/dins-hoof-blades/index.htm", 2, "", 1, "");
addItem("10040", "Hoof_20Trimming_20Kits", "/farriers-tools/hoof-trimming-kits/index.htm", 2, "", 1, "");
addItem("10060", "Farrier_X9s_20Pliers", "/farriers-tools/farriers-pliers/index.htm", 2, "", 1, "");
addItem("10041", "Other_20Tools", "/farriers-tools/other-tools/index.htm", 2, "", 1, "");
addItem("10014", "Hoofcare", "/pflegeartikel/index.htm", 1, "", 1, "");
addItem("10031", "Natural_20Hoof_20Care", "/natural-hoof-care/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;
		
	};
};