function justify_height(){
 
    if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
    
  	}else{
	 
	 // IE6+ 	
    myHeight = document.documentElement.clientHeight;
    
  	}
  	
  	var content = $('contentBox');
  	contentHeight = content.getSize();
	var blocks = $$('.block');
	var blockheight = blocks.length*240;
  	
  	if(contentHeight.y <= myHeight && blockheight <= myHeight){
  	

     $('container').setStyles({
	  	height: myHeight});
	  	
	 $('navContainer').setStyles({
	  	height: myHeight});
	  	
	 $('contentBox').setStyles({
	  	height: myHeight});
	  	
	 $('spaceContainer').setStyles({
	  	height: myHeight});
	  	
  	}else if(contentHeight.y <= blockheight && myHeight <= blockheight){

		$('container').setStyles({
		  	height: blockheight});

		 $('navContainer').setStyles({
		  	height: blockheight});

		 $('contentBox').setStyles({
		  	height: blockheight});

		 $('spaceContainer').setStyles({
		  	height: blockheight});

	}else{
      	
     $('container').setStyles({
	  	height: contentHeight.y});
	 
	 $('navContainer').setStyles({
	  	height: contentHeight.y});
	  	
	 $('contentBox').setStyles({
	  	height: contentHeight.y});
      	
	 $('spaceContainer').setStyles({
	  	height: contentHeight.y});
  	}
  	
}



window.addEvent('load', function(){
     
    justify_height()
      
})


window.addEvent('domready', function(){  
    $('sendNewsletter').addEvent('submit', function(e) {
        //Prevents the default submit event from loading a new page.
        e.stop();
        
        //Set the options of the form's Request handler. 
        //("this" refers to the $('myForm') element).
        this.set('send', {onComplete: function(response) { 
        	$('message').set('text', '');
			$('message').set('text', response);
        }});
        //Send the form.
        this.send();
    });
})
