var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1009", "Schlafsofa", "/schlafsofa/index.html", 1, "", 1, "");
addItem("100719", "Loft", "/schlafsofa/loft/index.html", 2, "", 1, "");
addItem("100720", "Stoffwahl", "/schlafsofa/loft/stoffwahl/index.html", 3, "", 1, "");
addItem("100593", "Alea", "/schlafsofa/alea/index.html", 2, "", 1, "");
addItem("100133", "Stoffwahl", "/schlafsofa/alea/stoffgruppen/index.html", 3, "", 1, "");
addItem("100718", "Campo", "/schlafsofa/campo/index.html", 2, "", 1, "");
addItem("100721", "Stoffwahl", "/schlafsofa/campo/stoffwahl/index.html", 3, "", 1, "");
addItem("100595", "Nova", "/schlafsofa/nova/index.html", 2, "", 1, "");
addItem("100141", "Stoffwahl", "/schlafsofa/nova/stoffgruppen/index.html", 3, "", 1, "");
addItem("1003", "Meri", "/schlafsofa/meri/index.html", 2, "", 1, "");
addItem("10090", "Stoffwahl", "/schlafsofa/meri/stoffgruppen/index.html", 3, "", 1, "");
addItem("10017", "Belini", "/schlafsofa/bellini/index.html", 2, "", 1, "");
addItem("10091", "Stoffwahl", "/schlafsofa/bellini/stoffgruppen/index.html", 3, "", 1, "");
addItem("100484", "Sopra", "/schlafsofa/sopra/index.html", 2, "", 1, "");
addItem("100485", "Stoffwahl", "/schlafsofa/sopra/stoffwahl/index.html", 3, "", 1, "");
addItem("100594", "Scala", "/schlafsofa/scala/index.html", 2, "", 1, "");
addItem("100140", "Stoffwahl", "/schlafsofa/scala/stoffgruppen/index.html", 3, "", 1, "");
addItem("10016", "Sesam", "/schlafsofa/sesam/index.html", 2, "", 1, "");
addItem("100115", "Stoffwahl", "/schlafsofa/sesam/stoffgruppen/index.html", 3, "", 1, "");
addItem("10023", "Single", "/schlafsofa/single/index.html", 2, "", 1, "");
addItem("100127", "Stoffwahl", "/schlafsofa/single/stoffgruppen/index.html", 3, "", 1, "");
addItem("10018", "Trio", "/schlafsofa/trio/index.html", 2, "", 1, "");
addItem("100121", "Stoffwahl", "/schlafsofa/trio/stoffgruppen/index.html", 3, "", 1, "");
addItem("100285", "Kiro", "/schlafsofa/kiro/index.html", 2, "", 1, "");
addItem("100286", "Stoffwahl", "/schlafsofa/kiro/stoffgruppen/index.html", 3, "", 1, "");
addItem("10020", "Multy", "/schlafsofa/multy/index.html", 2, "", 1, "");
addItem("100103", "Stoffwahl", "/schlafsofa/multy/stoffgruppen/index.html", 3, "", 1, "");
addItem("10033", "Bettsessel", "/bettsessel/index.html", 1, "", 1, "");
addItem("100802", "Loft", "/bettsessel/loft/index.html", 2, "", 1, "");
addItem("100804", "Stoffwahl", "/bettsessel/loft/stoffwahl/index.html", 3, "", 1, "");
addItem("10041", "Alea", "/bettsessel/alea/index.html", 2, "", 1, "");
addItem("10067", "Stoffwahl", "/bettsessel/alea/stoffgruppen/index.html", 3, "", 1, "");
addItem("100803", "Campo", "/bettsessel/campo/index.html", 2, "", 1, "");
addItem("100805", "Stoffwahl", "/bettsessel/campo/stoffwahl/index.html", 3, "", 1, "");
addItem("10040", "Nova", "/bettsessel/nova/index.html", 2, "", 1, "");
addItem("10069", "Stoffwahl", "/bettsessel/nova/stoffgruppen/index.html", 3, "", 1, "");
addItem("10038", "Meri", "/bettsessel/meri/index.html", 2, "", 1, "");
addItem("10064", "Stoffwahl", "/bettsessel/meri/stoffgruppen/index.html", 3, "", 1, "");
addItem("10037", "Belini", "/bettsessel/belini/index.html", 2, "", 1, "");
addItem("10065", "Stoffwahl", "/bettsessel/belini/stoffgruppen/index.html", 3, "", 1, "");
addItem("100497", "Sopra", "/bettsessel/sopra/index.html", 2, "", 1, "");
addItem("100498", "Stoffwahl", "/bettsessel/sopra/stoffwahl/index.html", 3, "", 1, "");
addItem("10042", "Scala", "/bettsessel/scala/index.html", 2, "", 1, "");
addItem("10068", "Stoffwahl", "/bettsessel/scala/stoffgruppen/index.html", 3, "", 1, "");
addItem("10039", "Sesam", "/bettsessel/sesam/index.html", 2, "", 1, "");
addItem("10066", "Stoffwahl", "/bettsessel/sesam/stoffgruppen/index.html", 3, "", 1, "");
addItem("10082", "Trio", "/bettsessel/trio/index.html", 2, "", 1, "");
addItem("10083", "Stoffwahl", "/bettsessel/trio/stoffgruppen/index.html", 3, "", 1, "");
addItem("10032", "Bettecken", "/bettecken/index.html", 1, "", 1, "");
addItem("100816", "Ottomanecken", "/bettecken/ottomanecken/index.html", 2, "", 1, "");
addItem("100808", "Loft_20mit_20Ottomane", "/bettecken/ottomanecken/loft/index.html", 3, "", 1, "");
addItem("100809", "Stoffwahl", "/bettecken/ottomanecken/loft/stoffwahl/index.html", 4, "", 1, "");
addItem("10034", "Alea_20mit_20Ottomane", "/bettecken/ottomanecken/aela/index.html", 3, "", 1, "");
addItem("10061", "Stoffwahl", "/bettecken/ottomanecken/aela/stoffgruppen/index.html", 4, "", 1, "");
addItem("10035", "Scala_20mit_20Ottomane", "/bettecken/ottomanecken/scala/index.html", 3, "", 1, "");
addItem("10062", "Stoffwahl", "/bettecken/ottomanecken/scala/stoffgruppen/index.html", 4, "", 1, "");
addItem("10036", "Nova_20mit_20Ottomane", "/bettecken/ottomanecken/nova/index.html", 3, "", 1, "");
addItem("10063", "Stoffwahl", "/bettecken/ottomanecken/nova/stoffgruppen/index.html", 4, "", 1, "");
addItem("100831", "Campo_20mit_20Ottomane", "/bettecken/ottomanecken/campo-mit-ottomane/index.html", 3, "", 1, "");
addItem("100833", "Stoffwahl", "/bettecken/ottomanecken/campo-mit-ottomane/stoffwahl/index.html", 4, "", 1, "");
addItem("100817", "Anstellecken", "/bettecken/anstellecke/index.html", 2, "", 1, "");
addItem("100810", "Campo_20mit_20Anstellelement", "/bettecken/anstellecke/campo-mit-anstellelement/index.html", 3, "", 1, "");
addItem("100812", "Stoffwahl", "/bettecken/anstellecke/campo-mit-anstellelement/stoffwahl/index.html", 4, "", 1, "");
addItem("100811", "Nova_20mit_20Anstellelement", "/bettecken/anstellecke/nova-mit-anstellelement/index.html", 3, "", 1, "");
addItem("100813", "Stoffwahl", "/bettecken/anstellecke/nova-mit-anstellelement/stoffwahl/index.html", 4, "", 1, "");
addItem("100661", "Alea_20mit_20Anstellelement", "/bettecken/anstellecke/alea-mit-anstellelement/index.html", 3, "", 1, "");
addItem("100800", "Stoffwahl", "/bettecken/anstellecke/alea-mit-anstellelement/stoffwahl2/index.html", 4, "", 1, "");
addItem("100832", "Nova_20mit_20Anstellelement_20_X7_20Abschlusshocker", "/bettecken/anstellecke/nova-mit-anstellelement-abschlusshocker/index.html", 3, "", 1, "");
addItem("100834", "Stoffwahl", "/bettecken/anstellecke/nova-mit-anstellelement-abschlusshocker/stoffwahl/index.html", 4, "", 1, "");
addItem("1004", "Relaxsessel", "/relaxsessel/index.html", 1, "", 1, "");
addItem("10027", "Calypso", "/relaxsessel/calypso/index.html", 2, "", 1, "");
addItem("100464", "Stoffwahl", "/relaxsessel/calypso/stoffwahl/index.html", 3, "", 1, "");
addItem("10030", "Alex", "/relaxsessel/alex/index.html", 2, "", 1, "");
addItem("10074", "Stoffwahl", "/relaxsessel/alex/stoffgruppen/index.html", 3, "", 1, "");
addItem("10011", "Filou", "/relaxsessel/filou/index.html", 2, "", 1, "");
addItem("10070", "Stoffwahl", "/relaxsessel/filou/stoffgruppen/index.html", 3, "", 1, "");
addItem("10013", "Ego", "/relaxsessel/ego/index.html", 2, "", 1, "");
addItem("10072", "Stoffwahl", "/relaxsessel/ego/stoffgruppen/index.html", 3, "", 1, "");
addItem("100454", "Enzo", "/relaxsessel/enzo/index.html", 2, "", 1, "");
addItem("100460", "Stoffwahl", "/relaxsessel/enzo/stoffwahl/index.html", 3, "", 1, "");
addItem("1005", "Polsterm_C3_B6bel", "/polstermoebel/index.html", 1, "", 1, "");
addItem("100566", "Einzelsessel", "/polstermoebel/einzelsessel/index.html", 2, "", 1, "");
addItem("100495", "Swing", "/polstermoebel/einzelsessel/swing/index.html", 3, "", 1, "");
addItem("100506", "Stoffwahl", "/polstermoebel/einzelsessel/swing/stoffwahl/index.html", 4, "", 1, "");
addItem("100496", "Nolla", "/polstermoebel/einzelsessel/nolla/index.html", 3, "", 1, "");
addItem("100507", "Stoffwahl", "/polstermoebel/einzelsessel/nolla/stoffwahl/index.html", 4, "", 1, "");
addItem("100352", "Sessel_20Fox", "/polstermoebel/einzelsessel/sessel-fox/index.html", 3, "", 1, "");
addItem("100353", "Stoffwahl", "/polstermoebel/einzelsessel/sessel-fox/stoffgruppen/index.html", 4, "", 1, "");
addItem("100690", "Kara", "/polstermoebel/einzelsessel/kara/index.html", 3, "", 1, "");
addItem("100691", "Stoffwahl", "/polstermoebel/einzelsessel/kara/stoffwahl/index.html", 4, "", 1, "");
addItem("100740", "Max", "/polstermoebel/einzelsessel/max/index.html", 3, "", 1, "");
addItem("100744", "Stoffwahl", "/polstermoebel/einzelsessel/max/stoffwahl/index.html", 4, "", 1, "");
addItem("100742", "Britt", "/polstermoebel/einzelsessel/britt/index.html", 3, "", 1, "");
addItem("100745", "Stoffwahl", "/polstermoebel/einzelsessel/britt/stoffwahl/index.html", 4, "", 1, "");
addItem("100739", "Malon", "/polstermoebel/einzelsessel/malon/index.html", 3, "", 1, "");
addItem("100743", "Stoffwahl", "/polstermoebel/einzelsessel/malon/stoffwahl/index.html", 4, "", 1, "");
addItem("100567", "Sofas_20ohne_20Bettfunktion", "/polstermoebel/sofas-ohne-bettfunktion/index.html", 2, "", 1, "");
addItem("100570", "Alea", "/polstermoebel/sofas-ohne-bettfunktion/alea/index.html", 3, "", 1, "");
addItem("100586", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/alea/stoffwahl/index.html", 4, "", 1, "");
addItem("100823", "Alea_20mit_20Bettkasten", "/polstermoebel/sofas-ohne-bettfunktion/alea-mit-bettkasten/index.html", 3, "", 1, "");
addItem("100825", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/alea-mit-bettkasten/stoffwahl/index.html", 4, "", 1, "");
addItem("100572", "Nova", "/polstermoebel/sofas-ohne-bettfunktion/nova/index.html", 3, "", 1, "");
addItem("100611", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/nova/stoffwahl/index.html", 4, "", 1, "");
addItem("100824", "Nova_20mit_20Bettkasten", "/polstermoebel/sofas-ohne-bettfunktion/nova-mit-bettkasten/index.html", 3, "", 1, "");
addItem("100826", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/nova-mit-bettkasten/stoffwahl/index.html", 4, "", 1, "");
addItem("100571", "Scala", "/polstermoebel/sofas-ohne-bettfunktion/scala/index.html", 3, "", 1, "");
addItem("100598", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/scala/stoffwahl/index.html", 4, "", 1, "");
addItem("100573", "Sopra", "/polstermoebel/sofas-ohne-bettfunktion/sopra/index.html", 3, "", 1, "");
addItem("100625", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/sopra/stoffwahl/index.html", 4, "", 1, "");
addItem("10043", "Sofa_20Fox", "/polstermoebel/sofas-ohne-bettfunktion/fox/index.html", 3, "", 1, "");
addItem("10075", "Stoffwahl", "/polstermoebel/sofas-ohne-bettfunktion/fox/fox-stoffwahl/index.html", 4, "", 1, "");
addItem("100569", "Ecken_20ohne_20Bettfunktion", "/polstermoebel/ecken-ohne-bettfunktion/index.html", 2, "", 1, "");
addItem("10047", "Aleaecke", "/polstermoebel/ecken-ohne-bettfunktion/aleaecke/index.html", 3, "", 1, "");
addItem("10079", "Stoffwahl", "/polstermoebel/ecken-ohne-bettfunktion/aleaecke/aleaecke-stoffwahl/index.html", 4, "", 1, "");
addItem("10048", "Scalaecke", "/polstermoebel/ecken-ohne-bettfunktion/scalaecke/index.html", 3, "", 1, "");
addItem("10080", "Stoffwahl", "/polstermoebel/ecken-ohne-bettfunktion/scalaecke/scalaecke-stoffwahl/index.html", 4, "", 1, "");
addItem("10049", "Novaecke", "/polstermoebel/ecken-ohne-bettfunktion/novaecke/index.html", 3, "", 1, "");
addItem("10081", "Stoffwahl", "/polstermoebel/ecken-ohne-bettfunktion/novaecke/novaecke-stoffwahl/index.html", 4, "", 1, "");
addItem("100660", "Alea_20mit_20Anstellelement", "/polstermoebel/ecken-ohne-bettfunktion/alea-mit-anstellelement/index.html", 3, "", 1, "");
addItem("100663", "Stoffwahl", "/polstermoebel/ecken-ohne-bettfunktion/alea-mit-anstellelement/stoffwahl/index.html", 4, "", 1, "");
addItem("10031", "Sonderposten", "/sonderposten/index.html", 1, "", 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;
		
	};
};