var Content = new Class({

	initialize: function(element, controller, url, visible)
	{
		this.e = element;
		this.c = controller;
		this.url = url;
		this.visible = visible;
		if(!this.visible) this.e.setStyle('visibility','hidden');	
	},
	
	refreshContent: function(vo)
	{
		//alert('before');
		iPlayers = [];//reset the players
		this.c.chain
		(
			function()
			{
				new Request.HTML({url:this.url, update:this.e, 	data:vo, onSuccess:function(responseTree, responseElements, responseHTML, responseJavaScript){this.afterRequest(responseTree, responseElements, responseHTML, responseJavaScript);}.bind(this) }).send();
			}.bind(this)
		)
	},
	
	afterRequest:function()
	{
		//alert('after');
		this.e.setStyle('visibility','visible');
		this.visible = true;
		//$$('.rounded').each(function(e){myBorder.render(e);})
		$('content').setStyle('background','#FFFFFF');
		if(Browser.Engine.name == 'trident' & Browser.Engine.version < 5)
		{
			
		}else{
			myBorder.render('content');	
		}
		//alert( inlineSound_0_object);
		//inlineSound_1_object.write("inlineSound_0_div")
		//this.c.callChain();
//		/doInlinePlayers.delay(1000);
	},
	
	removeContent: function()
	{
		this.c.chain
		(
			function()
			{
				this.e.setStyle('visibility','hidden');
				this.e.set('html','');
				this.visible = false;
				this.c.callChain();
			}.bind(this)
		)
	}
	
});

