var min=100;
var max=150;
var size='';
var change=20;

function increaseFontSize() {
   var p = document.getElementById('coluna_principal');
      if(p.style.fontSize) {
         var s = parseInt(p.style.fontSize.replace("%",""));
	  } else {
         var s = 100;
      }
      if(s<max && (s+change)<=max) {
         s += change;
      }
      p.style.fontSize = s+"%"
	  createCookie('conselheirosnacionais',s,30);
}

function decreaseFontSize() {
   var p = document.getElementById('coluna_principal');
      if(p.style.fontSize) {
         var s = parseInt(p.style.fontSize.replace("%",""));
      } else {
         var s = 100;
      }
      if(s>min && (s-change)>=min) {
         s -= change;
      }
      p.style.fontSize = s+"%"
	 createCookie('conselheirosnacionais',s,30);
}

function setFontSize(size) {
   var p = document.getElementById('coluna_principal');
      p.style.fontSize = size+"%";
	  createCookie('conselheirosnacionais',size,30);
}

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;
}
