function getInitialViewportHeight() {
  var x,y;
  if (self.innerHeight) // all except Explorer
  {
    x = self.innerWidth;
    y = self.innerHeight;
    //alert('1');
  }
  else if (document.documentElement && document.documentElement.clientHeight)
  // Explorer 6 Strict Mode
  { 
    x = document.documentElement.clientWidth;
    y = document.documentElement.clientHeight;
    //alert('2');
  }
  else if (document.body) // other Explorers
  {
    x = document.body.clientWidth;
    y = document.body.clientHeight;
//    alert('3');
  } 
  //alert(navigator.userAgent);
  if(navigator.userAgent.indexOf("MSIE 7") != -1) {
    //alert('MS7');
    return (y+1.0);
  } else if(navigator.userAgent.indexOf("MSIE 8") != -1) {
    //alert('MS8');
    return (y+2.0-1.0);
  } else {
    //alert('NS');
    return (y+2.0-1.0);
  }
}	
function resizeViewportToMax() {
  var x,y;
  if (self.innerHeight) // all except Explorer
  {
    x = self.innerWidth;
    y = self.innerHeight;
    //alert('1');
  }
  else if (document.documentElement && document.documentElement.clientHeight)
  // Explorer 6 Strict Mode
  { 
    x = document.documentElement.clientWidth;
    y = document.documentElement.clientHeight;
    //alert('2');
  }
  else if (document.body) // other Explorers
  {
    x = document.body.clientWidth;
    y = document.body.clientHeight;
//    alert('3');
  } 
  //alert(navigator.userAgent);
  if(navigator.userAgent.indexOf("MSIE 7") != -1) {
    //alert('MS7');
    document.getElementById('rootdiv').style.minHeight=y+1.0+'px';
  } else if(navigator.userAgent.indexOf("MSIE 8") != -1) {
    //alert('MS8');
    document.getElementById('rootdiv').style.minHeight=y+2.0-1.0+'px';
  } else {
    //alert('NS');
    document.getElementById('rootdiv').style.height=y+2.0-1.0+'px';
  }

}

//window.onload=resizeViewportToMax;

