function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
function ResizeIFrameToContent(iframe) {
	if (iframe.contentDocument && iframe.contentDocument.body.offsetHeight) //ns6 syntax
		iframe.height = iframe.contentDocument.body.offsetHeight+10; 
	else if (iframe.Document && iframe.Document.body.scrollHeight) //ie5+ syntax
		iframe.height = iframe.Document.body.scrollHeight+10;
		
}
