<!-- PUBLICIDADE BANNERS -->
document.write("<script src='http://www.catho.com.br/wbp/js/ajaxFunctions.js'></script>");
document.write("<script src='http://www.catho.com.br/wbp/js/prototype.js'></script>");

//configuration
OAS_url ='http://banner.catho.com.br/RealMedia/ads/';
 OAS_listpos = 'Top,Top3,Frame1,Frame2,TopLeft';
OAS_query = '';
OAS_sitepage = 'www3.catho.com.br/wbp/';
//end of configuration
OAS_version = 10;
OAS_rn = '001234567890'; OAS_rns = '1234567890';
OAS_rn = new String (Math.random()); OAS_rns = OAS_rn.substring (2, 11);
 function OAS_NORMAL(pos) {
 document.write('<A HREF="' + OAS_url + 'click_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + OAS_query + '" TARGET=_top>');
document.write('<IMG SRC="' + OAS_url + 'adstream_nx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + '!' + pos + OAS_query + '" BORDER=0></A>');
}

OAS_version = 11;
if (navigator.userAgent.indexOf('Mozilla/3') != -1)
OAS_version = 10;
if (OAS_version >= 11)
document.write('<SCRIPT LANGUAGE=JavaScript1.1 SRC="' + OAS_url + 'adstream_mjx.ads/' + OAS_sitepage + '/1' + OAS_rns + '@' + OAS_listpos + OAS_query + '"><\/SCRIPT>');

 document.write('');
function OAS_AD(pos) {
if (OAS_version >= 11)
  OAS_RICH(pos);
else
  OAS_NORMAL(pos);
}


<!-- POPUP GERAL -->
var win = null;
function NewWindow(mypage,myname,w,h,scroll,toolbar,statubar){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings = 'height='+h+',width='+w+',scrollbars='+scroll+',resizable,toolbar,status'
win = window.open(mypage,myname,settings)
}


//Campos de contato
function obrigatorio(sendAjax){
	if(document.getElementById('nome').value == ""){
		alert("Por favor, informe seu nome");
		document.getElementById('nome').focus();
		return false;
	}
	if(document.getElementById('empresa').value == ""){
		alert("Por favor, informe sua empresa");
		document.getElementById('empresa').focus();
		return false;
	}
	if(document.getElementById('email').value == ""){
		alert("Por favor, informe seu email");
		document.getElementById('email').focus();
		return false;
	}
	if(document.getElementById('ddd').value == ""){
		alert("Por favor, informe o ddd");
		document.getElementById('ddd').focus();
		return false;
	}
	if(document.getElementById('telefone').value == ""){
		alert("Por favor, informe seu telefone");
		document.getElementById('telefone').focus();
		return false;
	}
	if(sendAjax == true){
		setFormContatoAjax();
	}else{
		return true;
	}
}



// LAYER SOLICITE ATENDIMENTO
function abreAtendimento(produto) {

	$('obj_formulario_contato').style.display = 'block';
	$('obj_resultado_erro').style.display = 'none';
	$('obj_resultado_formulario').style.display = 'none';

	$('nome').value = '';
	$('empresa').value = '';
	$('email').value = '';
	$('ddd').value = '';
	$('telefone').value = '';

	document.getElementById('atendimento_fundo').style.visibility = "visible";
	document.getElementById('atendimento_form').style.visibility = "visible";
	document.getElementById('produtoID').value = produto;
	document.getElementById('nome').focus();

}
function fechaAtendimento() {
	document.getElementById('atendimento_fundo').style.visibility = "hidden";
	document.getElementById('atendimento_form').style.visibility = "hidden";
}


// Soluções para envio do formulário de contato utilizando AJAX
function setFormContatoAjax(){
	FormSubmitAjaxArray("form_contato" , "contato/grava_contato.php" , "getFormContatoAjax" , "")
}

function getFormContatoAjax(retornoAjax, param){
	if(retornoAjax['retorno'] == true){
		$('obj_formulario_contato').style.display = 'none';
		$('obj_resultado_erro').style.display = 'none';
		$('obj_resultado_formulario').style.display = 'block';

		window.setTimeout('fechaAtendimento()', 10000);
	}else{
		$('obj_formulario_contato').style.display = 'block';
		$('obj_resultado_erro').style.display = 'block';
		$('obj_resultado_formulario').style.display = 'none';
	}
}

// Metodos do ajax
function FormSubmitAjaxArray(formId , actionFile , funcaoJsRetorno , divId){
	serializedForm = $(formId).serialize();
	fnAjaxSend(actionFile,'&'+serializedForm,funcaoJsRetorno," ,'"+divId+"'", "");
}

function FormSubmitAjax(formId , actionFile , funcaoJsRetorno , divId){
	serializedForm = $(formId).serialize();
	fnAjaxSendHtml(actionFile,'&'+serializedForm,funcaoJsRetorno," ,'"+divId+"'");
}

function _FormSubmitAjax(retorno, divId){
	if(divId == '')
		divId = 'divPrincipal';
	$(divId).innerHTML = retorno;
	setScriptAjax(retorno, $(divId));
}