<!--

Initialise.addEvent(function() {

	items = $$('a.360-menuitem');

	// Add event listener to every article image we find.
	items.each(function (item) {
		item.observe('click',DegMenu.Show,false);
	});	
		
});

var DegMenu = {
	
	Current : null,

	Show : function(){
		
		DegMenu.returnItemHighlights();
		
		this.addClassName('act');
		
		if( DegMenu.Current != this.title )
		{
			$(this.rel).innerHTML = '<img src="http://images.vkf-renzel.com/img/misc/loading.gif" width="32" height="32" class="loader">';
	    			
			new Ajax.Updater($(this.rel), 
				'/xhr/360/' + this.title + '.php', {
					asynchronous: true,
					evalScripts : true,
					method : 'post',
					parameters: {
					   'sid' : Conf.sid,
					   'loc' : Conf.loc
					}
				});	
			
			DegMenu.Current = this.title;
		}
		
	},
	
	returnItemHighlights : function(){
		items = $$('a.360-menuitem');

		// Add event listener to every article image we find.
		items.each(function (item) {
			item.removeClassName('act');
		});
	}
	
};

var Market = {	
	
	CurrentID : null,
	
	ShowSection : function(section){
		
		DegMenu.returnItemHighlights();
		
		if( Market.CurrentID != section )
		{	
			Messages.ShowStatus(false);
							
			new Ajax.Updater('deg360-leftcolumn', 
					'/xhr/market/images.php', {
						asynchronous:true,
						evalScripts:true,
						method:'post',
						parameters: {
							'id'  : section,
							'sid' : Conf.sid,
							'loc' : Conf.loc
						},
						onComplete: function(){
							Carousel.Init();
							Messages.HideStatus();	
						}
					});
			
			new Ajax.Updater('deg360-rightcolumn', 
					'/xhr/market/description.php', {
						asynchronous:true,
						evalScripts:true,
						method:'post',
						parameters: {
							'id'  : section,
							'sid' : Conf.sid,
							'loc' : Conf.loc
						}
					});
					
			Market.CurrentID = section;
		}
		
	}
};

-->