var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("10090", "Art_20Murals", "/pi90/index.htm", 1, "", 1, "");
addItem("10094", "Bamboo_20Murals", "/pi94/index.htm", 1, "", 1, "");
addItem("10087", "Black_20_X7_20White_20Murals", "/pi87/index.htm", 1, "", 1, "");
addItem("10098", "Buddha_20Murals", "/pi98/index.htm", 1, "", 1, "");
addItem("10021", "Cityscape_20Murals", "/pi21/index.htm", 1, "", 1, "");
addItem("10086", "Flower_20Murals", "/pi86/index.htm", 1, "", 1, "");
addItem("10093", "Forest_20Murals", "/pi93/index.htm", 1, "", 1, "");
addItem("10018", "Kid_X9s_20Room_20Murals", "/pi18/index.htm", 1, "", 1, "");
addItem("10092", "Merilyn_20Monroe_20Murals", "/pi92/index.htm", 1, "", 1, "");
addItem("10096", "Mountain_20Murals", "/pi96/index.htm", 1, "", 1, "");
addItem("10099", "New_20York_20Murals", "/pi99/index.htm", 1, "", 1, "");
addItem("10095", "Palm_20Tree_20Murals", "/pi95/index.htm", 1, "", 1, "");
addItem("10091", "Panoramic_20Murals", "/pi91/index.htm", 1, "", 1, "");
addItem("10089", "Seaside_20Murals", "/pi89/index.htm", 1, "", 1, "");
addItem("10071", "Trend_20Murals", "/pi71/index.htm", 1, "", 1, "");
addItem("10088", "Wallpaper_20Murals", "/pi88/index.htm", 1, "", 1, "");
addItem("10097", "Wintergarden_20Murals", "/pi97/index.htm", 1, "", 1, "");
addItem("10076", "New_20Releases", "/pi76/index.htm", 1, "", 1, "");
addItem("10079", "At_20One_20Sight", "/pi79/index.htm", 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;
		
	};
};