function setFooter() {
  if (document.getElementById) {
   /* var windowHeight=getWindowHeight();
    if (windowHeight>0) {*/
      var contentHeight = document.getElementById('content').offsetHeight;
      var container     = document.getElementById('container');
      var casestudy     = document.getElementById('Cbg');
        if (contentHeight>=400) {

          container.style.height=(contentHeight+38)+'px';
          casestudy.style.height=(contentHeight-120)+'px';
           /* alert(contentHeight); */
               }
        else {
          container.style.height=420+'px';
          casestudy.style.height=263+'px';

          /* alert("Height: " + contentHeight);*/
             }
           /*}*/
         }
       }

function getWindowHeight() {
  var windowHeight = 0;
  if (typeof(window.innerHeight)=='number') {
    windowHeight=window.innerHeight;
           }
  else {
    if (document.documentElement && document.documentElement.clientHeight) {
      windowHeight = document.documentElement.clientHeight;
     }
    else {
    if (document.body && document.body.clientHeight) {
      windowHeight=document.body.clientHeight;
     }
   }
  }
return windowHeight;
}

window.onload = function() {
   setFooter();
  }
window.onresize = function() {
   setFooter();
  }