window.fontsize = 3;

function setFontSize( $size ){
	window.fontsize = $size;
	document.getElementsByTagName('body')[0].className = 'font'+$size;
	update_btn();
}
function setFontSizeUp(){
	if( window.fontsize >= 5 ){ update_btn(); return; }
	window.fontsize ++;
	document.getElementsByTagName('body')[0].className = 'font'+window.fontsize;
	update_btn();
}
function setFontSizeDown(){
	if( window.fontsize <= 1 ){ update_btn(); return; }
	window.fontsize --;
	document.getElementsByTagName('body')[0].className = 'font'+window.fontsize;
	update_btn();
}
function update_btn(){
	if( window.fontsize <= 1 ){
		document.getElementById('btn_smaller').className = 'noactive';
	}else{
		document.getElementById('btn_smaller').className = '';
	}

	if( window.fontsize >= 5 ){
		document.getElementById('btn_larger').className = 'noactive';
	}else{
		document.getElementById('btn_larger').className = '';
	}
}