var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "AntiRockstar", "/pi1/index.html", 1, "", 1, "_self");
addItem("1002", "CD_60s", "/pi1/pi2/index.html", 2, "", 1, "");
addItem("1003", "T_X2Shirts", "/pi1/pi3/index.html", 2, "", 1, "");
addItem("10018", "Kapu_60s", "/pi1/pi18/index.html", 2, "", 1, "");
addItem("1005", "Girlies", "/pi1/pi5/index.html", 2, "", 1, "");
addItem("1004", "Buttons", "/pi1/pi4/index.html", 2, "", 1, "");
addItem("10053", "Aufn_C3_A4her", "/pi1/pi53/index.html", 2, "", 1, "");
addItem("10022", "Armb_C3_A4nder", "/pi1/pi22/index.html", 2, "", 1, "");
addItem("10013", "G_C3_BCrtel", "/pi1/pi13/index.html", 2, "", 1, "");
addItem("10014", "Schuhe", "/pi1/pi14/index.html", 2, "", 1, "");
addItem("10015", "Schn_C3_BCrsenkel", "/pi1/pi15/index.html", 2, "", 1, "");
addItem("10016", "Taschen", "/pi1/pi16/index.html", 2, "", 1, "");
addItem("1009", "Jacken", "/pi1/pi9/index.html", 2, "", 1, "");
addItem("1008", "Betontod", "/pi8/index.html", 1, "", 1, "_self");
addItem("10043", "CD_C2_B4s", "/pi8/pi43/index.html", 2, "", 1, "");
addItem("10035", "T_X2Shirts", "/pi8/pi35/index.html", 2, "", 1, "");
addItem("10046", "Girlies", "/pi8/pi46/index.html", 2, "", 1, "");
addItem("10041", "Kapu_C2_B4s", "/pi8/pi41/index.html", 2, "", 1, "");
addItem("10042", "Kappujacken", "/pi8/pi42/index.html", 2, "", 1, "");
addItem("10040", "Buttons", "/pi8/pi40/index.html", 2, "", 1, "");
addItem("10044", "Aufn_C3_A4her", "/pi8/pi44/index.html", 2, "", 1, "");
addItem("10045", "Sonstiges", "/pi8/pi45/index.html", 2, "", 1, "");
addItem("10074", "BRDigung", "/pi74/index.html", 1, "", 1, "_self");
addItem("10049", "CD_C2_B4s", "/pi74/pi49/index.html", 2, "", 1, "");
addItem("10036", "T_X2Shirts", "/pi74/pi36/index.html", 2, "", 1, "");
addItem("10048", "Kapu_C2_B4s", "/pi74/pi48/index.html", 2, "", 1, "");
addItem("10051", "Girlies", "/pi74/pi51/index.html", 2, "", 1, "");
addItem("10052", "Buttons", "/pi74/pi52/index.html", 2, "", 1, "");
addItem("10065", "Poster", "/pi74/pi65/index.html", 2, "", 1, "");
addItem("10054", "Aufn_C3_A4her", "/pi74/pi54/index.html", 2, "", 1, "");
addItem("10075", "Aufkleber", "/pi74/pi75/index.html", 2, "", 1, "_self");
};

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;
		
	};
};