//合并多列
function overRow(obj,columns,unite) //行对像、总列数、合并列数
{
	if(typeof(columns) == "undefined")
		columns=0;
	if(typeof(unite) == "undefined")
		unite=0;
	if(typeof(obj.selected) != "undefined" && obj.selected =="1")
	{
		return;
	}
	obj.style.backgroundColor = "#F0F9BB";
	
	if(columns>0)
	{
		for(i=0;i<unite;i++)
		{
			if(obj.cells.length==columns-i)
			{
				for(j=0;j<unite-i;j++)
					obj.cells[j].bgColor=0xffffff;
			}	
		}
	}
}
function setTDColor(obj,columns,unite,Color)
{
	if(typeof(columns) == "undefined")
		columns=0;
	if(typeof(unite) == "undefined")
		unite=0;
	if(typeof(obj.selected) != "undefined" && obj.selected =="1")
	{
		return;
	}
	tableobj = obj.parentElement;
	for(var i=0; i<tableobj.rows.length; i++)
	{
		tableobj.rows[i].style.backgroundColor = 0xffffff;
		tableobj.rows[i].selected = "0";
	}
	
	
	obj.style.backgroundColor = Color;
	obj.selected = "1";
	
	if(columns>0)
	{
		for(i=0;i<unite;i++)
		{
			if(obj.cells.length==columns-i)
			{
				for(j=0;j<unite-i;j++)
					obj.cells[j].bgColor=0xffffff;
			}	
		}
	}
}
function outRow(obj)
{	
	if(typeof(obj) == "undefined")
		return;
	if(obj == null)
		return;
		
	if(typeof(obj.selected) != "undefined" && obj.selected =="1")
	{
		return;
	}
	
	obj.style.backgroundColor = 0xffffff;
}	
function clickRow(obj)
{
	if(typeof(obj) == "undefined")
		return;
	if(obj == null)
		return;
	tableobj = obj.parentElement;
	
	for(var i=0; i<tableobj.rows.length; i++)
	{
		if(tableobj.rows[i] == obj )
		{
			obj.style.backgroundColor="#DDDDDD";
			obj.selected = "1";
			
			subobjs = obj.getElementsByTagName("input");
			for(ii = 0;ii < subobjs.length; ii++)
			{
				if(subobjs[ii].type == "checkbox")
				{
					subobjs[ii].click();
					if(typeof(subobjs[ii].disabled) != "undefined" && subobjs[ii].disabled)	
					{
						obj.style.backgroundColor=0xffffff;
						pbjs = tableobj.getElementsByTagName("input");
						for(iii = 0;iii < pbjs.length; iii++)
						{
							if(pbjs[iii].type == "checkbox")
							{
								pbjs[iii].checked = false;
							}							
						}
					}
					break;		
				}
			}			
		}
		else
		{
			tableobj.rows[i].style.backgroundColor = 0xffffff;
			tableobj.rows[i].selected = "0";			
		}			
	}
}
