// Определение браузера
IE = (document.all); // Internet Explorer?
NC = (document.layers); // Netscape?
Opera = (document.getElementById); // Opera?

function getHeight() {
if (IE || Opera) send = document.body.clientHeight;
if (NC) send = window.innerHeight;
return send;
}

function getWidth() {
if (IE || Opera) send = document.body.clientWidth;
if (NC) send = window.innerWidth;
return send;
}

function widthtable(width,table_id) {
browser_width = getWidth();

if(browser_width >= width) 
{
	document.getElementById(table_id).style.width = width;
} 
else 
{
	document.getElementById(table_id).style.width = "100%";
};

setTimeout('widthtable('+width+',\''+table_id+'\')', 30); // *
}
