window.addEvent('domready', function(){	
	
	//alert('opa')
	
	
	//alert($(document.body).getWidth())

	/*$$('.conteudoNew').each(function(item,index){
		
		console.log(item)
		
		
	});*/

	/*contHeight = $$('.InternoNew').getHeight();
	console.log(contHeight);*/
	
	
	
	resizeBase();
	
	window.addEvent('resize', resizeBase);
	
	//alert(Browser.Engine.version)
	
	/*if(Browser.Engine.trident){
		if(Browser.Engine.trident && (Browser.Engine.version <= 5)){	*/
			
			
			TopIE7();
			window.addEvent('resize', TopIE7);
	/*	}
		
	}*/
	
});


function resizeBase(){
	
	bdHeight = $(document.body).getHeight();
	var CNewHeight = bdHeight - 50;
	//console.log('Height body = '+bdHeight+'\n New Height = '+ CNewHeight)
	if(CNewHeight >=550){
		//console.log(bdHeight+'\n'+CNewHeight)
		$$('.conteudoNew').setStyle('height',CNewHeight+'px');	
		$$('.InternoNew').setStyle('height',CNewHeight+'px');
		
	}else{
		
		$$('.conteudoNew').setStyle('height','550px');
		$(document.body).setStyle('overflow-y','auto');
		$$('.InternoNew').setStyle('height','550px');
	}
		
}


function TopIE7(){
	
	
		
		contHeight = ($$('.InternoNew').getHeight() - $$('#IntHome').getHeight())/2;
		
		if(contHeight<0)
			contHeight=0;	
		
		$$('#IntHome').setStyle('top',contHeight+'px');		
		
		
		FXHeight = ($$('.InternoNew').getHeight() - $$('#IntFX').getHeight())/2;
		//console.log(FXHeight)
		if(FXHeight<68)
			FXHeight=68;
	
		//alert('Height do Interno New = '+$$('.InternoNew').getHeight()+'\n Height do IntFX = '+$$('#IntFX').getHeight()+'\n FXHeight = '+FXHeight);

		$$('#IntFX').setStyle('top',FXHeight-12+'px');
		
		FXHeight2 = ($$('.InternoNew').getHeight() - $$('#LookFX').getHeight())/2;
		if(FXHeight2<38)
			FXHeight2=38;
		$$('#LookFX').setStyle('top',FXHeight2+20+'px');
	
}

