function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function trocaimgpagina() {
	pagina = document.getElementById("espacoesrh").value;
	document.getElementById("conteudo").innerHTML = "<img src='" + pagina + "' alt='opinião' title='opinião' />";

}

function endereco_filial()
{
	  filial = document.getElementById("idfilial").value;
      box_endereco = document.getElementById("lojasEndereco");

	  box_endereco.innerHTML = endereco_loja(filial);

}

setInterval("endereco_filial()",1000);

function endereco_loja(loja){
		
		switch(loja){
				case "loja1":
					retorno = "<center><b>Loja El Turco</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>EM REFORMA</b><br />";
					retorno = retorno + "&nbsp;&nbsp;End: Rua 7 de <br /> &nbsp;&nbsp;Setembro, 1067<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone: <br />&nbsp;&nbsp;(55) 3412-5575<br />";
					break;
 				case "loja2":
					retorno = "<center><b>Loja Cidade Nova</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br /> &nbsp;&nbsp;Rua Francisco &nbsp;&nbsp;Etchepare, 322<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3414-1513<br />";
					break;
				case "loja3":
					retorno = "<center><b>Baklizi Canabarro</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br /> &nbsp;&nbsp;Rua Gal. Canabarro, &nbsp;&nbsp;2903<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 2102-2200<br />";
 					break;
				case "loja4":
					retorno = "<center><b>Baklizi <br>Bento Martins I</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br /> &nbsp;&nbsp;Bento Martins, 3004<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3413-3557<br />";
 					break;
 				case "loja5":
					retorno = "<center><b>Baklizi Pinheiro I</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br /> &nbsp;&nbsp;Rua Pinheiro &nbsp;&nbsp;Machado, 1543<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3413-3116<br />";
 					break;
				case "loja6":
					retorno = "<center><b>Baklizi Setembrino</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br /> &nbsp;&nbsp;Rua Setembrino de &nbsp;&nbsp;Carvalho, 1699<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3411-4171<br />";
					break;
				case "loja7":
					retorno = "<center><b>Baklizi Pinheiro II</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br />&nbsp;&nbsp;Pinheiro Machado, &nbsp;&nbsp;901 &nbsp;&nbsp;<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3412-4994<br />";
					break;
				case "loja8":
					retorno = "<center><b>Baklizi Flores</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br />&nbsp;&nbsp;Flores da Cunha, &nbsp;&nbsp;1115 &nbsp;&nbsp;<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3411-7755<br />";
					break;
				case "loja9":
					retorno = "<center><b>Baklizi <br>Bento Martins II</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br />&nbsp;&nbsp;Rua Bento Martins, &nbsp;&nbsp;3137 &nbsp;&nbsp;<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3411-0874<br />";
					break;
				case "loja10":
					retorno = "<center><b>Baklizi Quarai</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br />&nbsp;&nbsp;Rua Gal. Canabarro, &nbsp;&nbsp;655 &nbsp;&nbsp;<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3423-2391<br />";
					break;
				case "loja11":
					retorno = "<center><b>Baklizi Itaqui</b></center><br />";
					retorno = retorno + "&nbsp;&nbsp;Endere&ccedil;o:<br />&nbsp;&nbsp;Rua Domingos &nbsp;&nbsp;Martins, 1144 &nbsp;&nbsp;<br />";
					retorno = retorno + "&nbsp;&nbsp;Telefone:<br /> &nbsp;&nbsp;(55) 3433-1755<br />";
					break;

}
			return retorno
		}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function valid_form() {
	if(document.getElementById("nome").value == "") {
		alert("Preencha o campo nome!");
		document.getElementById("nome").focus();
		return false;
		}
	if(document.getElementById("mail_sender").value =="") {
		alert("Preencha o campo email!");
		document.getElementById("mail_sender").focus();
		return false;
		}
	if(document.getElementById("loja").value =="1")	{
		alert("Preencha o campo loja!");
		document.getElementById("loja").focus();
		return false;
		}
	}
	
	
function verifica_trabalhe(){
if (document.formTrabalhe.nome.value=="") {
	alert("O campo nome e obrigatorio!")
	document.formTrabalhe.nome.focus()
	return false
	}

if (document.formTrabalhe.mail_sender.value=="") {
	alert("O campo email e obrigatorio!")
	document.formTrabalhe.mail_sender.focus()
	return false
	}
if (document.formTrabalhe.telefone.value=="") {
	alert("O campo telefone e obrigatorio!")
	document.formTrabalhe.telefone.focus()
	return false
	}
if (document.formTrabalhe.msg.value=="") {
	alert("O campo comentario e obrigatorio!")
	document.formTrabalhe.msg.focus()
	return false
	}
if (document.formTrabalhe.arquivo.value=="") {
	alert("O campo curriculo e obrigatorio!")
	document.formTrabalhe.arquivo.focus()
	return false
	}
}


