window.status="H I - T E C"

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function index(titulo_)
{	
	window.location.href="../index1.htm?sItem="+titulo_
}

function carregaVar()
{
	var filme = document.filme
	var variavel = document.location.href

	s = unescape (variavel);
	sVariavel = s.substr(s.indexOf ("=")+1,s.length);

 	filme.SetVariable("sItem", sVariavel); 
}


function links(item_,subitem_)
{
	window.location.href = item_+"/"+subitem_+".htm"
}

function tecnologia(tipo_,titulo_)
{
	if(titulo_ =="index")	{	window.location.href = "tecnologias/tecnologias.htm#"+tipo_ }
	if(titulo_ == "interno")	{	window.location.href = "tecnologias.htm#"+tipo_ }
}

function produtos(titulo_, tipo_)
{
	
	if( tipo_ == '')					window.location.href="produtos_"+titulo_+"/produtos_"+titulo_+".htm"
	if( tipo_ == 'cabecalho')	window.location.href="../produtos_"+titulo_+"/produtos_"+titulo_+".htm"
	if( tipo_ == 'index')			window.location.href="produtos_"+titulo_+".htm"

}

function onde(titulo_,tipo_)
{
	if(tipo_ == 'index')		window.location.href="onde_"+titulo_+"/"+"onde_"+titulo_+".htm"
	if(tipo_ == 'interno')	window.location.href = "onde_"+titulo_+".htm"
}


function subOnde(estado_,cidade_)
{
	window.location.href=estado_+".htm#"+cidade_
}

function subProdutosOutdoor(categoria_,produto_)
{

	if(categoria_ == 'sierra') 		window.location.href="outdoor_sierra.htm"
	if(categoria_ == 'octane') 	window.location.href="outdoor_octane.htm"
	if(categoria_ == 'ars') 			window.location.href="outdoor_ars.htm"
	if(categoria_ == 'vlite')			window.location.href="outdoor_vlite.htm"	
		
}

function subProdutosIndoor(produto_)
{
	if(produto_ =='adrenalina')	window.location.href ="indoor_produtos.htm"

}

function subProdutosMagnum(tipo_)
{
	if(tipo_ =='high')	window.location.href ="magnum_produtos.htm"
	if (tipo_ == 'midnight') window.location.href="magnum_produtos.htm" 
}

function bValidacao()
{
	nome 		= 	document.form.txtNome.value
	cpf 			=	document.form.txtCpf.value
	email 		=  document.form.txtEmail.value
	ddd 			= 	document.form.txtDdd.value
	telefone 	=  document.form.txtTelefone.value 
	cidade 		=  document.form.txtCidade.value
	estado 		=  document.form.txtEstado.value
	mensagem	=  document.form.txtMensagem.value
	
	if(nome==""|| cpf==""|| email==""|| ddd=="" || telefone=="" || cidade=="" ||estado=="" ||mensagem =="")
	{
		alert("Existem campos em branco. Por favor, preencha-os.");
		return false;
	}
	
	if(cpf.length < 12)
	{
		alert("Formato de CPF inválido.")
		return false;
	}

	if(telefone.length < 8)
	{
		alert("Formato de telefone inválido.")
		return false;
	}

	if(cidade.length < 2)
	{
		alert("Cidade inválida.")
		return false;
	}


	if(estado.length < 2)
	{
		alert("Estado inválido.")
		return false;
	}

	
return true
}

function tipo_campo(campo_)
{
	if(isNaN(campo_) == true)
	{
		if(campo_ == document.form.txtCep.value ) 			document.form.txtCep.value = campo_.substring(0,campo_.length - campo_.length)
		if(campo_ == document.form.txtDdd.value ) 			document.form.txtDdd.value = campo_.substring(0,campo_.length - campo_.length)
		if(campo_ == document.form.txtTelefone.value ) 	document.form.txtTelefone.value = campo_.substring(0,campo_.length - campo_.length)

	}
}
function tipo_campo_lojista(campo_)
{
	if(isNaN(campo_) == true)
	{
		if(campo_ == document.form.txtCgc.value ) 			document.form.txtCgc.value = campo_.substring(0,campo_.length - campo_.length)
		if(campo_ == document.form.txtDdd.value ) 			document.form.txtDdd.value = campo_.substring(0,campo_.length - campo_.length)
		if(campo_ == document.form.txtTelefone.value ) 	document.form.txtTelefone.value = campo_.substring(0,campo_.length - campo_.length)

	}
}

function layer(nome_,acao_)
{
	x = document.getElementById(nome_)
	if(acao_ == 'fechar')
	{
		x.style.visibility='hidden';
	}
}

