var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Agentur", "/news/philosophie/index.html", 1, "", 1, "_self");
addItem("10048", "Philosophie", "/news/philosophie/index.html", 2, "", 1, "");
addItem("10049", "Das_20Konzept", "/news/das-konzept/index.html", 2, "", 1, "");
addItem("1002", "Portfolio", "/portfolio/index.html", 1, "", 1, "");
addItem("10057", "Aktuelles_X0", "/portfolio/aktuelles/index.html", 2, "", 1, "");
addItem("10073", "Shop_X2Systeme", "/portfolio/shop-systeme/index.html", 2, "", 1, "");
addItem("1004", "CMS_X2Systeme", "/portfolio/webdesign/index.html", 2, "", 1, "");
addItem("10058", "F_20_X7_20A_20Automobile", "/portfolio/webdesign/f-a-automobile/index.html", 3, "", 1, "");
addItem("10059", "Pflegezentrum", "/portfolio/webdesign/pflegezentrum/index.html", 3, "", 1, "");
addItem("1003", "Corporate_20Design", "/portfolio/corporate-design/index.html", 2, "", 1, "");
addItem("10018", "SmartStore", "/portfolio/corporate-design/smartstore-ag/index.html", 3, "companylogo.png", 1, "");
addItem("10019", "TrioVis", "/portfolio/corporate-design/triovis-gmbh/index.html", 3, "", 1, "");
addItem("10021", "Cre_X2Do", "/portfolio/corporate-design/ypsilon-trend-design/index.html", 3, "", 1, "");
addItem("10060", "Ypsilon", "/portfolio/corporate-design/ypsilon/index.html", 3, "", 1, "");
addItem("10061", "RocketDecals", "/portfolio/corporate-design/rocketdecals/index.html", 3, "", 1, "");
addItem("10020", "Villa_X2Marroni", "/portfolio/corporate-design/villa-marroni/index.html", 3, "", 1, "");
addItem("10028", "Dr_X3_20Pott_20GmbH", "/portfolio/corporate-design/pott-gmbh/index.html", 3, "", 1, "");
addItem("10026", "Founder_X3de", "/portfolio/corporate-design/founderde/index.html", 3, "", 1, "");
addItem("1005", "Digital_20Design", "/portfolio/online-shop/index.html", 2, "", 1, "");
addItem("10029", "RocketDecals", "/portfolio/online-shop/rocketdecals/index.html", 3, "", 1, "");
addItem("10030", "Cre_X2Do", "/portfolio/online-shop/cre-do/index.html", 3, "", 1, "");
addItem("10035", "Ypsilon", "/portfolio/online-shop/ypsilon/index.html", 3, "", 1, "");
addItem("10036", "Villa_X2Marroni", "/portfolio/online-shop/villa-marroni/index.html", 3, "", 1, "");
addItem("1006", "Print_20Design", "/portfolio/grafik-design/index.html", 2, "", 1, "");
addItem("10037", "SmartStore_20AG", "/portfolio/grafik-design/smartstore-ag/index.html", 3, "", 1, "");
addItem("10034", "Leistungen", "/leistungen/index.html", 1, "", 1, "");
addItem("10068", "Shop_X2Systeme", "/leistungen/e-commerce/index.html", 2, "", 1, "");
addItem("10070", "CMS_X2Systeme", "/leistungen/cms-systeme/index.html", 2, "", 1, "");
addItem("10072", "Corporate_20Design", "/leistungen/corporate-design/index.html", 2, "", 1, "");
addItem("10069", "Digital_20Design", "/leistungen/web-design/index.html", 2, "", 1, "");
addItem("10071", "Print_20Design", "/leistungen/print/index.html", 2, "", 1, "");
addItem("1007", "Kunden", "/kunden/index.html", 1, "", 1, "");
addItem("10033", "Shop", "/shop/index.html", 1, "", 1, "");
addItem("10046", "Shop_X2Systeme", "/shop/shop-system/index.html", 2, "", 1, "");
addItem("10047", "CMS_X2Systeme", "/shop/cms-system/index.html", 2, "", 1, "");
addItem("10063", "Grafik_X2Software", "/shop/bildbearbeitung/index.html", 2, "", 1, "");
addItem("10062", "3D_X2Software", "/shop/3d-software/index.html", 2, "", 1, "");
addItem("10051", "B_C3_BCcher", "/shop/buecher/index.html", 2, "", 1, "");
addItem("10052", "_X0New_20Releases", "/shop/buecher/new-releases/index.html", 3, "", 1, "");
addItem("10053", "Design", "/shop/buecher/design/index.html", 3, "", 1, "");
addItem("10055", "Typography", "/shop/buecher/typography/index.html", 3, "", 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;
		
	};
};