// JavaScript Document

/*
 * Function to resize the content frame so the page takes up the entire space of the page
 */
function resize_content_frame() {
	min_size = 265; // min size for the content frame and layer
	
	new_height = document.documentElement.clientHeight - 100 - 15 - 1 - 15 - 2; // get the new height

	if (new_height < min_size)
		new_height = min_size;

	document.getElementById("content_frame").style.height = new_height+"px"; // adjust the parent frame
	document.getElementById("content_height").value = new_height; // set hidden field's value
	window.frames["content_frame"].document.getElementById("content_layer").style.height = new_height+"px"; // set child page's layer
}

/*
 * Function for the pages in the iframe, to resize the layer according to parent window's framesize
 */
function check_parent_frame_size() {
	new_height = window.parent.document.getElementById("content_height").value; // get the new height from hidden field
	if (new_height != "")
		document.getElementById("content_layer").style.height = new_height+"px"; // resize the layer
}
