﻿// AUMENTA E DIMINUI O TAMANHO DA FONTE
var tam = 12;
function mudaFonte(tipo)
{
    if (tipo=="mais") 
    {
        if(tam<18) tam+=2;
    } else 
    {
        if(tam>10) tam-=2;
    }
    document.getElementById('textoContainer').style.fontSize = tam+'px';    
}


// TRATANDO THUMBNAILS
function AbreFoto(foto, tamx, tamy) {
	lf = Math.floor(screen.width/2) - Math.floor(tamx/2);
	tp = Math.floor(screen.height/2) - Math.floor(tamy/2);
	w = open(foto,"Foto","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=no,width=" + tamx + ",height=" + tamy + ", left = " + lf + ", top = " + tp)
	w.document.open();
	w.document.write("<html><title>Fenapetro - Feira Nacional do Petróleo e Gás</title>");
	w.document.write("<body bgcolor=\"#ffffff\" topmargin=\"0\" leftmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\">");
	w.document.write("<img src=\""+foto+"\">");
	w.document.write("</body></html>");
	w.document.close();
}

// Redireciona automaticamente o usuário depois de n segundos
function Redirect(seconds)
{
    setTimeout('SendTo()', seconds * 1000);
}

function SendTo()
{
    window.location.href = 'http://www.fenapetro.com.br';
}

// Div banner flutuante
function Janela(topic) {
        nwin = window.open(topic,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=350,height=300,top=0,left=300')
        self.smwin = nwin
        }

        function MM_findObj(n, d) { //v4.01
          var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
            d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
          if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
          for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
          if(!x && d.getElementById) x=d.getElementById(n); return x;
        }

        function MM_showHideLayers() { //v6.0
          var i,p,v,obj,args=MM_showHideLayers.arguments;
          for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
            if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
            obj.visibility=v; }
        }