function Fundo1(id)
{
document.getElementById('c' + id).style.background = "url(Imagens/BotaoCen.gif)";
document.getElementById('i' + id).style.background = "url(Imagens/BotaoCen.gif)";
}

function Fundo2(id)
{
document.getElementById('c' + id).style.background = "";
document.getElementById('i' + id).style.background = "url(Imagens/BordaEsq.gif)";
}

function Fundo3(id)
{
document.getElementById(id).style.background = "url(Imagens/BotaoMenu.gif)";
}

function Fundo4(id)
{
document.getElementById(id).style.background = "";
}

function FundoTitulo()
{
  var w

  w = document.body.clientWidth;
  if(w > 800)
    { document.getElementById('FT').style.background = "url(Imagens/Audidata2.gif)"; }
  else
    { document.getElementById('FT').style.background = "url(Imagens/Audidata.gif)"; }
}


function backlink() {
	this.text = 'Go Back';
	this.type = 'link';
	this.write = backlink_write;
	this.form = true;
}


function backlink_write() {
	if (! window.history) return;
	if (window.history.length == 0)return;

	this.type = this.type.toLowerCase();
	if (this.type == 'button') {
		if (this.form)
			document.write('<FORM>');
		document.write('<INPUT TYPE=BUTTON onClick="history.back(-1)" VALUE="', this.text, '"');
		if (this.otheratts) document.write(' ', this.otheratts);
		document.write('>');
		if (this.form)document.write('<\/FORM>');
	} else {
		document.write('<A HREF="javascript:history.back(-1)"');
		if (this.otheratts)
			document.write(' ', this.otheratts);
		document.write('>');
		if (this.type == 'image' || this.type == 'img') {
			document.write('<IMG SRC="', this.src, '" ALT="', this.text, '"');
			if (this.width) document.write(' WIDTH=', this.width);
			if (this.height) document.write(' HEIGHT=', this.height);
			if (this.otherimgatts) document.write(' ', this.otherimgatts);
			document.write(' BORDER=0>');
		}
		else
			document.write(this.text);
		document.write('<\/A>');
	}
}

function CampoOK(campo, nome )
{
	if ( campo.value=="" )
	{
      alert("Por favor informe o campo [" + nome + "]");
      campo.focus();
      return(false);
	}
	else
       return(true);
}

function Form_Validator()
{
	with (document.forms[0])
   {
       if ( !CampoOK(email,"Seu E-Mail") ) return(false);
   }
}

function AbreAtendimento(S)
{
window.open(S, 'Atendimento', config='height=450, width=500, scrollbars=no, resizable=no');
}

