var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "MEMBERSHIP_20SUBSCRIPTION_20(1)", "/get-a-membership/member.html", 1, "", 1, "");
addItem("1003", "Advertising_20possibilities_20(6)", "/get-a-membership/advertising-possibilities/advertisement.html", 2, "", 1, "");
addItem("1002", "Hotel_20_X7_20Catering", "/hotel-catering-operations-documents/food-and-beverage-operation.html", 1, "", 1, "");
addItem("1005", "Crew_20Issues,_20_20Documents,_20Forms,_20Manuals_20(12)", "/hotel-catering-operations-documents/crew-issues-forms/crew-issues-and-documents.html", 2, "", 1, "");
addItem("1008", "F_X7B_20_X4_20Documents_20_X4_20Forms_20_X4_20Manuals_20(4)", "/hotel-catering-operations-documents/fb-documents-forms-manuals/fb-operation.html", 2, "", 1, "");
addItem("1009", "Sanitation_20Guideline_20for_20F_X7B_20_X4_20Exec_X3_20Chef_20(5)", "/hotel-catering-operations-documents/sanitation-guideline-for-fb-executive-chef/index.html", 2, "", 1, "");
addItem("10010", "Provision_20Procedures_20(2)", "/hotel-catering-operations-documents/provision-procedures/provision.html", 2, "", 1, "");
addItem("10011", "Galley_20Procedures_20(1)", "/hotel-catering-operations-documents/galley-procedures/galley.html", 2, "", 1, "");
addItem("10012", "Bar_20Procedures_20(1)", "/hotel-catering-operations-documents/bar-procedures/bar.html", 2, "", 1, "");
addItem("10013", "F_X7B_20Controller_20Procedures_20(1)", "/hotel-catering-operations-documents/fb-controller-procedures/fb-controlling.html", 2, "", 1, "");
addItem("10015", "Housekeeping_20Procedures_20(3)", "/hotel-catering-operations-documents/housekeeping-procedures/housekeeping.html", 2, "", 1, "");
addItem("10016", "Restaurant_20Procedures_20(1)", "/hotel-catering-operations-documents/restaurant-procedures/restaurant.html", 2, "", 1, "");
addItem("10017", "Ship_20Operations_20Manual_20(1)", "/hotel-catering-operations-documents/hotel-operations-manual/ship-operation.html", 2, "", 1, "");
addItem("10025", "Job_20Descrip_X3_20_X7_20End_20of_20Contract_20Certif_X3_20(42)", "/hotel-catering-operations-documents/job-description-certificates/job-descriptions.html", 2, "", 1, "");
addItem("10023", "End_20of_20Cruise_20Close_20Down,_20Forms_20(39)", "/hotel-catering-operations-documents/end-of-cruise-close-down-forms/cruise-close-down.html", 2, "", 1, "");
addItem("1004", "USPH_20Doc_X3_20_X4_20Infos_20_X4_20Manuals_20(7)", "/usph-documents-information/usph.html", 1, "", 1, "");
addItem("10014", "Port_20State_20Control_20(1)", "/safety/security.html", 1, "", 1, "");
addItem("10021", "Online_20Store_20(1)", "/online-store/maritime-online-store.html", 1, "", 1, "");
addItem("10026", "Wooden_20Model_20Ships_20(5)", "/wooden-model-ships/historical-wooden-model-ships.html", 2, "", 1, "");
addItem("10029", "Cloth_20Manager_20for_20Travellers_20(1)", "/online-store/index.html", 2, "", 1, "");
addItem("10028", "Wooden_20Dolphins_20(3)", "/dolphins/dolphins.html", 2, "", 1, "");
addItem("10030", "Suite_20Case_20Belt_20(1)", "/online-store/suitecase-safety-belt/suitecase-belt.html", 2, "", 1, "");
addItem("10033", "Crusie_20Lines_20(9)", "/online-store/cruise-lines/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;
		
	};
};