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;
//alert(windowHeight)
var c = $('container');
var alturacontainer = xHeight(c);
//alert(c.className)
if (alturacontainer < windowHeight ){c.className = "containeralinhado";}
if (alturacontainer > windowHeight ){c.className = "containeralinhado";}



//    if (windowHeight < alturacontainer) {
//    document.getElementById('container').style.position = "absolute";
//    document.getElementById('container').style.marginTop = "-241px";
//    document.getElementById('container').style.top = "50%";
//    }

}

function teste(){
    var side2 = $('side2');
    var container = $('container');
    var alturacontainer = xHeight(container);
    var alturaside2 = xHeight(side2);
    alert (alturacontainer+" - "+alturaside2)
}

function adjustLayout()
{
  // Get natural heights
  var cHeight = xHeight("container");
  var lHeight = xHeight("side2");
 

  // Find the maximum height
  var maxHeight =
    Math.max(cHeight,lHeight);


  // Assign maximum height to all columns
  xHeight("container", maxHeight);
  xHeight("side2", maxHeight);

  
  //alert(xHeight("conteudo"))
}


window.onload = function() 
{
 adjustLayout();
}
