var URL_SITE = "http://www.ctmarciovieira.com.br/";

//método que pega a altura ou largura INTERNA da janela do usuário.
function returnSize (type){
		var type = (type)? type : "";
		if (document.all)
		{
				//pegando o Altura tela no IE.
				if (!document.documentElement.clientHeight)
						var height = document.body.clientHeight;                                                
				else
						var height = document.documentElement.clientHeight;             
						
				//pegando a Largura tela no IE.                         
				if (!document.documentElement.clientWidth)
						var width = document.body.clientWidth;                                          
				else
						var width = document.documentElement.clientWidth;                                               
		}
		else
		{
				//pegando a Altura tela no FF.                  
						var height = window.innerHeight;
				//pegando a Largura tela no FF.                 
						var width  = window.innerWidth;                         
		}       

		if (type.toLowerCase()=="w")
		{
				return width;
		}
		else if (type.toLowerCase()=="h")
		{
				return height;
		}
		else
		{
				var arr = new Array(2);
				arr[0] = width;
				arr[1] = height;                        
				return arr;
		}       
}

jQuery(document).ready(function() {	
	var marginTop = (returnSize("h")-590)/2;	
	if(marginTop > 0)
		jQuery("#geral").css('margin-top', marginTop);

	
			

	
});
function limpaImagem(id, img, largura, altura, local){
	jQuery(id).attr('src', URL_SITE+'thumb.php?img='+img+'&w='+largura+'&h='+altura+'&local='+local);
}
function voltaImagem(id, img, largura, altura, local){
	jQuery(id).attr('src', URL_SITE+'thumb.php?img='+img+'&w='+largura+'&h='+altura+'&local='+local+'&cor=true');
}

