function contentSize(){
  var contentHeight, divHeight = 0, myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  divHeight = document.getElementById('SMcontent').clientHeight
  contentHeight = myHeight-50
  if (divHeight < contentHeight){
  footerHeight = myHeight-13
  document.getElementById('SMcontent').style.height=contentHeight+'px';
  document.getElementById('SMfooter').style.top=footerHeight+'px';
  //window.alert( 'Height = ' +  divHeight);
  }else{
  footerHeight = divHeight+7
  containerHeight = divHeight+20
  document.getElementById('container').style.height=containerHeight+'px';
  document.getElementById('SMfooter').style.top=footerHeight+'px';
  }
  document.getElementById('SMfooter').style.visibility='visible';
}