	function changeTableClass(tableId, newTableClass) 
	{
		//dobj=document.getElementById(id);
		if (document.getElementById(tableId))
			document.getElementById(tableId).className=newTableClass;
		//document.getElementById(tableId).className=newTableClass;

		//document.getElementById(tableId).className=document.getElementById(tableId).replace(from, to);
		// document.body.className = document.body.className.replace(from, to);
        return false;
	}
	
	function displayNone(id) 
	{
		obj=document.getElementById(id);
		if (obj)
			obj.style.display="none";
			//document.getElementById(id).style.display="none";
	}
	
	function displayShow(id) 
	{
		//alert(id);
		obj=document.getElementById(id);
		if (obj)
			obj.style.display="";
		//document.getElementById(id).style.display="inherit";
	}

	function tableShow(tableId, nRows)
	{
		var obj=document.getElementById(tableId)
		if (obj)
		{
			var rows=obj.rows;
			var len=rows.length;
			for (var count=0; count<len; count++)
			{
				if (count>=nRows)
					rows[count].style.display='none'
				else
					rows[count].style.display='';
			}
		}
	}
	
	function init()
	{
		tableShow('table1', 5);
		displayNone('table1_hide');
		
		tableShow('table2', 5);
		displayNone('table2_hide');
		
		tableShow('table3', 5);
		displayNone('table3_show');
		
		obj=document.getElementById('table1_hide'); 
		if (obj)
			obj.onclick = function() { 
			//changeTableClass('table1', 'table_list_short'); 
			tableShow('table1', 5);
			displayNone('table1_hide');
			displayShow('table1_show');
		};
		
		obj=document.getElementById('table1_show'); 
		if (obj)
			obj.onclick = function() { 
				//changeTableClass('table1', 'table_list_all'); 
				tableShow('table1', 10);
				displayShow('table1_hide');
				displayNone('table1_show');
		};
		
		obj=document.getElementById('table2_hide'); 
		if (obj)
			obj.onclick = function() { 
				//changeTableClass('table2', 'table_list_short'); 
				tableShow('table2', 5);
				displayNone('table2_hide');
				displayShow('table2_show');
		};
		
		obj=document.getElementById('table2_show');
		if (obj)
			obj.onclick = function() { 
				//changeTableClass('table2', 'table_list_all'); 
				tableShow('table2', 10);
				displayShow('table2_hide');
				displayNone('table2_show');
			};
		
		obj=document.getElementById('table3_hide');
		if (obj)
			obj.onclick = function() { 
				//changeTableClass('table3', 'table_list_short'); 
				tableShow('table3', 5);
				displayNone('table3_hide');
				displayShow('table3_show');
			};
			
		obj=document.getElementById('table3_show');
		if (obj)
			obj.onclick = function() { 
				//changeTableClass('table3', 'table_list_all'); 
				tableShow('table3', 10);				
				displayShow('table3_hide');
				displayNone('table3_show');
			};
	}
	




