﻿var viewport = {
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 18;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  }
}

function setIframe() {
  var theIframe = document.getElementById? document.getElementById('theIframe'): document.all? document.all['theIframe']: null;
  if (theIframe) {
    viewport.getWinHeight();
    if(document.all) {
      theIframe.style.height = viewport.height-170 + "px";
    }
    else {
      theIframe.style.height = viewport.height-140 + "px";

    }
  }
}


setIframe();
window.onresize = function() { setIframe() }

