function getClientRect(obj)
{
	if (obj.getBoundingClientRect)
		return obj.getBoundingClientRect();
	var rect = new Object();
	rect.right  = obj.offsetWidth;
	rect.bottom = obj.offsetHeight;
	rect.left   = obj.offsetLeft;
	rect.top    = obj.offsetTop;
	while((obj = obj.parentNode).nodeName.toLowerCase() != 'body')
	{
		if (obj.tagName.toLowerCase() != 'tr' && obj.tagName.toLowerCase() != 'tbody')
		{
			rect.left += obj.offsetLeft;
			rect.top  += obj.offsetTop;
		}
	}
	rect.right  += rect.left;
	rect.bottom += rect.top;
	return rect;
}

function br_url(url, verb, id)
{
	if (url.indexOf('?') != -1)
		return url + '&' + verb + '=' + id;
	else
		return url + '?' + verb + '=' + id;
}

function display(id, show)
{
	var obj = document.getElementById(id);
	if (obj)
		obj.style.display = (show) ? '' : 'none';
}
function display_invert(id)
{
	var obj = document.getElementById(id);
	if (obj)
		obj.style.display = (obj.style.display) ? '' : 'none';
}

