

function setActionAkwan(f) {
	/* Busca tudo */
	if(f.target.value == 1) loc="http://www.tudocuritiba.com.br/portal/advanced_search_result.php?keywords=" + escape(f.query.value) + "&";
	/* Busca empresa */
	else if(f.target.value == 2) loc="http://www.tudocuritiba.com.br/portal/advanced_search_result_emp.php?keywords="+ escape(f.query.value) + "&";
	/* Busca Rua */
	else if(f.target.value == 3) loc="http://www.tudocuritiba.com.br/portal/advanced_search_result_end.php?keywords=" + escape(f.query.value) + "&";
	/* Busca segmento */
	else if(f.target.value == 4) loc="http://www.tudocuritiba.com.br/portal/advanced_search_result_seg.php?keywords="+ escape(f.query.value) + "&";
	else loc=(f.target.value) + escape(f.query.value) + "&";
	
	ck(loc);
}

function alocaBanAbs(divBan,esqPos){
 tblNome = document.getElementById('tbl_reftop');
 tdEsq  = (pegaXAbs(tblNome));
 tdEsq  = (tdEsq + esqPos);
 document.getElementById(divBan).style.left = tdEsq;
 document.getElementById(divBan).style.right = '-15px';
 document.getElementById(divBan).style.marginRight = '15px';
}

function alocaBanAbsTop(divBan,topPos,objRef){
 objNam = document.getElementById(objRef);
 objTop  = (pegaYAbs(objNam));
 objTop  = (objTop + topPos);
 document.getElementById(divBan).style.top = objTop;
}
 
 
function pegaXAbs(elt) {
 return parseInt(elt.x) ? elt.x : pegaPosAbs(elt,"Left");
}/* retorna o left absoluto */


function pegaYAbs(elt) { 
 return parseInt(elt.y) ? elt.y : pegaPosAbs(elt,"Top"); 
}/* retorna o top absoluto */

function pegaPosAbs(elt,posicao) {
 iPos = 0;
 while (elt != null) {
  iPos += elt["offset" + posicao];
  elt = elt.offsetParent;
 }
 return iPos;
}/* funcao chamada para adquirir top ou left absoluto */

//insira os divs absolutos aqui (div id + distancia left)
function aTodosBanrs(){
 alocaBanAbs('absCTopban',0);  //top banner
 alocaBanAbs('absCAnunc',728); //top anuncie 
 alocaBanAbs('abs3selos',661); //3 selos
 alocaBanAbs('absIfrUSEG',320);//iframe useg
 alocaBanAbs('termometro',795);  //termometro
 
 alocaBanAbsTop('absIfrUSEG',0,'divCorpo');
 alocaBanAbsTop('abs3selos',0,'divCorpo');
}

window.onresize = function(){
 window.setTimeout("aTodosBanrs()", 10);
}/* arruma tempo de execucao do imac */

function mudBtnsBus($pos){
 for($i=0; $i<=3; $i++){
  document.getElementById('bl2_btn'+$i).className = 'h21 w73 mt01 bg10 bgnR';
  document.getElementById('bl2img'+$i).src = 'ii_arquivos/lbloff'+$i+'.gif';
 }

 document.getElementById('bl2_btn'+$pos).className = 'h21 w73 mt01 bg9 bgnR';		
 document.getElementById('bl2img'+$pos).src = 'ii_arquivos/lblon'+$pos+'.gif';
 

 
 if($pos == 0) {
  document.f.target.value = 2;
 } else if($pos == 1) {
  document.f.target.value = 1;
 } else if($pos == 2) {
  document.f.target.value = 3;
 } else if($pos == 3) {
  document.f.target.value = 4;
 }
 if (document.f.query.value != ""){
 	setActionAkwan(document.f);
 }
 
}

//redirecionamento canais shopping
function shopping(url){
 window.open(url);
}

var regiao = document.location.search.replace(/^\?/,"");
if ((typeof regiao == "undefined") || (regiao == "")){regiao = "brasil";}
function carregaAba(link) {
    caixaAnterior = parent.caixaAnterior;
    
    if(caixaAnterior != '') {
        parent.document.getElementById(caixaAnterior).style.display = 'none';
    }

   	if(link.indexOf("esporte") != -1) {
       	parent.document.getElementById('bEspor').style.display = 'block';
       	parent.caixaAnterior = 'bEspor';
   	} else if(link.indexOf("mundo") != -1) {
       	parent.document.getElementById("bAparente_mundo").style.display = "";
       	parent.caixaAnterior = 'bAparente_mundo';
   	} else if(link.indexOf("brasil") != -1 && link.indexOf("capa_") == -1) {
       	parent.document.getElementById("bAparente_brasil").style.display = "";
       	parent.caixaAnterior = 'bAparente_brasil';
   	} else if(link.indexOf("cultura") != -1) {
       	parent.document.getElementById("bAparente_cultura").style.display = "";
       	parent.caixaAnterior = 'bAparente_cultura';
   	} else if(link.indexOf("babado") != -1) {
       	parent.document.getElementById("bAparente_babado").style.display = "";
       	parent.caixaAnterior = 'bAparente_babado';
    } else if(link.indexOf("economia") != -1) {
       	parent.document.getElementById("bAparente_economia").style.display = "";
       	parent.caixaAnterior = 'bAparente_economia';
  	} else {
       	parent.document.getElementById('bAparente').style.display = 'block';
       	parent.caixaAnterior = 'bAparente';
    }

	location.href = link + "?" + regiao;
} /* carregaAba */



//Abri painel iGeconomia
function painel(){
Popup_Painel = ck(30038, 781, '', '3');
Popup_Painel.focus();
}

document.write('<scr'+'ipt language="javascript" src="contaclique.js"></scr'+'ipt>');

function acessoVerifica() {
	_urlHome = (location.href).split("?");
	
	var urlFlashBox = "";
	var objFlash = "";
	
	if (_urlHome[1] == "acesso") {
		urlFlashBox = "#";
	} else {
		urlFlashBox = "#";
	}
	
	objFlash += "<object id='objFlashBox' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='130' height='85'>";
	objFlash += "	<param name='movie' value='" + urlFlashBox + "'>";
	objFlash += "	<param name='wmode' value='transparent'>";
	objFlash += "	<embed id='objFlashBox2' src='" + urlFlashBox + "' wmode='transparent' quality='high' width='130' height='85' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>";
	objFlash += "</object>";
	
	document.write(objFlash);
}

function opecflash(ig_widht,ig_height,ig_swf,ig_wmode){
	document.writeln('     <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+ig_widht+'" HEIGHT="'+ig_height+'" id="dhtmlig" ALIGN="">');
	document.writeln('       <PARAM NAME="movie" VALUE="'+ig_swf+'">');
	document.writeln('       <PARAM NAME="quality" VALUE="high">');
	document.writeln('       <PARAM NAME="wmode" VALUE="'+ig_wmode+'">');
	document.writeln('       <PARAM NAME="bgcolor" VALUE="#FFFFFF">');
	document.writeln('      <EMBED src="'+ig_swf+'" quality="high" wmode="'+ig_wmode+'" bgcolor="#FFFFFF"  WIDTH="'+ig_widht+'" HEIGHT="'+ig_height+'" NAME="dhtmlig" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
	document.writeln('     </OBJECT>');
}