function verifica_expansao(){
if (document.formExpansao.endereco.value=="") {
	alert("O campo endereco e obrigatorio!")
	document.formExpansao.endereco.focus()
	return false
	}

if (document.formExpansao.numero.value=="") {
	alert("O campo numero e obrigatorio!")
	document.formExpansao.numero.focus()
	return false
	}
if (document.formExpansao.complemento.value=="") {
	alert("O campo complemento e obrigatorio!")
	document.formExpansao.complemento.focus()
	return false
	}
if (document.formExpansao.bairro.value=="") {
	alert("O campo bairro e obrigatorio!")
	document.formExpansao.bairro.focus()
	return false
	}
if (document.formExpansao.cep.value=="") {
	alert("O campo cep e obrigatorio!")
	document.formExpansao.cep.focus()
	return false
	}
if (document.formExpansao.cidade.value=="") {
	alert("O campo cidade e obrigatorio!")
	document.formExpansao.cidade.focus()
	return false
	}
if (document.formExpansao.contato.value=="") {
	alert("O campo contato e obrigatorio!")
	document.formExpansao.contato.focus()
	return false
	}
if (document.formExpansao.tel_ddd.value=="") {
	alert("O campo DDD e obrigatorio!")
	document.formExpansao.tel_ddd.focus()
	return false
	}
if (document.formExpansao.tel.value=="") {
	alert("O campo telefone e obrigatorio!")
	document.formExpansao.tel.focus()
	return false
	}
if (document.formExpansao.fax_ddd.value=="") {
	alert("O campo DDD e obrigatorio!")
	document.formExpansao.fax_ddd.focus()
	return false
	}
if (document.formExpansao.fax.value=="") {
	alert("O campo fax e obrigatorio!")
	document.formExpansao.fax.focus()
	return false
	}
if (document.formExpansao.cel_ddd.value=="") {
	alert("O campo DDD e obrigatorio!")
	document.formExpansao.cel_ddd.focus()
	return false
	}
if (document.formExpansao.celular.value=="") {
	alert("O campo celular e obrigatorio!")
	document.formExpansao.celular.focus()
	return false
	}
if (document.formExpansao.email.value=="") {
	alert("O campo email e obrigatorio!")
	document.formExpansao.email.focus()
	return false
	}
}

function receitas() {
	var tmp = 1;
	document.getElementById("erro_nome").innerHTML = "";
	document.getElementById("erro_email").innerHTML = "";
	document.getElementById("erro_receita").innerHTML = "";
	if(document.formulario.nome.value==""){
		document.getElementById("erro_nome").innerHTML = "<font color='#FF0000'>Campo nome obrigat&oacute;rio!</font><br>";
		if(tmp == 1){
			document.formulario.nome.focus()
			tmp++;
			}
		return false
		}
	if(document.formulario.email.value==""){
		document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>Campo e-mail obrigat&oacute;rio!</font><br>";
		if(tmp == 1){
			document.formulario.email.focus()
			tmp++;
			}
		return false
		}
	var obj = eval("document.formulario.email");
	var txt = obj.value;
	if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7))) {
		document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>E-mail inv&aacute;lido!</font><br>";
		if(tmp == 1){
			document.formulario.email.focus()
			tmp++;
			}
		return false
	}
	if(document.formulario.receita.value==""){
		document.getElementById("erro_receita").innerHTML = "<font color='#FF0000'>Poxa, esqueceu da receita?</font><br>";
		if(tmp == 1){
			document.formulario.receita.focus()
			tmp++;
			}
		return false
		}
	document.formulario.submit();
}
function trabalheconosco() {
	var tmp = 1;
	document.getElementById("erro_nome").innerHTML = "";
	document.getElementById("erro_email").innerHTML = "";
	if(document.formulario.nome.value==""){
		document.getElementById("erro_nome").innerHTML = "<font color='#FF0000'>Campo nome obrigat&oacute;rio!</font><br>";
		if(tmp == 1){
			document.formulario.nome.focus()
			tmp++;
			}
		return false
		}
	if(document.formulario.email.value==""){
		document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>Campo e-mail obrigat&oacute;rio!</font><br>";
		if(tmp == 1){
			document.formulario.email.focus()
			tmp++;
			}
		return false
		}
	var obj = eval("document.formulario.email");
	var txt = obj.value;
	if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7))) {
		document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>E-mail inv&aacute;lido!</font><br>";
		if(tmp == 1){
			document.formulario.email.focus()
			tmp++;
		}
		return false
	}
}


