var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Blumensteine", "/pi1/index.html", 1, "", 1, "");
addItem("10015", "Blumeninseln", "/pi1/pi15/index.html", 2, "", 1, "");
addItem("10023", "fl_C3_A4chig_20glasiert", "/pi1/pi15/pi23/index.html", 3, "", 1, "");
addItem("10027", "3_X2Fl_C3_A4chen", "/pi1/pi15/pi27/index.html", 3, "", 1, "");
addItem("10024", "Punkte", "/pi1/pi15/pi24/index.html", 3, "", 1, "");
addItem("10025", "Spirale", "/pi1/pi15/pi25/index.html", 3, "", 1, "");
addItem("10026", "Ammonit", "/pi1/pi15/pi26/index.html", 3, "", 1, "");
addItem("10028", "Rosenbl_C3_BCte", "/pi1/pi15/pi28/index.html", 3, "", 1, "");
addItem("10016", "Margeritensteine", "/pi1/pi16/index.html", 2, "", 1, "");
addItem("10029", "fl_C3_A4chig_20glasiert", "/pi1/pi16/pi29/index.html", 3, "", 1, "");
addItem("10080", "Punkte", "/pi1/pi16/pi80/index.html", 3, "", 1, "");
addItem("10030", "Spirale", "/pi1/pi16/pi30/index.html", 3, "", 1, "");
addItem("10081", "Ammonit", "/pi1/pi16/pi81/index.html", 3, "", 1, "");
addItem("10031", "Rosenbl_C3_BCte", "/pi1/pi16/pi31/index.html", 3, "", 1, "");
addItem("10017", "Blumensteine_20quadratisch", "/pi1/pi17/index.html", 2, "", 1, "");
addItem("10021", "gro_C3_9F", "/pi1/pi17/pi21/index.html", 3, "", 1, "");
addItem("10032", "fl_C3_A4chig_20glasiert", "/pi1/pi17/pi21/pi32/index.html", 4, "", 1, "");
addItem("10033", "gemustert", "/pi1/pi17/pi21/pi33/index.html", 4, "", 1, "");
addItem("10034", "gekerbt", "/pi1/pi17/pi21/pi34/index.html", 4, "", 1, "");
addItem("10082", "klein", "/pi1/pi17/pi82/index.html", 3, "", 1, "");
addItem("10083", "fl_C3_A4chig_20glasiert", "/pi1/pi17/pi82/pi83/index.html", 4, "", 1, "");
addItem("10084", "gemustert", "/pi1/pi17/pi82/pi84/index.html", 4, "", 1, "");
addItem("10085", "gekerbt", "/pi1/pi17/pi82/pi85/index.html", 4, "", 1, "");
addItem("10018", "Blumensteine_20rechteckig", "/pi1/pi18/index.html", 2, "", 1, "");
addItem("10038", "f_C3_BCr_20eine_20Blume", "/pi1/pi18/pi38/index.html", 3, "", 1, "");
addItem("10040", "fl_C3_A4chig_20glasiert", "/pi1/pi18/pi38/pi40/index.html", 4, "", 1, "");
addItem("10041", "gemustert", "/pi1/pi18/pi38/pi41/index.html", 4, "", 1, "");
addItem("10042", "gekerbt", "/pi1/pi18/pi38/pi42/index.html", 4, "", 1, "");
addItem("10043", "Ammonit", "/pi1/pi18/pi38/pi43/index.html", 4, "", 1, "");
addItem("10044", "Linie", "/pi1/pi18/pi38/pi44/index.html", 4, "", 1, "");
addItem("10050", "Muscheln", "/pi1/pi18/pi38/pi50/index.html", 4, "", 1, "");
addItem("10039", "f_C3_BCr_20zwei_20Blumen", "/pi1/pi18/pi39/index.html", 3, "", 1, "");
addItem("10045", "fl_C3_A4chig_20glasiert", "/pi1/pi18/pi39/pi45/index.html", 4, "", 1, "");
addItem("10046", "gemustert", "/pi1/pi18/pi39/pi46/index.html", 4, "", 1, "");
addItem("10047", "gekerbt", "/pi1/pi18/pi39/pi47/index.html", 4, "", 1, "");
addItem("1002", "Duftsteine", "/pi2/index.html", 1, "", 1, "");
addItem("10019", "klein", "/pi2/pi19/index.html", 2, "", 1, "");
addItem("10086", "fl_C3_A4chig_20glasiert", "/pi2/pi19/pi86/index.html", 3, "", 1, "");
addItem("10056", "fl_C3_A4chig_20mit_20Motiv", "/pi2/pi19/pi56/index.html", 3, "", 1, "");
addItem("10062", "Muschel", "/pi2/pi19/pi56/pi62/index.html", 4, "", 1, "");
addItem("10063", "Schnecke", "/pi2/pi19/pi56/pi63/index.html", 4, "", 1, "");
addItem("10064", "Ammonit", "/pi2/pi19/pi56/pi64/index.html", 4, "", 1, "");
addItem("10058", "Sonne", "/pi2/pi19/pi58/index.html", 3, "", 1, "");
addItem("10059", "gemustert", "/pi2/pi19/pi59/index.html", 3, "", 1, "");
addItem("10060", "Punkte", "/pi2/pi19/pi60/index.html", 3, "", 1, "");
addItem("10061", "innen_20glasiert", "/pi2/pi19/pi61/index.html", 3, "", 1, "");
addItem("10065", "Muschel", "/pi2/pi19/pi61/pi65/index.html", 4, "", 1, "");
addItem("10066", "Schnecke", "/pi2/pi19/pi61/pi66/index.html", 4, "", 1, "");
addItem("10067", "Ammonit", "/pi2/pi19/pi61/pi67/index.html", 4, "", 1, "");
addItem("10020", "gro_C3_9F", "/pi2/pi20/index.html", 2, "", 1, "");
addItem("10068", "fl_C3_A4chig_20glasiert", "/pi2/pi20/pi68/index.html", 3, "", 1, "");
addItem("10069", "fl_C3_A4chig_20mit_20Motiv", "/pi2/pi20/pi69/index.html", 3, "", 1, "");
addItem("10074", "Muschel", "/pi2/pi20/pi69/pi74/index.html", 4, "", 1, "");
addItem("10075", "Schnecke", "/pi2/pi20/pi69/pi75/index.html", 4, "", 1, "");
addItem("10076", "Ammonit", "/pi2/pi20/pi69/pi76/index.html", 4, "", 1, "");
addItem("10070", "Sonne", "/pi2/pi20/pi70/index.html", 3, "", 1, "");
addItem("10071", "gemustert", "/pi2/pi20/pi71/index.html", 3, "", 1, "");
addItem("10072", "Punkte", "/pi2/pi20/pi72/index.html", 3, "", 1, "");
addItem("10073", "innen_20glasiert", "/pi2/pi20/pi73/index.html", 3, "", 1, "");
addItem("10077", "Muschel", "/pi2/pi20/pi73/pi77/index.html", 4, "", 1, "");
addItem("10078", "Schnecke", "/pi2/pi20/pi73/pi78/index.html", 4, "", 1, "");
addItem("10079", "Ammonit", "/pi2/pi20/pi73/pi79/index.html", 4, "", 1, "");
addItem("1003", "_C3_84therische_20_C3_96le", "/pi3/index.html", 1, "", 1, "");
addItem("10087", "Mehrfarbige_20Steine", "/pi87/index.html", 1, "", 1, "");
addItem("10089", "Ammonit_20zweifarbig", "/pi87/pi89/index.html", 2, "", 1, "");
addItem("10090", "W_C3_BCrfel_20vierfarbig", "/pi87/pi90/index.html", 2, "", 1, "");
addItem("10091", "Blumeninsel_20vierfarbig", "/pi87/pi91/index.html", 2, "", 1, "");
addItem("10088", "Stein_20_X7_20Glas", "/pi88/index.html", 1, "", 1, "");
addItem("10092", "Arrangement_20f_C3_BCr_20Blumeninsel,_20flaches_20Glas", "/pi88/pi92/index.html", 2, "", 1, "");
addItem("10093", "Arrangement_20f_C3_BCr_20Blumeninsel,_20hohes_20Glas", "/pi88/pi93/index.html", 2, "", 1, "");
addItem("10094", "Arrangement_20f_C3_BCr_20W_C3_BCrfel,_20rundes_20Glas", "/pi88/pi94/index.html", 2, "", 1, "");
addItem("10095", "Arrangement_20f_C3_BCr_20W_C3_BCrfel,_20rechteckiges_20Glas", "/pi88/pi95/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;
		
	};
};