var tam = 12;

function mudaFonte(tipo,elemento){
	if (tipo=="mais") {
		if(tam<16) tam+=1;
		createCookie('fonte',tam,365);
	} else {
		if(tam>10) tam-=1;
		createCookie('fonte',tam,365);
	}
	document.getElementById(elemento).style.fontSize = tam+'px';

}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	} else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}


function confirma(texto) {
  if (confirm("Você deseja realmente excluir este(a) "+texto+"?"))
    submit();
  else
    return false;
}


function novajanela(URL,titulo) { 
  window.open(URL,titulo,'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=767,height=550');
}

function novajanela2(URL,w,h) { 
  window.open(URL,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+w+',height='+h+'');
}


function aparece(objeto,num){
	document.getElementById('destaque0').style.display = 'none';
	document.getElementById('destaque1').style.display = 'none';
	document.getElementById('destaque2').style.display = 'none';
	document.getElementById('destaque3').style.display = 'none';
	document.getElementById(objeto).style.display = 'block';
	ul = document.getElementById("abas").getElementsByTagName('li');
	for (var i=0;i<=3;i++) {
	if (num == i) 
	{ 
	ul[i].setAttribute("class","ativo");
	ul[i].setAttribute("className","ativo");
	}
	else
	{ 
	ul[i].removeAttribute("class");
	ul[i].removeAttribute("className","");
	}
	}
	document.getElementById(objeto).className = 'block';
	}




