var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1006", "Letzte_20W_C3_BCrfe", "/welpen2/index.html", 1, "", 1, "");
addItem("10023", "K_C2_B3_X2Wurf", "/welpen2/k-wurf/index.html", 2, "", 1, "");
addItem("10020", "L_C2_B3_X2Wurf", "/welpen2/l/index.html", 2, "", 1, "");
addItem("10021", "M_C2_B3_X2Wurf", "/welpen2/m/index.html", 2, "", 1, "_self");
addItem("10025", "N_C2_B3_X2Wurf", "/welpen2/n3-wurf/index.html", 2, "", 1, "");
addItem("10034", "O_C2_B3_X2Wurf", "/welpen2/o-wurf/index.html", 2, "", 1, "");
addItem("10031", "P_C2_B3_X2Wurf", "/welpen2/p-wurf/index.html", 2, "", 1, "");
addItem("10035", "Q_C2_B3_X2Wurf", "/welpen2/q-wurf/index.html", 2, "", 1, "");
addItem("10036", "R_C2_B3_X2Wurf", "/welpen2/r-wurf/index.html", 2, "", 1, "");
addItem("10037", "S_C2_B3_X2Wurf", "/welpen2/s-wurf/index.html", 2, "", 1, "");
addItem("10038", "T_C2_B3_X2Wurf", "/welpen2/t-wurf/index.html", 2, "", 1, "");
addItem("10039", "U_C2_B3_X2Wurf", "/welpen2/u-wurf/index.html", 2, "", 1, "");
addItem("10014", "Aktuelle_20Welpen", "/aktuelle-welpen/index2.html", 1, "", 1, "");
addItem("10040", "V_C2_B3_X2Wurf", "/aktuelle-welpen/v-wurf/index.html", 2, "", 1, "");
addItem("10041", "W_C2_B3_X2Wurf", "/aktuelle-welpen/w-wurf/index.html", 2, "", 1, "");
addItem("1009", "Unsere_20Beagles", "/unsere-beagles/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;
		
	};
};