if (location.href.toString().indexOf('action=print') != -1) {
	// tenta encontrar automaticamente o diretorios de ultnot como estacao.uol.com.br/canal/ultnot/
	document.getElementById('styles').href = document.getElementById('styles').href.replace(/([:a-z0-9\.\/]*)\/([a-z0-9]*)(\.css)/i,"$1/$2-print$3");
	onload=waitAndPrint;
}
function waitAndPrint() { setTimeout('print()',500); }

// Script para criar divs para os boxes após cada h4
function criaBoxes()
{
  html = document.getElementById('texto-resenhas').innerHTML;
  html = html.replace(/^\n\n\t*<br>/i,"");
  html = html.replace(/<br><br><h4>/gi,"<h4>"); //remove quebras de linha antes de cada cabeçalho H4
  html = html.replace(/<\/h4><br>/gi,"</h4>"); //remove quebras de linha antes de cada cabeçalho H4
  html = html.replace(/<h4>/gi,"</div></div><div class=chapeubloco-resenhas><h4>").replace(/<\/h4>/gi,"</h4></div><div class=textobloco-resenhas>");
  html = html.replace(/<\/div><\/div>/i,"");
  html = html.replace(/<br><br><br>/gi,"<br><br>");
  html = html.replace(/<br><br>/gi,"<div><br></div>");
  html += "</div>";
  document.getElementById('texto-resenhas').innerHTML = html;
}
