var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10048", "Sportbekleidung_20_X7_20Trikots_20(44)", "/sportbekleidung-und-trikots/index.html", 1, "", 1, "");
addItem("10064", "Dartshirts_20_X7_20Darthemden_20(33)", "/sportbekleidung-und-trikots/dartshirts-darthemden/index.html", 2, "", 1, "");
addItem("10012", "Poloshirts_20(5)", "/sportbekleidung-und-trikots/dartshirts-darthemden/poloshirts/index.html", 3, "", 1, "");
addItem("10071", "Hemden_20(28)", "/sportbekleidung-und-trikots/dartshirts-darthemden/hemden/index.html", 3, "", 1, "");
addItem("10040", "Bull_X9s_20(10)", "/sportbekleidung-und-trikots/dartshirts-darthemden/hemden/bulls/index.html", 4, "", 1, "");
addItem("10041", "Finden_20_X7_20Hales_20(2)", "/sportbekleidung-und-trikots/dartshirts-darthemden/hemden/finden-hales/index.html", 4, "", 1, "");
addItem("10042", "Kustom_20Kit_20(3)", "/sportbekleidung-und-trikots/dartshirts-darthemden/hemden/kustom-kit/index.html", 4, "", 1, "");
addItem("10039", "Unicorn_20(13)", "/sportbekleidung-und-trikots/dartshirts-darthemden/hemden/unicorn/index.html", 4, "", 1, "");
addItem("10049", "Fussball_20(6)", "/sportbekleidung-und-trikots/fussball/index.html", 2, "", 1, "");
addItem("10081", "Trikots_X2Kurzarm_20(5)", "/sportbekleidung-und-trikots/trikots/index.html", 2, "", 1, "");
addItem("10045", "Referenzen_20(14)", "/referenzen/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;
		
	};
};