// JavaScript Document

	function validaBusca(categoria)
	{
		if(categoria!="")
		{
			ativa_div_carregando();
			document.formBusca.submit();
		}
	}
		
	function mudaFoto(id,endereco)
	{
		document.getElementById('FotoDetalheMoto').src = endereco + "/Admin/Imagens/ImagensMotos/" + id + ".jpg";
	}
	
	function preLoadImages()
	{
		var d=document;
		if(d.images)
		{
			if(!d.MM_p)
				d.MM_p=new Array();
			var i,j=d.MM_p.length,a=preLoadImages.arguments;
			for(i=0; i<a.length; i++)
				if (a[i].indexOf("#")!=0){
					d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
				}
		}
	}
	
	function div_carregando()
	{
		document.getElementById("div_carregando").style.display="none";
		document.getElementById("div_conteudo").style.display="";
	}
	
	function ativa_div_carregando()
	{
		document.getElementById("div_conteudo").style.display="none";
		document.getElementById("div_carregando").style.display="";
	}
