tainer_height = 512;
	var p8_layout_frames = 0;

	function p8_update_layout()
	{
		var canvas = document.getElementById("canvas");
		var p8_playarea = document.getElementById("p8_playarea");
		var p8_container = document.getElementById("p8_container");
		var p8_frame = document.getElementById("p8_frame");
		var csize = 512;
		var margin_top = 0;
		var margin_left = 0;

		// page didn't load yet? first call should be after p8_frame is created so that layout doesn't jump around.
		if (!canvas || !p8_playarea 