function newsletter() {
	var tmp = 1;
	document.getElementById("erro_nome").innerHTML = "";
	document.getElementById("erro_email").innerHTML = "";
	document.getElementById("erro_endereco").innerHTML = "";
	document.getElementById("erro_bairro").innerHTML = "";
	document.getElementById("erro_cidade").innerHTML = "";
	document.getElementById("erro_cep").innerHTML = "";
	document.getElementById("erro_celular").innerHTML = "";

	if(document.formulario.autorizacao[0].checked){
		if(document.formulario.nome.value==""){
			document.getElementById("erro_nome").innerHTML = "<font color='#FF0000'>Campo nome obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.nome.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.endereco.value==""){
			document.getElementById("erro_endereco").innerHTML = "<font color='#FF0000'>Campo endere&ccedil;o obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.endereco.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.bairro.value==""){
			document.getElementById("erro_bairro").innerHTML = "<font color='#FF0000'>Campo bairro obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.bairro.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.cidade.value==""){
			document.getElementById("erro_cidade").innerHTML = "<font color='#FF0000'>Campo cidade obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.cidade.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.cep.value==""){
			document.getElementById("erro_cep").innerHTML = "<font color='#FF0000'>Campo CEP obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.cep.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.email.value==""){
			document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>Campo e-mail obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.email.focus()
				tmp++;
			}
			return false
		}
		var obj = eval("document.formulario.email");
		var txt = obj.value;
		if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7))) {
			document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>E-mail inv&aacute;lido!</font><br>";
			if(tmp == 1){
				document.formulario.email.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.ddd.value==""){
			document.getElementById("erro_celular").innerHTML = "<font color='#FF0000'>Campo ddd obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.ddd.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.celular.value==""){
			document.getElementById("erro_celular").innerHTML = "<font color='#FF0000'>Campo celular obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.celular.focus()
				tmp++;
			}
			return false
		}
	}
	if(document.formulario.autorizacao[1].checked){

		if(document.formulario.nome.value==""){
			document.getElementById("erro_nome").innerHTML = "<font color='#FF0000'>Campo nome obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.nome.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.endereco.value==""){
			document.getElementById("erro_endereco").innerHTML = "<font color='#FF0000'>Campo endere&ccedil;o obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.endereco.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.bairro.value==""){
			document.getElementById("erro_bairro").innerHTML = "<font color='#FF0000'>Campo bairro obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.bairro.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.cidade.value==""){
			document.getElementById("erro_cidade").innerHTML = "<font color='#FF0000'>Campo cidade obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.cidade.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.cep.value==""){
			document.getElementById("erro_cep").innerHTML = "<font color='#FF0000'>Campo CEP obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.cep.focus()
				tmp++;
			}
			return false
		}
	}
	
	if(document.formulario.autorizacao[2].checked){

		if(document.formulario.nome.value==""){
			document.getElementById("erro_nome").innerHTML = "<font color='#FF0000'>Campo nome obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.nome.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.email.value==""){
			document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>Campo e-mail obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.email.focus()
				tmp++;
			}
			return false
		}
		var obj = eval("document.formulario.email");
		var txt = obj.value;
		if ((txt.length != 0) && ((txt.indexOf("@") < 1) || (txt.indexOf('.') < 7))) {
			document.getElementById("erro_email").innerHTML = "<font color='#FF0000'>E-mail inv&aacute;lido!</font><br>";
			if(tmp == 1){
				document.formulario.email.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.ddd.value==""){
			document.getElementById("erro_celular").innerHTML = "<font color='#FF0000'>Campo ddd obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.ddd.focus()
				tmp++;
			}
			return false
		}
		if(document.formulario.celular.value==""){
			document.getElementById("erro_celular").innerHTML = "<font color='#FF0000'>Campo celular obrigat&oacute;rio!</font><br>";
			if(tmp == 1){
				document.formulario.celular.focus()
				tmp++;
			}
			return false
		}
	}
}




