var estagioCorpo = 1;
var DOM= document.getElementById;
var obb,obb1,obb2,obb3;
var botaoaumentadiminui1,botaoaumentadiminui2,textoaumentadiminui1,textoaumentadiminui2;


function MM_swapImgRestore() 
{ 
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() 
{ 
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d)
 {
	  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); return x;
}

function MM_swapImage() 
{
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function iniciaObjetosTamanhoLetra()
{
  obb = document.getElementById("textonoticia");
  obb1 = document.getElementById("titulonoticia");
  obb2 = document.getElementById("leadnoticia");
  obb3 = document.getElementById("datanoticia");
  botaoaumentadiminui1 = document.getElementById("botaoaumentadiminui1");
  botaoaumentadiminui2 = document.getElementById("botaoaumentadiminui2");
  textoaumentadiminui1 = document.getElementById("textoaumentadiminui1");
  textoaumentadiminui2 = document.getElementById("textoaumentadiminui2");
}


function achaCookie(nome)
{
 var i=0;
 var achou=false;
 var COOKIES = document.cookie.split("; ")
 for (i=0;i<COOKIES.length;i++)
 {
   if (COOKIES[i].split("=")[0]==nome)
   {
     	return COOKIES[i].split("=")[1]
   }
 }
 return ""
}

function todosCookies()
{
 if (document.cookie=="")
 {
  alert ("no cookie")
 }
 else
 {
 COOKIES = document.cookie.split("; ")
 for (i=0;i<COOKIES.length;i++)
 {
   alert("Cookie is " + COOKIES[i].split("="));
 }
  }
  
}

function setaCorpo()
{
  expirateDate = new Date;
  expirateDate.setMonth(expirateDate.getMonth()+6)
  document.cookie="estagioCorpo="+estagioCorpo;expires=expirateDate    
} 

        
function iniciaCorpo()
{


    	estagioCorpo1();

}

function estagioCorpo1()
{
   	if (obb) obb.style.fontSize="70%";
	if (obb1) obb1.style.fontSize="80%";
	if (obb2) obb2.style.fontSize="80%";
   	if (obb3) obb3.style.fontSize="65%";
	estagioCorpo=1;
} 		

function estagioCorpo2()
{
   	if (obb) obb.style.fontSize="80%";
	if (obb1) obb1.style.fontSize="85%";
	if (obb2) obb2.style.fontSize="85%";
   	if (obb3) obb3.style.fontSize="65%";
    estagioCorpo=2;
}

function estagioCorpo3()
{
   	if (obb) obb.style.fontSize="90%";
	if (obb1) obb1.style.fontSize="95%";
	if (obb2) obb2.style.fontSize="95%";
   	if (obb3) obb3.style.fontSize="65%";
	estagioCorpo=3;
}

function estagioCorpo4()
{
	if (obb) obb.style.fontSize="95%";
	if (obb1) obb1.style.fontSize="100%";
	if (obb2) obb2.style.fontSize="100%";
   	if (obb3) obb3.style.fontSize="65%";
	estagioCorpo=4;
}
		
function aumentaCorpo()
{
  if (estagioCorpo==1) 
  { 
    estagioCorpo2();
  }	
  else
  {
  	if (estagioCorpo==2) 
  	{
 	 estagioCorpo3();		
  	}	
  	else
  	{
  		if (estagioCorpo==3) 
  		{
    	 	estagioCorpo4();
  		}	
  	}	
  }
  setaCorpo();	
}

function diminuiCorpo()
{
  if (estagioCorpo==4) 
  {
    estagioCorpo3();
  }	
  else
  {
  	if (estagioCorpo==3) 
  	{
	  estagioCorpo2();
  	}	
  	else
  	{
  		if (estagioCorpo==2) 
  		{		
		 estagioCorpo1();
  		}	
  	}	
  }	
  setaCorpo();
}

function mostraAumentaDiminui()
{
      if (botaoaumentadiminui1) botaoaumentadiminui1.style.visibility="visible";
      if (botaoaumentadiminui2) botaoaumentadiminui2.style.visibility="visible";
	  if (textoaumentadiminui1) textoaumentadiminui1.style.visibility="visible";
	  if (textoaumentadiminui2) textoaumentadiminui2.style.visibility="visible";
}

function iniciaTamanhoLetra()
{
  if (DOM)
  {	
       iniciaObjetosTamanhoLetra();
       iniciaCorpo();
	   mostraAumentaDiminui();
  }	  	
}


