
function Resize() {
	var main = document.getElementById("MainIFrame");
	if (main.style.width != "1212px" && document.body.offsetWidth < 1212) {
		main.width = 1212;
		main.style.width = "1212px";
	} else if (main.style.width != "100%" && document.body.offsetWidth >= 1212) {
		main.style.width = "100%";
	}
}

function ReSized() {
	if (window.parent && window.parent.FrameLoaded && document.getElementById("Body-Wrap")) {
		window.parent.FrameLoaded(document.title,document.getElementById("Body-Wrap").offsetHeight); 
	}
}

function FrameLoaded(title,height) {
	var main = document.getElementById("MainIFrame");
	if (main) {
		document.body.height = height;
		main.height = height;
		main.style.height = height + "px";
		if (document.body.offsetWidth < 1212) {
			main.width = 1212;
			main.style.width = "1212px";
		}
	}
	document.title = title;
}


$(document).ready(function()
{
  if (top !== self && window.parent.FrameLoaded) {
	ReSized();
	setTimeout("ReSized()",1000);
  } 
});


