// very basic detection to find msie
var agt=navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

function fixPersonalBar()
{
	if (!is_ie) return;
	elm = document.getElementById('p-personal');
	if (elm)
	{
		elm.style.width = (document.body.clientWidth-14)+'px';
	}
}

function msie_fixpresize()
{
	preWidth = (document.body.clientWidth-203)+'px';
	elms = document.getElementsByTagName("pre");
	for (i = 0; i < elms.length; i++)
	{
		elms[i].style.width = preWidth;
	}
}

function fixlayout()
{
	if (is_ie)
	{
		fixPersonalBar();
		msie_fixpresize();
	}
}

window.onresize = fixlayout;
window.onload = fixlayout;
