var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10021", "Wolldecke,_20Plaid_20_X7_20Co_X3", "/plaids-wolldecken/index.html", 1, "", 1, "");
addItem("10053", "Nach_20Hersteller", "/plaids-wolldecken/wolldecken-nach-hersteller/index.html", 2, "", 1, "");
addItem("10062", "Eagle_20Products_20Plaids", "/plaids-wolldecken/wolldecken-nach-hersteller/plaids-von-eagle-products/index.html", 3, "", 1, "");
addItem("1002", "Steinbeck_20Decken", "/plaids-wolldecken/wolldecken-nach-hersteller/plaids-von-steinbeck/index.html", 3, "", 1, "");
addItem("1003", "Forster_20Plaids_20_X7_20Decken", "/plaids-wolldecken/wolldecken-nach-hersteller/plaids-von-forster/index.html", 3, "", 1, "");
addItem("10060", "Ritter_20Decken", "/plaids-wolldecken/wolldecken-nach-hersteller/ritter-decken2/index.html", 3, "", 1, "");
addItem("10051", "Kaschmirdecken", "/plaids-wolldecken/kaschmirdecken/index.html", 2, "", 1, "");
addItem("10054", "Mohairdecken", "/plaids-wolldecken/mohairdecken/index.html", 2, "", 1, "");
addItem("10055", "Kamelhaardecken", "/plaids-wolldecken/kamelhaardecken/index.html", 2, "", 1, "");
addItem("1004", "Babydecken_20zum_20Kuscheln", "/plaids-wolldecken/babydecken/index.html", 2, "", 1, "");
addItem("10022", "Seidenschals_20_X7_20Pashminas", "/seidenschals-pashminas/index.html", 1, "", 1, "");
addItem("1007", "Pashmina,_20Stola_20_X7_20Co_X3", "/seidenschals-pashminas/accessoires-von-eagle-products/index.html", 2, "", 1, "");
addItem("1008", "Stolen_20von_20Kurt_20K_C3_B6lln", "/seidenschals-pashminas/stolen-von-kurt-koelln/index.html", 2, "", 1, "");
addItem("10023", "Skulpturen", "/skulpturen/index.html", 1, "", 1, "");
addItem("10026", "Bronzefiguren", "/skulpturen/bronze/index.html", 2, "", 1, "");
addItem("10011", "Luise_20K_C3_B6tt_X2G_C3_A4rtner:_20business_20and_20motivation", "/skulpturen/bronze/bronzeskulpturen-luise-koett-gaertner-business-and-motivation/index.html", 3, "", 1, "");
addItem("10014", "Familie_20und_20Liebe", "/skulpturen/bronze/bronzefiguren-familie-verliebte-paare-uvm/index.html", 3, "", 1, "");
addItem("10015", "Engel_20aus_20Bronze", "/skulpturen/bronze/himmlisches-aus-bronze-und-glas/index.html", 3, "", 1, "");
addItem("10059", "Regalfiguren", "/skulpturen/bronze/regalfiguren/index.html", 3, "", 1, "");
addItem("10029", "Tiere_20aus_20Bronze", "/skulpturen/bronze/tiere-aus-bronze/index.html", 3, "", 1, "");
addItem("10044", "Golf", "/skulpturen/bronze/golf/index.html", 3, "", 1, "");
addItem("10047", "Wandkreuze", "/skulpturen/bronze/wandkreuze/wandkreuz-index.html", 3, "", 1, "");
addItem("10057", "Krippen", "/skulpturen/bronze/krippen/index.html", 3, "", 1, "");
addItem("10039", "Geschenkideen_20nach_20Anlass", "/geschenkideen/index.html", 1, "", 1, "");
addItem("10046", "Zur_20Taufe", "/geschenkideen/zur-taufe/taufgeschenke.html", 2, "", 1, "");
addItem("10040", "Zur_20Erstkommunion", "/geschenkideen/erstkommunion/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;
		
	};
};