var g_oPopupMenu = new SMPopupMenu("SMGlobalPopupMenu"), oItem = null;
with(g_oPopupMenu){
addItem("1001", "Climbing_20Frames_20WICKEY", "/childrens-climbing-frames/index.html", 1, "", 1, "");
addItem("10031", "Platform_20height_20120_20cm", "/childrens-climbing-frames/platform-height-120-cm/index.html", 2, "", 1, "");
addItem("10032", "Platform_20height_20150_20cm", "/childrens-climbing-frames/platform-height-150-cm/index.html", 2, "", 1, "");
addItem("10030", "WICKEY_20Accessoires", "/childrens-climbing-frames/wickey-accessoires/index.html", 2, "", 1, "");
addItem("10035", "All_20Climbing_20Frames", "/childrens-climbing-frames/all-climbing-frames/index.html", 2, "", 1, "");
addItem("1005", "Climbing_20Frames_20DIY", "/jungle-gym-climbing-frames/index.html", 1, "", 1, "");
addItem("10049", "Jungle_20Gym", "/jungle-gym-climbing-frames/jungle-gym/index.html", 2, "", 1, "");
addItem("1009", "Swing_20sets", "/wooden-childrens-swings-sets/index.html", 1, "", 1, "");
addItem("10036", "Square_20swing_20Set", "/wooden-childrens-swings-sets/square-swing-set/index.html", 2, "", 1, "");
addItem("10037", "Round_20swing_20set", "/wooden-childrens-swings-sets/round-swing-set/index.html", 2, "", 1, "");
addItem("10013", "Swing_20Accessoires", "/swing-accessoires/index.html", 1, "", 1, "");
addItem("10029", "Single_20Swings", "/swing-accessoires/swing-seat/index.html", 2, "", 1, "");
addItem("1004", "Double_20Swings", "/swing-accessoires/duo-swing-seat/index.html", 2, "", 1, "");
addItem("1008", "Gymnastics", "/swing-accessoires/gymnastic-rings/index.html", 2, "", 1, "");
addItem("10012", "Baby_20Swings", "/swing-accessoires/baby-swing-seats/index.html", 2, "", 1, "");
addItem("10015", "Tyre_20Swings", "/swing-accessoires/tyre-swing-tire-swings/index.html", 2, "", 1, "");
addItem("10038", "All_20swing_20seats", "/swing-accessoires/all-swing-seats/index.html", 2, "", 1, "");
addItem("10016", "Climbing_20_X7_20Gym_20bars", "/gymnastic-bars-climbing-net-climb-rope/index.html", 1, "", 1, "");
addItem("10039", "Gymnastic_20bars", "/gymnastic-bars-climbing-net-climb-rope/gymnastic-bars/index.html", 2, "", 1, "");
addItem("10040", "Ropes,_20Ladders_20_X7_20Nets", "/gymnastic-bars-climbing-net-climb-rope/ropes-ladders-nets/index.html", 2, "", 1, "");
addItem("10041", "Climbing_20stones_20_X7_20Walls", "/gymnastic-bars-climbing-net-climb-rope/climbing-stones-walls/index.html", 2, "", 1, "");
addItem("10042", "All_20items", "/gymnastic-bars-climbing-net-climb-rope/all-items/index.html", 2, "", 1, "");
addItem("10017", "Sandboxes", "/wooden-sandboxes-sandpits/index.html", 1, "", 1, "");
addItem("1003", "Square", "/wooden-sandboxes-sandpits/square-sandpit-sandbox/index.html", 2, "", 1, "");
addItem("10034", "Rectangular", "/wooden-sandboxes-sandpits/rectangular2/index.html", 2, "", 1, "");
addItem("1007", "Hexagonal", "/wooden-sandboxes-sandpits/hexagonal-sandpit-sandbox/index.html", 2, "", 1, "");
addItem("10014", "With_20Rooftop", "/wooden-sandboxes-sandpits/anti-root-foil/index.html", 2, "", 1, "");
addItem("10043", "Specials", "/wooden-sandboxes-sandpits/specials/index.html", 2, "", 1, "");
addItem("10044", "Extra_C2_B4s", "/wooden-sandboxes-sandpits/extras/index.html", 2, "", 1, "");
addItem("10022", "Wendy_20Houses", "/wendy-house-wooden-play-houses/index.html", 1, "", 1, "");
addItem("10018", "Picnic_20sets", "/wooden-picnic-sets/index.html", 1, "", 1, "");
addItem("10019", "Zip_20Wires", "/zip-wires/index.html", 1, "", 1, "");
addItem("10020", "Slides", "/slide-garden-slides/index.html", 1, "", 1, "");
addItem("10021", "Swing_20Hooks", "/swing-hook-iron-hooks/index.html", 1, "", 1, "");
addItem("10023", "Spring_20Animals", "/spring-animals/index.html", 1, "", 1, "");
addItem("10024", "Safety_20Tiles_20_X7_20Anchors", "/safety-tiles-groundsanchors/index.html", 1, "", 1, "");
addItem("10025", "Commercial_20EN_201177", "/public-playground/index.html", 1, "", 1, "");
addItem("1002", "Commercial_20Spring_20Animals", "/public-playground/commercial-spring-animal/index.html", 2, "", 1, "");
addItem("1006", "Commercial_20Swings", "/public-playground/commercial-baby-swing-seats/index.html", 2, "", 1, "");
addItem("10010", "Commercial_20Slides", "/public-playground/commercial-slide-garden-slides/index.html", 2, "", 1, "");
addItem("10026", "Accessories", "/climbing-frame-accessoires/index.html", 1, "", 1, "");
addItem("10045", "Funny_20Accessories", "/climbing-frame-accessoires/funny-accessories/index.html", 2, "", 1, "");
addItem("10046", "Handgrips", "/climbing-frame-accessoires/hand-grips/index.html", 2, "", 1, "");
addItem("10047", "Others", "/climbing-frame-accessoires/others/index.html", 2, "", 1, "");
addItem("10048", "All_20Accessories", "/climbing-frame-accessoires/all-accessories/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;
		
	};
};