<script>
#raw
function loadMenu(url, common_static_path)
{
	jQuery.ajax({type: "GET",  url: url, async: true, dataType: "json",
		   success: function(data)
		   {
		   		var myTemplateObj = TrimPath.parseDOMTemplate("menu_jstl");
				try{
					function get(id)
					{
						var sheet = data[id];
						if(sheet){
							sheet.getValue = function(name){
								var value = this[name];
								if(value != null)
									return value
								return null
							};
							sheet.getList = function(name){
								var list = new Array();
								for (var i in this.getValue(name)){
									list.push(get(i));
								}
								return list;
							};
							sheet.get = function(name){
								for (var i in this.getValue(name))
									return get(i);
								return null;
							}
						}
						return sheet
					}
					var menuJson = new Array()
					menuJson['application'] = get(data['root']);
					menuJson['application'].getList('Application.Folder');
			    	var result  = myTemplateObj.process(menuJson);
			    	$("#myslidemenu").html(result)
					var arrowimages={down:['downarrowclass', common_static_path+'/runtime/images/down.gif', 23], right:['rightarrowclass', common_static_path+'/runtime/images/right.gif']}
					jqueryslidemenu.buildmenu("myslidemenu", arrowimages)
			    }catch(err){
			    	alert(err)
			    }


		   },
		   error: function(XMLHttpRequest, textStatus, errorThrown)
		   {
				alert(textStatus+"  "+errorThrown);
		   }
    });
}
#end raw
</script>