var theRules = new Array(),
    theRule;

window.onload = function() {
	theRules = css_obter_regras(0);
	if(!theRules) return;
	theRule = theRules[0];

	document.getElementById("aumentar").onmousedown = aumentar;
	document.getElementById("aumentar").ondblclick = aumentar;

	document.getElementById("diminuir").onmousedown = diminuir;
	document.getElementById("diminuir").ondblclick = diminuir;
}

function aumentar() {
	var novo = parseInt(theRule.style.fontSize) + 3;
	if(novo > 25) novo = 25;
	theRule.style.fontSize = novo  + "px";
}

function diminuir() {
	var novo = parseInt(theRule.style.fontSize) - 3;
	if(novo < 12) novo = 12;
	theRule.style.fontSize = novo  + "px";
}
