var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10014", "Tennisrackets", "/pi14/index.htm", 1, "", 1, "");
addItem("1009", "Jeugd_X2_20en_20Kinderrackets", "/pi14/pi9/index.htm", 2, "", 1, "");
addItem("10019", "Snaren", "/pi19/index.htm", 1, "", 1, "");
addItem("10043", "Pro_X9s_20Pro", "/pi19/pi43/index.htm", 2, "pros_pro_logo-medium-2.jpg", 1, "");
addItem("10039", "Prince", "/pi19/pi39/index.htm", 2, "", 1, "");
addItem("10042", "Pacific", "/pi19/pi42/index.htm", 2, "", 1, "");
addItem("10044", "Isospeed", "/pi19/pi44/index.htm", 2, "", 1, "");
addItem("10034", "Grips_20Basis", "/pi34/index.htm", 1, "", 1, "");
addItem("10041", "Overgrips", "/pi41/index.htm", 1, "", 1, "");
addItem("1007", "Dempers", "/pi7/index.htm", 1, "", 1, "");
addItem("1001", "Accessoires", "/pi1/index.htm", 1, "", 1, "");
addItem("1006", "Bespanmachines", "/pi6/index.htm", 1, "", 1, "");
addItem("10025", "Bespangereedschappen", "/pi25/index.htm", 1, "", 1, "");
addItem("10023", "Tennistassen_20en_20_X2bags", "/pi23/index.htm", 1, "", 1, "");
addItem("10036", "Fitness_20Welness", "/pi36/index.htm", 1, "", 1, "");
addItem("1003", "Medizin_20en_20Massageballen", "/pi36/pi3/index.htm", 2, "", 1, "");
addItem("10011", "Springtouwen", "/pi36/pi11/index.htm", 2, "", 1, "");
addItem("10015", "Steppers", "/pi36/pi15/index.htm", 2, "", 1, "");
addItem("10020", "Steunbandagen", "/pi36/pi20/index.htm", 2, "", 1, "");
addItem("10022", "Push_20Up_20Grips", "/pi36/pi22/index.htm", 2, "", 1, "");
addItem("10024", "Expanders", "/pi36/pi24/index.htm", 2, "", 1, "");
addItem("10028", "Wellness", "/pi36/pi28/index.htm", 2, "", 1, "");
addItem("10027", "Tennisballen", "/pi27/index.htm", 1, "", 1, "");
addItem("10035", "Trainingshulpmiddelen", "/pi35/index.htm", 1, "", 1, "");
addItem("10030", "Badminton", "/pi30/index.htm", 1, "", 1, "");
addItem("10029", "Squash", "/pi29/index.htm", 1, "", 1, "");
addItem("10031", "Baanonderhoud", "/pi31/index.htm", 1, "", 1, "");
addItem("10032", "Teamkleding", "/pi32/index.htm", 1, "", 1, "");
addItem("10038", "OUTLET", "/pi38/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;
		
	};
};