// JavaScript Document
function init() {
	// init_Accessibility();
	init_PrintButton();
}

function init_PrintButton() {
	if(window.print && document.getElementById("printbtn")) { 
		document.getElementById("printbtn").style.display = 'inline';
		document.getElementById("printbtn").getElementsByTagName('a')[0].onclick  = function () { window.print(); return false; }
	}
}

function init_Accessibility() {
	document.getElementById("btnsmallfont").onclick  = function () { setFontSize(this,'62.5%'); }
	document.getElementById("btnmediumfont").onclick  = function () { setFontSize(this,'74%'); }
	document.getElementById("btnlargefont").onclick  = function () { setFontSize(this,'81%'); }
}

function setFontSize(obj,size) {
	document.getElementById("btnsmallfont").className = 'fontresize';
	document.getElementById("btnmediumfont").className = 'fontresize';
	document.getElementById("btnlargefont").className = 'fontresize';
	obj.className = 'fontresize selected';
	document.body.style.fontSize  = size;
	obj.blur();
	
}

/* short generic onload by Brothercake */
if(typeof window.addEventListener != 'undefined') {
	window.addEventListener('load', init, false);
} else if(typeof document.addEventListener != 'undefined') {
	document.addEventListener('load', init, false);
} else if(typeof window.attachEvent != 'undefined') {
	window.attachEvent('onload', init);
}

