var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10035", "Lederhandtaschen", "/pi35/index.html", 1, "", 1, "");
addItem("1008", "Alpenrose", "/pi35/pi8/index.html", 2, "", 1, "");
addItem("10041", "Boston", "/pi35/pi41/index.html", 2, "", 1, "");
addItem("10016", "Capetown", "/pi35/pi16/index.html", 2, "", 1, "");
addItem("10049", "Como", "/pi35/pi49/index.html", 2, "", 1, "");
addItem("1006", "Darwin", "/pi35/pi6/index.html", 2, "", 1, "");
addItem("10040", "Durban", "/pi35/pi40/index.html", 2, "", 1, "");
addItem("10050", "Fitness_20_X4_20Weekend_X2Bag", "/pi35/pi50/index.html", 2, "", 1, "");
addItem("10039", "Hong_X2Kong", "/pi35/pi39/index.html", 2, "", 1, "");
addItem("1007", "Indiana", "/pi35/pi7/index.html", 2, "", 1, "");
addItem("10051", "Istanbul", "/pi35/pi51/index.html", 2, "", 1, "");
addItem("10055", "Miami", "/pi35/pi55/index.html", 2, "", 1, "");
addItem("10011", "Mississippi", "/pi35/pi11/index.html", 2, "", 1, "");
addItem("10032", "New_20York", "/pi35/pi32/index.html", 2, "", 1, "");
addItem("10038", "Nizza", "/pi35/pi38/index.html", 2, "", 1, "");
addItem("10013", "Paris", "/pi35/pi13/index.html", 2, "", 1, "");
addItem("10057", "Oslo", "/pi35/pi57/index.html", 2, "", 1, "");
addItem("10052", "Roma", "/pi35/pi52/index.html", 2, "", 1, "");
addItem("10026", "Santiago", "/pi35/pi26/index.html", 2, "", 1, "");
addItem("10031", "Siena", "/pi35/pi31/index.html", 2, "", 1, "");
addItem("10025", "Singapore", "/pi35/pi25/index.html", 2, "", 1, "");
addItem("10053", "St_X3Moritz", "/pi35/pi53/index.html", 2, "", 1, "");
addItem("10054", "Texas", "/pi35/pi54/index.html", 2, "", 1, "");
addItem("10056", "Vancouver", "/pi35/pi56/index.html", 2, "", 1, "");
addItem("10044", "Handtaschenhalter", "/pi44/index.html", 1, "", 1, "");
addItem("10034", "Pflegeartikel", "/pi34/index.html", 1, "", 1, "");
addItem("10024", "Gutscheine", "/pi24/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;
		
	};
};