
function loadIframe(iframeName, url) {
    if ( window.frames[iframeName] ) {
        window.frames[iframeName].location = url;   
        return false;
    }
    return true;
}

function changeIframeSrc(id, url) {
    if (!document.getElementById) return;
    var el = document.getElementById(id);
    if (el && el.src) {
        el.src = url;
        return false;
    }
    return true;
}

function calcHeight()
{
  //find the height of the internal page
  var the_height=
    document.getElementById('cwindow').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('cwindow').height=
      the_height;
}
