// JavaScript Document

    function getDocHeight(doc) {
      var docHt = 0, sh, oh;
      if (doc.height) docHt = doc.height;
      else if (doc.body) {
        if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
        if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
        if (sh && oh) docHt = Math.max(sh, oh);
      }
      return docHt;
    }
    
//    function insertIt() 
//    { 
//        var _y = document.getElementById('content'); 
//        var _x = window.frames[0].document.body.innerHTML; 
//        _y.innerHTML = _x 
//    } 

    
//    taken out for firefox MGH
//    function getDocWidth(doc) {
//      var docWt = 0, sh, oh;
//      if (doc.width) docWt = doc.width;
//      else if (doc.body) {
//        if (doc.body.scrollWidth) docWt = sh = doc.body.scrollWidth;
//        if (doc.body.offsetWidth) docWt = oh = doc.body.offsetWidth;
//        if (sh && oh) docWt = Math.max(sh, oh);
//      }
//      return docWt;
//    }
        

    function setIframeHeight(iframeName) {
      var iframeWin = window.frames[iframeName];
      var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
     
      if ( iframeEl && iframeWin ) 
      {
        iframeEl.style.height = "auto"; 
//    taken out for firefox MGH
//        iframeEl.style.width = "auto"; 
                
        var docHt = getDocHeight(iframeWin.document);
        
        if (docHt) iframeEl.style.height = docHt + 0 + 0 + "px";
        
      }
    }
	
	function loadIframe(iframeName, url) {
  if ( window.frames[iframeName] ) {
    window.frames[iframeName].location = url;   
    return false;
  }
  else return true;
}
