//Da um display no campo de pesquisa, fazendo a caixa aparecer e sumir.
function Pesquisa()
		{
			var p = document.getElementById("Pesquisa").style.display;
			if (p == "none")
			{
				document.getElementById("Pesquisa").style.display = "block";
				document.getElementById("Pesquisar").className = "PesquisaSelecionado";
		
			}
			else
			{
				document.getElementById("Pesquisa").style.display = "none";
				document.getElementById("Pesquisar").className = "Pesquisar";
			}
		}
		
		
//Faz onload das imagens de botoes ao carregar a página.
        
function CarregaImagens() // Esta é a função chamada no onLoad. Ela chama a função Imagens Passando como argumentos as imagens que precisam ser carregadas.
{
	Imagens('SaibaMaisServicosSelecionado.gif',
			'SaibaMaisServicos.gif',
			'Contatenos.gif',
			'ContatenosSelecionado.gif',
			'SaibaMaisDestaque.gif',
			'SaibaMaisDestaqueSelecionado.gif',
			'Pesquisar.gif',
			'PesquisarSelecionado.gif'
			);
}
//Função que é chamada pela CarregaImagens e que Monta um array com as imagens.
function Imagens() 
{
	var arrayImg=new Array();     
	var caminho="../../_images/"; // Variavel com o caminho de onde estao as imagens.
	
	i=0;
	while(i < arguments.length) // arguments.length - conta quantos argumentos(nomes de imagens) foram passados pela função CarregaImagens. os argumentos sao separados por virgula.
	{
		arrayImg[i] = new Image();
		arrayImg[i].src = caminho+arguments[i];
		i++;
	}
}
/////////////////////////////////////////////////////////////// Exibicao de itens por idioma
/*Vou verificar qual o Caminho após o HOST(http://www.it.com.br) 
 *Se é PT-BR OU EN-US que sao meus sub-sites. Caso um ou outro eu exibo ou nao Pesquisa|Search e o Idioma.
 
**/
function VerificaIdioma(){
	//Pego o path
	var path = window.location.pathname;
	//Pego qual o site, se PT-BR ou EN-US
	path = path.substring(1, 6);
	
	//Defino o que aparece ou nao.
	if(path == "en-us"){
		document.getElementById("PT").style.display = "block"; // link para mudar de site(idioma)
		document.getElementById("TextoSearch").style.display = "block"; // Busca
	}
	else{
		document.getElementById("EN").style.display = "block"; // link para mudar de site(idioma)
		document.getElementById("TextoPesquisar").style.display = "block"; // Busca
	}
	
}

























/////////////////////////////////////////////////////////////// MOVE OBJETOS
/*
//clique sobre o 

// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

 //Temporary variables to hold mouse x-y pos.s
var tempX  = 0;
var tempY  = 0;
var caixaX = 0;

function moveCaixa(click){
	
	if(click)
		document.onmousemove = PegaCaixa;
	else
		document.onmousemove = SoltaCaixa;
}
function PegaCaixa(e) {
//alert("aaa");
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY
  
  caixaX = document.getElementById("pegador").offsetWidth;
  caixaY = document.getElementById("pegador").offsetWidth;
  
  document.getElementById("EditorWebPart").style.left = tempX - caixaX ;
  document.getElementById("EditorWebPart").style.top  = tempY - 20;
  
  return true
}
function SoltaCaixa(e){
	caixaX = document.getElementById("pegador").offsetWidth;

	document.getElementById("EditorWebPart").style.left = tempX - caixaX ;
  	document.getElementById("EditorWebPart").style.top  = tempY - 20;

}
*/