//	fnAjaxSendHtml('site/index.php','&state=GetLuckyNumbers&usrId='+usrId,'ReciveGetLuckyNumbers','');
//	fnAjaxSend('site/index.php','&state=DadosArray&usrId='+usrId,'ReciveDadosArray','')

function ExecuteState(actionFile , idElementDest, state  , params){
	aux ='';
	if(state && state.length > 0)
		aux += '&state='+state;
	if(params && params.length > 0)
		aux += '&'+params;
	
	fnAjaxSendHtml(actionFile, aux , '_ExecuteState' ,' , '+idElementDest);	
}

function _ExecuteState(retorno , idElementDest){
	$(idElementDest).innerHTML = retorno;
}

function ExecuteStateReturnFunction(actionFile , funcaoJsRetorno, state  , params){
	aux ='';
	if(state && state.length > 0)
		aux += '&state='+state;
	if(params && params.length > 0)
		aux += '&'+params;
	
	fnAjaxSend(actionFile,'&'+aux,funcaoJsRetorno,'');
}

function ExecuteStateReturnFunctionHtml(actionFile , funcaoJsRetorno, state  , params){
	aux ='';
	if(state && state.length > 0)
		aux += '&state='+state;
	if(params && params.length > 0)
		aux += '&'+params;
	
	fnAjaxSendHtml(actionFile,'&'+aux,funcaoJsRetorno,'');
}

function FormSubmitAjaxArray(formId , actionFile , funcaoJsRetorno){
	serializedForm = $(formId).serialize();
	fnAjaxSend(actionFile,'&'+serializedForm,funcaoJsRetorno,'');
}


function FormSubmitAjax(formId , actionFile , funcaoJsRetorno , idElementDest){
	serializedForm = $(formId).serialize();
	fnAjaxSendHtml(actionFile,'&'+serializedForm,funcaoJsRetorno,' , "'+idElementDest+'"');
}

function _FormSubmitAjax(retorno , idElementDest){
	if(idElementDest.length > 0 && $(idElementDest))
		$(idElementDest).innerHTML = retorno;
	else
		$('divPrincipal').innerHTML = retorno;
}

function sendPopula_estado(estado_preenchido){
	if(estado_preenchido > 0){
		str_complemento = " , '"+estado_preenchido+"'";
	}else{
		str_complemento = '';
	}
	
	fnAjaxSend('segmentacao/segmentacao.php','&state=GetEstado',"getPopula_estado",str_complemento);
}

function getPopula_estado(respReturn , estado_preenchido){
	if(!estado_preenchido){
		estado_preenchido = estado_preenchido;
	}
	
	arrayToOptions(respReturn , $('estado') , 'estado_id' , 'sigla' , estado_preenchido);
}

function sendPopula_cidade(estado , cidade_preenchido){
	if(cidade_preenchido > 0){
		str_complemento = " , '"+cidade_preenchido+"'";
	}else{
		str_complemento = '';
	}	
	fnAjaxSend('segmentacao/segmentacao.php','&state=GetCidadeByEstado&estado_id='+estado,"getPopula_cidade",str_complemento);	
}

function getPopula_cidade(respReturn ,cidade_preenchido){	
	arrayToOptions(respReturn , $('cidade') , 'cidade_id' , 'cidade' , cidade_preenchido);
}

function sendPopula_assunto(assunto_preenchido){
	if(assunto_preenchido > 0){
		str_complemento = " , '"+assunto_preenchido+"'";
	}else{
		str_complemento = '';
	}
	
	fnAjaxSend('segmentacao/segmentacao.php','&state=GetContatoAssunto',"getPopula_assunto",str_complemento);
}

function getPopula_assunto(respReturn , assunto_preenchido){
	if(!assunto_preenchido){
		assunto_preenchido = assunto_preenchido;
	}
	
	arrayToOptions(respReturn , $('assunto') , 'contato_assunto_id' , 'assunto' , assunto_preenchido);
}

function submitFormPaginacao(idForm, numPagina){
	if($('hidenPagina')){
		$('hidenPagina').value = numPagina; 
	}
	
	if($(idForm)){
		$(idForm).submit();
	}	
}

function mostraCampos(div){	
	document.getElementById('indique').style.display = "none";
	document.getElementById('novidade').style.display = "none";		
	document.getElementById(div).style.display = "block";
}

<!-- 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)
}


<!-- DIVS FAQ -->
if(document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj,name){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById(name).getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

<!-- DIV AJUDA -->
function ajuda(div_name) {
		var new_display = (document.getElementById(div_name).style.display == "block") ? "none" : "block";
		var new_img = (new_display == "none") ? "icone_interrogacao.gif" : "icone_interrogacao.gif";
		var new_img_alt = (new_display == "none") ? "Dúvidas? Clique aqui." : "Fechar";

		document.getElementById(div_name).style.display = new_display;
		document.getElementById("img" + div_name).src = "http://www.catho.com.br/salario/img/" + new_img;
		document.getElementById("img" + div_name).alt = new_img_alt;
}

function str_replace(chars,repls,str) {
	if (chars instanceof Array) {
		var arrString = new Array();
		for (i=0; i<chars.length; i++) {
			 var count = i-1;
			 if (i>0) {
				 arrString.push(arrString[count].replace(chars[ i ],repls[ i ]));
			 } else {
				 arrString.push(str.replace(chars[ i ],repls[ i ]));
			 }
		}
		string = arrString.pop();
	} else {
		string = str.replace(chars,repls);
	}
	return string;
}


function relHelp() {
    $j('[rel=relAjuda]').each(function() {
        var text;
        if (this.title != '') {
            text = str_replace('--', '<br />', this.title);
        } else {
            text = text = str_replace('--', '<br />', this.alt);
        }
        $j(this).append('<span id="'+this.id+'_relAjuda" class="relAjuda">'+text+'</span>');
        $j(this).children('#'+this.id+'_relAjuda').hide();
        $j(this).attr('title', '');
        $j(this).attr('alt', '');

        $j(this).hover(function() {
            $j(this).children('#'+this.id+'_relAjuda').stop(true, true);
            $j(this).children('#'+this.id+'_relAjuda').fadeIn();
        },function(){
            $j(this).children('#'+this.id+'_relAjuda').stop(true, true);
            $j(this).children('#'+this.id+'_relAjuda').fadeOut();
        })
    });
}

//TAG REALMEDIA - BANNER TOPO

<!--
//configuration
OAS_url ='http://banner.catho.com.br/RealMedia/ads/';
OAS_listpos = 'Top,Top3,TopLeft';
OAS_query = '';
OAS_sitepage = 'www.catho.cl/webproducts/encuestasalarial/';
//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);
}
//-->

