// JavaScript Document

/*   
  
  Nome: Diego Araujo de oliveira
  Email: contato@diegao.com.br
  data: 15/04/2010

*/



$(document).ready(function(){

//alert($('.cont-conteudo-Dir').width());

aplicaAltura();

	var currheight;
window.onresize = function(){
	if(currheight != document.documentElement.clientHeight)
	{
		setTimeout("aplicaAltura()",0);
		
		$('#pane1').jScrollPaneRemove();
						return false;

		
	
	}
	currheight = document.documentElement.clientHeight;
}

						   });


function aplicaAltura(){
	
//alert("foi");	

var soma = 0;	
	
if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
 var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 if (ieversion>=8)
  //alert("You're using IE8 or above")
 soma = 37;
 else if (ieversion>=7)
  //alert("You're using IE7.x")
  soma = 37;
 else if (ieversion>=6)
  //alert("You're using IE6.x")
   soma = 37;
 
 else if (ieversion>=5)
  alert("You're using IE5.x")
}
else
//alert("n/a")
soma = 37;

var altura = 0;
var  alturaTotal = 0;  

//var altura =  window.innerHeight; 
altura =  $(window).height();
alturaTotal = altura - soma 	
	
	//alert(alturaTotal);
	

	$('.cont-conteudo-Dir').css('height',alturaTotal+"px" );
	
	
	
	//alert('chegoaki');
	
	$('#pane1').jScrollPane(
		{
		showArrows: true,
		topCapHeight:0
		}
		)
};

