function stretch(id){
  sobj=document.getElementById(id);
  hoh=parseInt(document.getElementById('head').offsetHeight);
  foh=parseInt(document.getElementById('foot').offsetHeight);
  tmb=sobj.childNodes;
  max=0;
  for (var i=0; i<tmb.length; i++){
    oh=tmb[i].offsetHeight;
    if (oh>max) max=parseInt(oh);
  }
  sobj.style.height=hoh+foh+max+'px';
  document.getElementById('left').style.height=max+"px";
  document.getElementById('right').style.height=max+"px";
  document.getElementById('content').style.height=(max-80)+"px";
}

function abscenter(){
    var id='container';
    var kepszel = 0, kepmag = 0;
      if( typeof( window.innerWidth ) == 'number' ) {
        kepszel = window.innerWidth;
        kepmag = window.innerHeight;
      } 
      else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        kepszel = document.documentElement.clientWidth;
        kepmag = document.documentElement.clientHeight;
      } 
      else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        kepszel = document.body.clientWidth;
        kepmag = document.body.clientHeight;
      }
      
      maindiv=document.getElementById(id);
      divmag=maindiv.offsetHeight;
      divszel=maindiv.offsetWidth;
      
      document.body.style.height=maindiv.offsetHeight+"px";
      //document.getElementById('validate').style.top=maindiv.offsetHeight+"px";
      
      if (divmag<kepmag){
        maindiv.style.top=(parseInt((kepmag/2)-(divmag/2)))+"px";
      }
      else{
        maindiv.style.top="0px";
      }
      if (divszel<kepszel){
        maindiv.style.left=parseInt(((kepszel-Math.abs(kepszel-document.documentElement.scrollWidth))/2)-(divszel/2))+"px";
        maindiv.style.marginLeft="0px";
      }
      else{
        maindiv.style.left="0px";
        maindiv.style.marginLeft="0px";
      }
      var mdh=maindiv.offsetHeight+maindiv.scrollTop;
      var vdh=document.getElementById('validate').offsetHeight;
      document.body.style.height=mdh+vdh+"px";
      document.getElementById('validate').style.top=document.body.offsetHeight-vdh+"px";

}

window.onresize=abscenter;
