var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10086", "Stoffbeutel", "/stoffbeutel/stoffbeutel.html", 1, "", 1, "");
addItem("10085", "Stofftasche", "/stofftasche/stofftasche.html", 1, "", 1, "");
addItem("10097", "kurze_20Henkel", "/stofftasche/kurze-henkel/stofftasche-kurze-henkel.html", 2, "", 1, "");
addItem("10087", "lange_20Henkel", "/stofftasche/lange-henkel/stofftasche-lange-henkel.html", 2, "", 1, "");
addItem("10098", "Mini", "/stofftasche/mini/stofftasche-mini.html", 2, "", 1, "");
addItem("10099", "1_20langer_20Henkel", "/stofftasche/1-langer-henkel/stofftasche-1-langer-henkel.html", 2, "", 1, "");
addItem("100100", "XL", "/stofftasche/xl/stofftasche-xl.html", 2, "", 1, "");
addItem("100101", "mit_20runden_20Ecken", "/stofftasche/mit-runden-ecken/stofftasche-mit-runden-ecken.html", 2, "", 1, "");
addItem("100102", "Canvas_X2Tasche", "/stofftasche/mit-bodenfalte/stofftasche-mit-bodenfalte.html", 2, "", 1, "");
addItem("100112", "Info_X2Center", "/hilfe/hilfe.html", 1, "", 1, "");
addItem("100118", "Angebotsabfrage", "/hilfe/angebotsabfrage/angebotsabfrage.html", 2, "", 1, "");
addItem("100123", "Stofftasche_20kurze_20Henkel", "/hilfe/angebotsabfrage/kurze-henkel/index.html", 3, "", 1, "");
addItem("100124", "Stofftasche_20lange_20Henkel", "/hilfe/angebotsabfrage/lange-henkel/index.html", 3, "", 1, "");
addItem("100125", "Stofftasche_20Mini", "/hilfe/angebotsabfrage/mini/index.html", 3, "", 1, "");
addItem("100126", "Stofftasche_20ohne_20Henkel", "/hilfe/angebotsabfrage/ohne-henkel/index.html", 3, "", 1, "");
addItem("100127", "Stofftasche_20XL", "/hilfe/angebotsabfrage/sonstige/index.html", 3, "", 1, "");
addItem("100135", "sonstige_20Stofftaschen", "/hilfe/angebotsabfrage/sonstige-stofftaschen/index.html", 3, "", 1, "");
addItem("100113", "Druckpreise", "/hilfe/druckpreise/index.html", 2, "", 1, "");
addItem("100116", "Druckverfahren", "/hilfe/druckverfahren/druckverfahren.html", 2, "", 1, "");
addItem("100122", "Druckvorlagen", "/hilfe/druckvorlagen/hinweise.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;
		
	};
};