var HomeNavButton = new Class({
initialize: function(e) 
	{
		this.e = e;
		
		var p = e.rel.split('_');
		
		//this.l = p[0];
		this.section = p[0];
		this.group = p[1];
		//this.page = p[3];
		//this.tab = p[4];
		//e.bind(this);
		//this.section = e.rel;
		this.setEvents(e);
	},
	
	setGlobals: function()
	{
		
	},
	
	doRequest: function()
	{
		activeButton = this;
		var what = 0;
	
		if(this.page)
		{
			page = this.page;
		}else{
			page = '-';	
		}
		
		if(group!=this.group)
		{
			group = this.group;
			what = 2;	
		}
		if(section!=this.section)
		{
			section = this.section;
			what = 1;	
		}
		
		page = this.page;//!!!
		tab = this.tab;
		
		
		switch(what)
		{
			case 1:
			refreshContent(new Array('banner','center'));
			break;
			case 2:
			refreshContent(new Array('center'));
			break;
			case 3:
			refreshContent(new Array('center'));
			break;
		}
	},
	
	afterRequest: function(t)
	{
	},
	
	updateAfterRequest: function()
	{
	},
	
	setEvents: function(e)
	{		
		this.e.addEvents
		({
			'mouseover': this.doMouseover.bind(this),
			'mouseout': this.doMouseout.bind(this),
			'click': this.doClick.bind(this)
		});
		
		e.onclick = function()
		{
			return false;
		};	
		
		e.onmouseover = function()
		{
			return false;
		};
		
		e.onmouseout = function()
		{
			return false;
		};
	},
	
	doClick: function()
	{
		//this.setGlobals();
		this.doRequest();
		this.e.blur();
	},
	
	doMouseover: function()
	{
	},
	
	doMouseout: function()
	{
	}
	
});

function initHomeNavButton()
{
	$$('#container .homeNavButton').each(function(e){new HomeNavButton(e);});
}

