// JavaScript Document

function LoadActualFontSize() {
	tempArray = document.cookie.split(";");

	for (tA = 0; tA < tempArray.length; tA++) {
		if (tempArray[tA].indexOf('curriformFontSize') > -1) {
			fontSizeValue = tempArray[tA].split("=");
			ACTUAL_FONTSIZE = parseInt(fontSizeValue[1]);
		}
	}
}

function SaveActualFontSize() {
	var expire = new Date();
	expire.setTime (expire.getTime() + (6000 * 24 * 3600000));
	expire = expire.toGMTString();
	document.cookie = "curriformFontSize=" + ACTUAL_FONTSIZE + "; path=/; expires=" + expire;
}

function txt_more() {
	if (ACTUAL_FONTSIZE < LARGEST_FONTSIZE) {
		ACTUAL_FONTSIZE++;
		var cuerpo = new get_obj('cuerpo');
		cuerpo.style.fontSize = ACTUAL_FONTSIZE + "px";
		SaveActualFontSize();
	}
}

function txt_less() {
	if (ACTUAL_FONTSIZE > SMALLEST_FONTSIZE) {
		ACTUAL_FONTSIZE--;
		var cuerpo = new get_obj('cuerpo');
		cuerpo.style.fontSize = ACTUAL_FONTSIZE + "px";
		SaveActualFontSize();
	}
}

function txt_equal() {
	if (ACTUAL_FONTSIZE != 13) {
		ACTUAL_FONTSIZE = 13;
		var cuerpo = new get_obj('cuerpo');
		cuerpo.style.fontSize = ACTUAL_FONTSIZE + "px";
		SaveActualFontSize();
	}

}

var ACTUAL_FONTSIZE = 13;
LoadActualFontSize();
var SMALLEST_FONTSIZE = 10;
var LARGEST_FONTSIZE = 18;

