// JavaScript Document
function init(grootte) 
{
	font = '62.5%';
	if (grootte == 'middel') font = '71%';
	if (grootte == 'groot') font = '78%';  
	document.body.style.fontSize = font;
	init_Print();
	init_Staf();
	init_Accessibility();
}

/* PRINT SCRIPT
----------------------------------------------------------------*/
function init_Print() {
	if(window.print && document.getElementById("print-box")) { 
		document.getElementById("print-box").innerHTML = "<a href=\"#\" id=\"print-btn\">Afdrukken</a>";
		document.getElementById("print-btn").style.display = 'inline';
		document.getElementById("print-btn").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,'71%'); }
	//document.getElementById("btnlargefont").onclick  = function () { setFontSize(this,'78%'); }
}

function setFontSize(obj,size) {
	document.getElementById("btnsmallfont").className = '';
	document.getElementById("btnmediumfont").className = '';
	document.getElementById("btnlargefont").className = '';
	obj.className = 'selected';
	document.body.style.fontSize  = size;
	obj.blur();
}

/* SEND TO A FRIEND SCRIPT
----------------------------------------------------------------*/
function init_Staf() {
	if (document.getElementById("sendtoafriend-box"))
	{
		document.getElementById("sendtoafriend-top").style.display = 'none';
		document.getElementById("sendtoafriend-box").style.display = 'none';
		document.getElementById("sendtoafriend-bottom").style.display = 'none';
		
		if(document.getElementById("sendtoafriend")) {
			document.getElementById("sendtoafriend").onclick  = function () { showStaf(); return false; }
		}
		if(document.getElementById("sendtoafriendclose")) {
			document.getElementById("sendtoafriendclose").onclick  = function () { hideStaf(); return false; }
		}
	}
}

function showStaf() {
	document.getElementById("sendtoafriend-top").style.display = 'block';
	document.getElementById("sendtoafriend-box").style.display = 'block';
	document.getElementById("sendtoafriend-bottom").style.display = 'block';
}
function hideStaf() {
	document.getElementById("sendtoafriend-top").style.display = 'none';
	document.getElementById("sendtoafriend-box").style.display = 'none';
	document.getElementById("sendtoafriend-bottom").style.display = 'none';
}

/* 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);
} */

