function resize() {
	// Detect OS (Ubuntu is funny)
	if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
	if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
	if (navigator.appVersion.indexOf("X11")!=-1) return;
	if (navigator.appVersion.indexOf("Linux")!=-1) return;

	var browser = navigator.appName;

	c_adj = 16;
	i_adj = 126;

	if (browser == "Microsoft Internet Explorer")  {
		height = document.body.clientHeight;
		iheight = height - i_adj - 14;
		cheight = height - c_adj - 14;
	} else {
		height = window.innerHeight;
		iheight = height - i_adj;
		cheight = height - c_adj;
	}

	if (document.getElementById("blog"))
		document.getElementById("blog").height = iheight;
	else
		document.getElementById("main").height = iheight;
	
	document.getElementById("container").style.height = cheight
}

