dojo.require('flt.Core');
FLT.init = function ()
{
		
	FLT.clientList = dojo.query ("#client_list li a");
	FLT.clientContentList = dojo.query ("#client_content_list li.client_content");
	dojo.forEach (FLT.clientList,
		function (item) {
			dojo.connect (item, "onclick", function(e){FLT.setClientContent (item);});
		});
}

FLT.setClientContent = function (button)
{
	dojo.forEach(FLT.clientContentList, 
		function(item){
			
			var id = dojo.attr (button, "rel");
			
			if (dojo.attr(item, "id") == id)
			{
				dojo.style(item, "display", "block");
				//dojo.fadeIn ({node: item}).play();
			}
			else
			{
				dojo.style(item, "display", "none");
				//dojo.fadeOut ({node: item}).play();
			}
			
		
			
			if (FLT.selected)
				dojo.removeClass (FLT.selected, "current");
				
			dojo.addClass(button, "current");
			
			FLT.selected = button;
			return false;
	});
	
}


dojo.addOnLoad(FLT.init);
