function aumenta(elemento, grande, alinhar){
		
	for(i=1;i<17;i++)
	{
		if(alinhar == "esq")
			document.getElementById("e" + i).style.cssFloat = "right";
		if(alinhar == "dir")
			document.getElementById("e" + i).style.cssFloat = "left";		
			
		document.getElementById("e" + i).style.display = "block";
		document.getElementById("e" + i).style.width = "218px";
 		document.getElementById("e" + i).style.height = "183px";
		document.getElementById("g" + i).style.display = "none";
	}
	
	if(alinhar == "esq")
		document.getElementById(grande).style.marginLeft = "3px";
		
	if(alinhar == "dir")
		document.getElementById(grande).style.marginRight = "13px";
	
	elemento.style.display = "none";
	document.getElementById(grande).style.display = "block";
	
	//document.getElementById("e9").style.marginTop = "";
	$('html,body').animate({scrollTop: $('#g'+grande.substr(1)).offset().top}, 700);
}
function fechar(numero)
{
	document.getElementById("g" + numero).style.display = "none";
	document.getElementById("e" + numero).style.display = "block";
	for(i=1;i<17;i++)
	{
		document.getElementById("e" + i).style.cssFloat = "left";		
	}
}
function fechar1(elemento)
{
	elemento.style.background = "url(images/fechar2.png) no-repeat";
}
function fechar2(elemento)
{
	elemento.style.background = "url(images/fechar.png) no-repeat";
}
function bg(elemento)
{
	elemento.style.background = "url(images/cinza.png) no-repeat";
}
function bg2(elemento)
{
	elemento.style.background = "url(images/branco.png) no-repeat";
}

function orcamentoOver(elemento)
{
	elemento.style.background = "url(images/orcamento.jpg) no-repeat";
}
function orcamentoOut(elemento)
{
	elemento.style.background = "url(images/orcamento2.jpg) no-repeat";
}

function valida(){

	d = document.orcamento;
	if (d.nome.value == "")
	{
		alert("Me diga seu Nome!");
		d.nome.focus();
		return false;	
	}

		var str = d.email.value;
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		
		if (str.indexOf(at)==-1){
		   alert("Email Incorreto!")
       	   d.email.focus();
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Email Incorreto!")
       	   d.email.focus();
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		   alert("Email Incorreto!")
       	   d.email.focus();
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		   alert("Email Incorreto!")
       	   d.email.focus();
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		   alert("Email Incorreto!")
       	   d.email.focus();
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		   alert("Email Incorreto!")
       	   d.email.focus();
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		   alert("Email Incorreto!")
       	   d.email.focus();
		    return false
		 }
 
   	if (d.mensagem.value == "")
	{
		alert("Me informe o que você precisa!");
		d.mensagem.focus();
		return false;	
	}

	else
		return true;
	
}
