<!-- Popup Ver Foto Zoom
function ampliar_imagem(URL, width, height) {
	var larguratela = screen.width;
	var alturatela = screen.height;
	var largurajanela = ''+width+'';
	var alturajanela = ''+height+'';
	
	var iniciolargura = (larguratela - largurajanela) / 2;
	var inicioaltura = (alturatela-alturajanela) / 2;

   window.open(URL, 'imagem', 'width='+largurajanela+', height='+alturajanela+', top='+inicioaltura+', left='+iniciolargura+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

<!-- Popup Imprimir Lista Compras
function imprimir_lista(URL)
{
   var width = 350;
   var height = 500;

   var left = 50;
   var top = 50;
   
window.open(URL,'lista_compras', 'width='+width+', height='+height+', top='+top+', left='+left+', toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,menubar=no')
}

<!-- Popup Imprimir Receita
function imprimir_receita(URL)
{
   var width = 600;
   var height = 500;

   var left = 50;
   var top = 50;
   
window.open(URL,'receita', 'width='+width+', height='+height+', top='+top+', left='+left+', toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,menubar=no')
}

<!-- Janela Radio On Line
function ao_vivo(url) {
  window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=340,height=270,top=50,left=50')
}


<!-- Validação do campo busca Notícias-->
function valida_busca_noticias_nao_utilizado(){
        if( document.getElementById('palavra').value.length < 3 || document.getElementById('palavra').value == "Digite a palavra desejada..." ){
        alert("Para fazer a busca, digite pelo menos 3 caracteres no campo de busca de Notícias.");
        return false;
        }
}

<!-- Validação do campo busca Notícias-->
function valida_busca_colunas(){
        if( document.getElementById('palavra').value.length < 3 || document.getElementById('palavra').value == "Digite a palavra desejada..." ){
        alert("Para fazer a busca, digite pelo menos 3 caracteres no campo de busca de Colunas.");
        return false;
        }
}

<!-- Popup Imprimir Notícias -->
function imprimir_noticia(URL) {
   var width = 650;
   var height = 500;

   var left = 50;
   var top = 50;

   window.open(URL,'zoom', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
} 

<!-- Popup Indicar Notícias -->
function indicar_noticia(URL) {
   var width = 400;
   var height = 320;

   var left = 50;
   var top = 50;

   window.open(URL,'indicar', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

<!-- Popup Imprimir Notícias -->
function imprimir_coluna(URL) {
   var width = 650;
   var height = 500;

   var left = 50;
   var top = 50;

   window.open(URL,'zoom', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
} 

<!-- Popup Indicar Notícias -->
function indicar_coluna(URL) {
   var width = 400;
   var height = 320;

   var left = 50;
   var top = 50;

   window.open(URL,'indicar', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=no, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

<!--Início Popup Mapa Abrangência
function abrir_mapa_abrangencia(URL, width, height) {
	var larguratela = screen.width;
	var alturatela = screen.height;
	var largurajanela = '970';
	var alturajanela = '500';
	
	var iniciolargura = (larguratela - largurajanela) / 2;
	var inicioaltura = (alturatela-alturajanela) / 2;

   window.open(URL, 'pop_mapa_abrangencia', 'width='+largurajanela+', height='+alturajanela+', top='+inicioaltura+', left='+iniciolargura+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}
//-->Termino Popup Mapa Abrangência 

<!-- Enquete - popup votar
function popup_enquete_voto()
{

   var left = 50;
   var top = 50;
   var width = 380;
   var height = 400;
   
nj=window.open("",'miniwin', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
nj.document.open();
}

<!-- Enquete - popup ver resultado
function popup_enquete_resultado(URL) {
	
   var left = 50;
   var top = 50;
   var width = 380;
   var height = 400;
   window.open(URL, 'resultado_enquete', 'width='+width+', height='+height+', top='+top+', left='+left+', scrollbars=yes, status=no, toolbar=no, location=no, directories=no, menubar=no, resizable=no, fullscreen=no');
}

<!-- Validação Indicar News
function valida_indique_noticias(){
	var caminho = document.form_indicacao;
	var seu_nome = caminho.seu_nome.value;
	var nome_amigo = caminho.nome_amigo.value;
	var email_amigo = caminho.email_amigo.value;
	if(seu_nome.length < 2){
		alert('Preencha o campo Seu nome.');
		form_indicacao.seu_nome.focus();
		return false;
	} else if(nome_amigo.length < 2){
		alert('Preencha o campo Nome de seu amigo.');
		form_indicacao.nome_amigo.focus();
		return false;
	} else if(email_amigo.indexOf('@') < 1){
		alert('Preencha o campo E-mail de seu amigo com um endereço válido.');
		form_indicacao.email_amigo.focus();
		return false;
	} else {
		return true;
	}
}

<!--Início validação newsletter
function valida_form_newsletter(){
	var nome = document.form_newsletter.nome.value;
	var email = document.form_newsletter.email.value;
	if(nome.length < 1){
		alert('Você deve preencher o campo Nome.');
		form_newsletter.nome.focus();
	    return false;
	} else if(email.indexOf('@') < 1){
		alert('Você deve preencher o campo Email com um endereço válido.');
		form_newsletter.email.focus();
	    return false;
	} else
		return true;
}

// limite texto Comentarios Colunas
function LimitTextoComentarioColunas(valor)
{
    quant = 500;
    total = valor.length;
    if(total <= quant)
    {
        resto = quant - total;
        document.getElementById('cont').innerHTML = resto;
    }
    else
    {
        document.getElementById('comentario').value = valor. substr(0,quant);
    }
}
// limite texto Comentarios Colunas

//inicio carrega flash
function carregaFlash(caminho,largura,altura)
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'">');
document.write('<param name="movie" value="'+caminho+'">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="menu" value="false">');
document.write('<embed src="'+caminho+'" quality="high" wmode="transparent" menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'"></embed>');
document.write('</object>');
}

// inicio função ShowHelp
function ShowHelp(div, title, desc){
	div.style.display = 'inline';
	div.style.position = 'absolute';
	div.style.width = '200';
	div.style.backgroundColor = '#FFFFE0';
	div.style.border = 'solid 1px #EDEACA';
	div.style.padding = '10px';
	div.innerHTML = '<b>' + title + '</b><br><div style="padding-left:10; padding-top:5; padding-right:5; z-index:1000;">' + desc + '</div>';
}

function HideHelp(div){
	div.style.display = 'none';
}
// final função ShowHelp

// FUNÇÃO QUE AUMENTA E DIMINUI O TAMANHO DA FONTE NA ÁREA DE NOTICIAS
var intContaTam = 0;
	var vetFonte = new Array ();
	vetFonte [0] = "65"; <!-- 65 - equivale a fonte 10 no td, body-->
	vetFonte [1] = "100";
	vetFonte [2] = "110";
	vetFonte [3] = "120";
	vetFonte [4] = "130";
	
	function areaTexto (strAD) {
		
		if (strAD=="A") {
			intContaTam++;
			if (intContaTam>=vetFonte.length)
				intContaTam = vetFonte.length-1;
			document.all.areaTexto.style.fontSize = vetFonte[intContaTam]+"%";
		} else {
			intContaTam--;
			if (intContaTam<0)
				intContaTam=0;
			document.all.areaTexto.style.fontSize = vetFonte[intContaTam]+"%";
		}
	}

var tam=10;
function mudaFonte(tipo){
if (tipo=="mais"){		
	tam+=5;
}else{
	tam-=5;
} 
	document.getElementById('text').style.fontSize=tam+'px' ;
	
}


<!-- Menu Expansível -->
function Mostra(id1, id2) {
  if (id1 != '') expMenu(id1);
  if (id2 != '') expMenu(id2);
}
function expMenu(id) {
  var itm = null;
  if (document.getElementById) {
		itm = document.getElementById(id);
  } else if (document.all){
		itm = document.all[id];
  } else if (document.layers){
		itm = document.layers[id];
  }
	
  if (!itm) {
  }
  else if (itm.style) {
		if (itm.style.display == "none") { itm.style.display = ""; }
	else { itm.style.display = "none"; }
    }
  else { itm.visibility = "show"; }
}	


<!-- Máscaras -->
function txtBoxFormat(objeto, sMask, evtKeyPress) {
    var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;


if(document.all) { // Internet Explorer
    nTecla = evtKeyPress.keyCode;
} else if(document.layers) { // Nestcape
    nTecla = evtKeyPress.which;
} else {
    nTecla = evtKeyPress.which;
    if (nTecla == 8) {
        return true;
    }
}

    sValue = objeto.value;

    // Limpa todos os caracteres de formatação que
    // já estiverem no campo.
    sValue = sValue.toString().replace( "-", "" );
    sValue = sValue.toString().replace( "-", "" );
    sValue = sValue.toString().replace( ".", "" );
    sValue = sValue.toString().replace( ".", "" );
    sValue = sValue.toString().replace( "/", "" );
    sValue = sValue.toString().replace( "/", "" );
    sValue = sValue.toString().replace( ":", "" );
    sValue = sValue.toString().replace( ":", "" );
    sValue = sValue.toString().replace( "(", "" );
    sValue = sValue.toString().replace( "(", "" );
    sValue = sValue.toString().replace( ")", "" );
    sValue = sValue.toString().replace( ")", "" );
    sValue = sValue.toString().replace( " ", "" );
    sValue = sValue.toString().replace( " ", "" );
    fldLen = sValue.length;
    mskLen = sMask.length;

    i = 0;
    nCount = 0;
    sCod = "";
    mskLen = fldLen;

    while (i <= mskLen) {
      bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == "/") || (sMask.charAt(i) == ":"))
      bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))

      if (bolMask) {
        sCod += sMask.charAt(i);
        mskLen++; }
      else {
        sCod += sValue.charAt(nCount);
        nCount++;
      }

      i++;
    }

    objeto.value = sCod;

    if (nTecla != 8) { // backspace
      if (sMask.charAt(i-1) == "9") { // apenas números...
        return ((nTecla > 47) && (nTecla < 58)); } 
      else { // qualquer caracter...
        return true;
      } 
    }
    else {
      return true;
    }
  }