//////////////////////////////////////////////////////////////////
///////////////////////////////// SERVICOS ///////////////////////
function apareceSubservicos(el){
	var elemento = document.getElementById(el);
	if(elemento.className == 'submenu_servicos'){
		elemento.className = 'submenu_servicosdisplay';
	}else{
		elemento.className = 'submenu_servicos';
	}
}
///////////////////////////// FIM  SERVICOS //////////////////////
//////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////
////////////////////////////// APARECE E SOME UL //////////////////////
function apareceSome(el){
	var tag =  document.getElementById(el);
	
	/*var aux = tag.style.display;
	alert(el);
	*/if(tag.style.display == 'none' || tag.style.display == ''){
		tag.style.display = 'block';
	}else{
		tag.style.display = 'none';
	}
}
////////////////////////// FIM APARECE E SOME UL //////////////////////
///////////////////////////////////////////////////////////////////////



/////////////////////////////////////////////////////////////////
///////////////////////////// CONTATO ///////////////////////////
function vazioContato(campo1, campo2, campo3, campo4){
	var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
	var erro ='';

	if(document.getElementById(campo1).value == ''){
		document.getElementById(campo1).style.border = '1px solid #F18B8B';
		erro += 'Campo Nome está vazio\r\n';
	}
	
	if(document.getElementById(campo2).value == ''){
		document.getElementById(campo2).style.border = '1px solid #F18B8B';
		erro += 'Campo Email está vazio\r\n';
		
	}else if(!er.test(document.getElementById(campo2).value)){
		document.getElementById(campo2).value = '';
		document.getElementById(campo2).style.border = '1px solid #F18B8B';
		erro += 'O campo Email está incorreto\r\n';

	}
	
	if(document.getElementById(campo3).value == ''){
		document.getElementById(campo3).style.border = '1px solid #F18B8B';
		erro += 'Campo Assunto está vazio\r\n';
	}
	
	if(document.getElementById(campo4).value == ''){
		document.getElementById(campo4).style.border = '1px solid #F18B8B';
		erro += 'Campo Menssagem está vazio\r\n';
	}
	
	if(erro != ''){
		alert(erro);
		return false;
	}else{
		return true;
	}

}
///////////////////////////// FIM  CONTATO //////////////////////
/////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////
///////////////////////////// CADASTRO ///////////////////////////
function validaCadastro(campo1, campo2, campo3, campo4, campo5, campo6){
	var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
	var erro ='';

	if(document.getElementById(campo1).value == ''){
		document.getElementById(campo1).style.border = '1px solid #F18B8B';
		erro += 'Campo Nome está vazio\r\n';
	}
	
	if(document.getElementById(campo2).value == ''){
		document.getElementById(campo2).style.border = '1px solid #F18B8B';
		erro += 'Campo Email está vazio\r\n';
		
	}else if(!er.test(document.getElementById(campo2).value)){
		document.getElementById(campo2).value = '';
		document.getElementById(campo2).style.border = '1px solid #F18B8B';
		erro += 'O campo Email está incorreto\r\n';

	}
	
	if(document.getElementById(campo3).value == ''){
		document.getElementById(campo3).style.border = '1px solid #F18B8B';
		erro += 'Informe pelo menos um telefone\r\n';
	}
	
	if(document.getElementById(campo4).value == ''){
		document.getElementById(campo4).style.border = '1px solid #F18B8B';
		erro += 'Selecione um tipo de negócio!\r\n';
	}
	
	if(document.getElementById(campo5).value == ''){
		document.getElementById(campo5).style.border = '1px solid #F18B8B';
		erro += 'Selecione um serviço!\r\n';
	}
	
	if(document.getElementById(campo6).value == ''){
		document.getElementById(campo6).style.border = '1px solid #F18B8B';
		erro += 'Selecione uma situação!\r\n';
	}
	
	if(erro != ''){
		alert(erro);
		return false;
	}else{
		return true;
	}

}
///////////////////////////// FIM  CADASTRO //////////////////////
//////////////////////////////////////////////////////////////////