var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Pflegelinien", "/pflegelinien/index.html", 1, "", 1, "");
addItem("1004", "Basics", "/pflegelinien/basics/index.html", 2, "", 1, "");
addItem("1005", "young_20line", "/pflegelinien/young-line/index.html", 2, "", 1, "");
addItem("1006", "rich_20care_20concept", "/pflegelinien/rich-care-concept/index.html", 2, "", 1, "");
addItem("1007", "classic_20line", "/pflegelinien/classic-line/index.html", 2, "", 1, "");
addItem("1008", "anti_X2aging_20line", "/pflegelinien/anti-aging-line/index.html", 2, "", 1, "");
addItem("1009", "sensitive_20line", "/pflegelinien/sensitive-line/index.html", 2, "", 1, "");
addItem("10025", "BIOMARIS_20nature", "/pflegelinien/biomaris-nature/index.html", 2, "", 1, "");
addItem("10010", "Jonathan_20for_20men", "/pflegelinien/jonathan-for-men/index.html", 2, "", 1, "");
addItem("10011", "BodyCare_20_X7_20more", "/bodycare-more2/index.html", 1, "", 1, "");
addItem("10012", "Duschen_20_X7_20Baden", "/bodycare-more2/duschen-baden/index.html", 2, "", 1, "");
addItem("10013", "Mehr_20K_C3_B6rperpflege", "/bodycare-more2/mehr-koerperpflege/index.html", 2, "", 1, "");
addItem("10014", "AromaThalasso_20line", "/bodycare-more2/aromathalasso-line/index.html", 2, "", 1, "");
addItem("10015", "Haarpflege", "/bodycare-more2/haarpflege/index.html", 2, "", 1, "");
addItem("10016", "Fu_C3_9Fpflege", "/bodycare-more2/fusspflege/index.html", 2, "", 1, "");
addItem("10017", "Sonnenschutz", "/bodycare-more2/sonnenschutz/index.html", 2, "", 1, "");
addItem("10018", "D_C3_BCfte", "/bodycare-more2/duefte/index.html", 2, "", 1, "");
addItem("10019", "Bewusst_20ern_C3_A4hren", "/bodycare-more2/bewusst-ernaehren/index.html", 2, "", 1, "");
addItem("10020", "beauty_20colors", "/beauty-colors/index.html", 1, "", 1, "");
addItem("10021", "Lippenpflege", "/beauty-colors/lippenpflege/index.html", 2, "", 1, "");
addItem("10022", "Nagelpflege", "/beauty-colors/nagelpflege/index.html", 2, "", 1, "");
addItem("10023", "Augen_X2Make_X2up", "/beauty-colors/augen-make-up/index.html", 2, "", 1, "");
addItem("10024", "Basis_X2Make_X2up", "/beauty-colors/basis-make-up/index.html", 2, "", 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;
		
	};
};