var typetr="";
var TRforResize=false;
var GUItable=function(elId)
{
	this.tableEl=getObject(elId);
	this.tableEl.className="GUI_TABLE";
	
	var tr=this.tableEl.getElementsByTagName('tr');
	
	for(i=0;i<tr.length;i++)
	{
		if(i/2!=Math.round(i/2))
		{
			tr[i].className="GUI_TABLE_TR_CET";
		}
		tr[i].onmouseover=function()
		{
			typetr=this.className;			
			this.className="GUI_TABLE_TR_HOVER";
		}
		
		tr[i].onmouseout=function()
		{			
			this.className=typetr;
			typetr="";				
		}
		
		
	}

	var th=this.tableEl.getElementsByTagName('th');
	for(i=0;i<th.length;i++)
	{
		th[i].onmousemove=function (e)
		{
			if(!e) e=window.event;
			
			try
	        {
				var previ=this.previousSibling;				
			}
			catch(error)
			{
				var previ=false;
			}

			
			try
	        {
				var next=this.nextSibling;				
			}
			catch(error)
			{
				var next=false;
			}	
			
			
			
			var info=getElementInfo(this);
			/*
			if(next && e.clientX-parseInt(info.left)>=info.width-10)
			{
				this.style.cursor="w-resize";
				//window.status=e.button;
				if(TRforResize)				
				{
					this.style.width=e.clientX-parseInt(info.left);
									
				}
			}
			else
			{
				this.style.cursor="";
			}
			*/
			
		}	
		
		th[i].onmousedown=function (e)
		{
			TRforResize=this;
			
		}
		
		th[i].onmouseup=function (e)
		{
			TRforResize=false;
			
		}
		
		th[i].onmouseout=function (e)
		{
			TRforResize=false;
			
		}
		
	}
	return this.tableEl;
}
