// Funcoes

function hidetrail(){ 
document.getElementById('banners').style.display= "none";
}

function printer(div){
 conte=document.getElementById(div).innerHTML;
 pop=window.open("","print","width=600,height=500,scrollbars=1");
 pop.document.write('<link href="http://circul_c.taroba.com.br/css.css" rel="stylesheet"/>');
 pop.document.write('<center><table bgcolor=#ffffff><tr><td><img src=imagens/estrutura/print_topo.jpg></td></tr><tr><td>');
 pop.document.write('<div style="width:600">');
 pop.document.write(conte);
 pop.document.write('</div>');
 pop.document.write('</td></tr><tr><td><span style="cursor:pointer" onclick="window.print();"><font size=1 face=verdana>&nbsp;&nbsp;&nbsp;&nbsp;<img src="http://circul_c.taroba.com.br/imagens/estrutura/bt_imprimir.gif"></font></span><br><img src=imagens/estrutura/print_barra.jpg></td></tr></table></center>');
}

function open_popup(pagina) {
 window.open(pagina, 'open_popup', 'width=600, height=500, top=100, left=100'); 
} 
function trSetColor(linha,cor)
{
	if ( cor == '' || typeof(linha.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var celulas = linha.getElementsByTagName('td');
    }
    else if (typeof(linha.cells) != 'undefined') {
        var celulas = linha.cells;
    }
    else {
        return false;
    }

    var celulas_count  = celulas.length;
    for (var c = 0; c < celulas_count; c++) {
        celulas[c].style.backgroundColor = cor;
    }
    return true;
}


 function recomenda() {
 window.open('scripts/recomende/recomenda.php?url=<?=$_SERVER["HTTP_REFERER"]?>', 'recomenda', 'width=300, height=200, top=100, left=100'); 
} 



function changeColor(objDiv){
	if(objDiv.className == 'fontMenuOver'){	
		objDiv.className='fontMenu';
	}else{
		objDiv.className='fontMenuOver';
	}
}




function imprime_div(div_imprimir)
{
 var prtContent = document.getElementById(div_imprimir);
 var WinPrint = window.open('','IMPRIMIR','letf=0,top=0,width=527,height=520,toolbar=0,scrollbars=1');

 var top_imprimir = "http://www.oindependenteonline.com.br/imagens/estrutura/top-imprimir.gif";

 var conteudoprint = "<body  marginheight='0' marginwidth='0' rightmargin='0' topmargin='0' leftmargin='0'><table width='510' border='0' cellpadding='0' cellspacing='0'><tr><td  valign='bottom'><img src='"+top_imprimir+"' width='510'/></td></tr><tr><td valign='top' bgcolor='#FFFFFF'><div align='center'><table width='95%' border='0' cellpadding='0' cellspacing='0'><tr><td height='30'><div align='right'><img  style='cursor:pointer' onClick='window.print();'src='http://www.oindependenteonline.com.br/imagens/estrutura/bt_imprimir.gif' /></div></td></tr><tr><td valign='top'><table style='border-bottom: 1px #666666 dotted' width='98%' border='0' align='center' cellpadding='0' cellspacing='0'><tr><td valign='top'><div align='left'></div></td></tr><tr><td height='300' valign='top'><div id='conteudoprint'><font face='Arial' size='2' >"+prtContent.innerHTML+"</font><br><br></div></td></tr></table></td></tr><tr><td height='30'><div align='right'><img src='http://www.oindependenteonline.com.br/imagens/estrutura/bt_imprimir.gif'  align='absmiddle' style='cursor:pointer' onClick='window.print();'/></div></td></tr></table></div></td></tr><tr><td height='14' bgcolor='#FFFFFF'>&nbsp;</td></tr></table></body>";
 
 

  WinPrint.document.write(conteudoprint);
 WinPrint.document.close();
 WinPrint.focus();

}



function selectType( type )
{
	
	if( type == 'ultimas_noticias' )
	{
		
		document.getElementById('ultimas_noticias').style.display = 'block';
		document.getElementById('tempo_quente').style.display = 'none';
		document.getElementById('taroba_esportes').style.display = 'none';
		document.getElementById('vitrine').style.display = 'none';
                ajaxHTML('ultimasdiv','/news.php?news=79');
		
		
	}
	else if( type == 'tempo_quente' )
	{
	    document.getElementById('ultimas_noticias').style.display = 'none';
		document.getElementById('tempo_quente').style.display = 'block';
		document.getElementById('taroba_esportes').style.display = 'none';
		document.getElementById('vitrine').style.display = 'none';
                ajaxHTML('tempodiv','/news.php?news=80');
	}
	
	else if  ( type == 'taroba_esportes')
	{
	    document.getElementById('ultimas_noticias').style.display = 'none';
		document.getElementById('tempo_quente').style.display = 'none';
		document.getElementById('taroba_esportes').style.display = 'block';
		document.getElementById('vitrine').style.display = 'none';
                ajaxHTML('esportediv','/news.php?news=81');
     }
	 
	 	else if  ( type == 'vitrine')
	{
	    document.getElementById('ultimas_noticias').style.display = 'none';
		document.getElementById('tempo_quente').style.display = 'none';
		document.getElementById('taroba_esportes').style.display = 'none';
		document.getElementById('vitrine').style.display = 'block';
     }
	 
	 
}



function telacheia(quem)
{	
var agt=navigator.userAgent.toLowerCase();
   	var is_ie   = (agt.indexOf("msie") != -1);
	var features;
	if (is_ie)
	{
	 	features="fullscreen=yes";
	}
	else
	{
		features="toolbar=0,scrollbars=1,location=0,border=0,status=0,menubar=0,";
		features=features + 'outerHeight=' + screen.availHeight + ',outerWidth=' + (screen.availWidth-2);
	}
	var w=window.open(quem,'fullscreen',features);
	if (w!=null)
	{
		if (!is_ie && screen.availLeft!=null && screen.availTop!=null)
			w.moveTo(screen.availLeft,screen.availTop);
		w.focus();
	}
}

