All pastes #631934 Raw Edit

Someone

public text v1 · immutable
#631934 ·published 2007-07-24 14:00 UTC
rendered paste body
  <script type="text/javascript">
  	function sizething()
  	{
  		// Get viewport height.
  		// Stolen from http://www.quirksmode.org/viewport/compatibility.html
  		
  		var x,y;
		var test1 = document.body.scrollHeight;
		var test2 = document.body.offsetHeight
		if (test1 > test2) // all but Explorer Mac
		{
			x = document.body.scrollWidth;
			y = document.body.scrollHeight;
		}
		else // Explorer Mac;
		     //would also work in Explorer 6 Strict, Mozilla and Safari
		{
			x = document.body.offsetWidth;
			y = document.body.offsetHeight;
		}
		
		var marginTop, marginBottom, h;
		
		// our margins in pixels
		marginTop = 15;
		marginBottom = 35;
		
		// The calculated height
		h = y - marginTop - marginBottom;

		// Resize the div.
		document.getElementById("content-container").style.height = h;
  	}	
  </script>

<body class="not-front not-logged-in sidebar-left" onresize="sizething();" onload="sizething();">