function menuSubShow(identifier)
{
	$(identifier).style.display="block";
}

function menuSubHide(identifier)
{
	$(identifier).style.display="none";
}




/**
 *	Functie om alle checkboxes op een pagina in één keer aan of uit te vinken.
 *	Geef als parameter het checkbox object mee waarop geklikt moet worden om
 *	alles aan/uit te vinken.
 */
function checkAll(checkbox, assessmentID)
{
	var el = checkbox.form.elements, i = el.length;

	while (i--)
	{
		if (el[i].type == 'checkbox' && el[i].name != checkbox.name && el[i].className == 'checkbox assessment'+assessmentID)
			el[i].checked = checkbox.checked;
	}
}

function ajaxUpdater(params){
	var ajax = new Ajax.Updater(
		params.divId,
		params.page,
		{
			method: params.method,
			parameters: params.parameters,
			postBody: params.postBody,
			onComplete: params.onComplete,
			onSuccess: params.onSuccess,
			evalScripts: params.evalScripts
		}
	);
}





function windowWidth(){
	
	return windowSize('width');}

function windowHeight(){

	return windowSize('height');}

function windowSize(what) {
  
	var winWidth = 0;
	var winHeight = 0;

	// Niet Internet Explorer

	if(typeof(window.innerWidth) == 'number'){
		winWidth = window.innerWidth;
		winHeight = window.innerHeight;}

	// Internet Explorer 6 - Standards Compliant

	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){

		winWidth = document.documentElement.clientWidth;
		winHeight = document.documentElement.clientHeight;}

	// Internet Explorer 4+

	else if(document.body && (document.body.clientWidth || document.body.clientHeight)){

		winWidth = document.body.clientWidth;
		winHeight = document.body.clientHeight;}

	// Teruggeven

	if(what == 'width'){
		return winWidth;}
	else if(what == 'height'){
		return winHeight;}
}

function setUp()
{
	var Content = document.getElementById('Content');
	Content.style.height = (windowHeight() - 180) + "px";
}
