function trPanel()
{
	this.opened = false;
	this.div;
	this.fx;
	this.tr;
	this.tdiv;
	
	this.open = function(dtr, url, size, scroll)
	{
		if($type(scroll) == false)
		{
			scroll = true;
		}
		if(this.opened == true)
		{
			this.close2(dtr,url,size);
			return;
		}
		this.tr = new Element('tr', {'class': 'trPaneltr', id: "trPaneltr"});
		span = $(dtr).getChildren().length;
		
		$(dtr).addClass('affectedRow');
		this.tr.setStyle('overflow', 'hidden');
		td = new Element('td');
		td.setProperty('colspan', span);
		this.div = new Element('div',{'id':'trPanel'});
		this.div.setStyle('overflow','hidden');
		this.div.injectInside(td)
		td.injectInside(this.tr);
		this.tr.injectAfter(dtr);
		document.ajaxer.request(url, {update: 'trPanel' , onComplete: function() {
			this.fx = new Fx.Styles(this.div, {onComplete: function() {
				if(scroll)
				{
					new Fx.Scroll(window).toElement(dtr);
				}
				}.bind(this)});
			//console.log(size);
			this.fx.start({'height': [0,this.div.clientHeight],'opacity': 1 });
		}.bind(this)
		});
				
		this.opened = true;
	}
	
	this.clear = function()
	{
		this.tr.remove();
	}
	this.close = function()
	{
		if(this.opened == true)
		{
			//this.div.setStyle('height', 200);
			this.fx = new Fx.Styles(this.div, {onComplete: this.clear.bind(this)});
			this.fx.start({'height': 0});
			this.opened = false;
		}
	}
	this.close2 = function(dtr, url, size)
	{
		
		if(this.opened == true)
		{
			//this.div.setStyle('height', 200);
			this.fx = new Fx.Styles(this.div, {onComplete: function () {
				this.tr.remove();
				this.open(dtr, url, size);
			}.bind(this)});
			this.fx.start({'height': 0});
			this.opened = false;
		}
	}








}