var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1002", "PhysioBasic_20(16_20plus)", "/reinigung/index.html", 1, "", 1, "");
addItem("1006", "PhysioProtect_20(30_20plus)", "/augenregion/index.html", 1, "", 1, "");
addItem("1008", "PhysioRepair_20(45_20plus)", "/phyto-praeparate/index.html", 1, "", 1, "");
addItem("10028", "PhysioPlus_20(Erg_C3_A4nzung)", "/physio/index.html", 1, "", 1, "");
addItem("10029", "Classic_20Lines", "/classic-lines2/index.html", 1, "", 1, "");
addItem("10020", "Dry_20Skin", "/classic-lines2/dry-skin-produkte/index.html", 2, "", 1, "");
addItem("10022", "Mature_20Skin", "/classic-lines2/mature-skin/index.html", 2, "", 1, "");
addItem("10021", "Anti_20Ageing", "/classic-lines2/anti-ageing-produkte/index.html", 2, "", 1, "");
addItem("10015", "High_X2Tech", "/classic-lines2/high-tech-lines/index.html", 2, "", 1, "");
addItem("10017", "Pure", "/classic-lines2/pure-line/index.html", 2, "", 1, "");
addItem("10019", "Balance", "/classic-lines2/balance-produkte/index.html", 2, "", 1, "");
addItem("1009", "Body_20Care", "/classic-lines2/body/index.html", 2, "", 1, "");
addItem("10016", "Basic", "/classic-lines2/aloe-line/index.html", 2, "", 1, "");
addItem("10013", "Herren", "/classic-lines2/fuer-ihn/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;
		
	};
};