
// Common javascript functions for ocp pages
//

document.domain="harvard.edu";

function badresizeIframe ( theframe ) {
   window.scrollTo(0,0);
   var visheight;
      visheight=theframe.contentWindow.document.body.scrollHeight;
      theframe.height=visheight+30;
      alert(visheight);
}
function resizeIframe ( theframe ) {
   window.scrollTo(0,0);
   var visheight;
   try { 
      visheight=theframe.contentWindow.document.body.scrollHeight;
      theframe.height=visheight+30;
   }  catch(e) {
      theframe.height=1750;
      theframe.scrolling='auto';
   }
}

// showResults is called by the onload event of an iframe which
// contains searchResults
//
function showResults() {
     document.getElementById("loading").className="nodisplay";
     document.getElementById("searchiframe").className="display";
}

// startSearch( ) is called upon search form submission to display
// a div which contains an animated gif and "Searching..."
//
function startSearch() {
     document.getElementById("searchiframe").className="nodisplay";
     document.getElementById("loading").className="display";
}


