//toggle visibility (display) of an item
function showblock(nr)
{
	vista = (document.getElementById(nr).style.display == 'none') ? 'block' : 'none';
	document.getElementById(nr).style.display = vista;
}

//open link in new window (popup)
function nw(url,w,h)
{
	window.open(url,'NW','location=0,toolbar=0,menubar=0,directories=0,scrollbars=1,resizable=1,width=' + w + ',height=' +  h);
}
//open link in new window (popup)

function checkAllUsers() 
{
	for(i = 0; i < document.forms[0].elements.length; i++) {
		elm = document.forms[0].elements[i];
		if (elm.type == 'checkbox')
		{
			if (elm.name.substring(0,1) == 'u') 
			{
				elm.checked = true
			}
		}
	}
}
//scripts for maintaining scrollposition after postback
function ScrollIt(){
	window.scrollTo(document.Form1.PageX.value, document.Form1.PageY.value);
}

function setcoords(){
	var myPageX;
	var myPageY;
	if (document.all){
	myPageX = document.body.scrollLeft;
	myPageY = document.body.scrollTop;
	} else {
	myPageX = window.pageXOffset;
	myPageY = window.pageYOffset;
	}
	document.Form1.PageX.value = myPageX;
	document.Form1.PageY.value = myPageY;
}
//scripts for maintaining scrollposition after postback

function showdetail(nummer) {
    document.getElementById("vacaturelist").style.display = "none";
    document.getElementById("detail").innerHTML = "<img src=\"/wbzi/pages/img.aspx?n=" + nummer + "\" onclick=\"showlist();\" alt=\"\" /><br /><br />";
    document.getElementById("detail").style.display = "block";
    document.getElementById("info").style.display = "none";
    document.getElementById("detailinfo").style.display = "";
}

function showlist() {
    document.getElementById("vacaturelist").style.display = "";
    document.getElementById("detail").innerHTML = "";
    document.getElementById("detail").style.display = "none";
    document.getElementById("info").style.display = "";
    document.getElementById("detailinfo").style.display = "none";
}

function setHeight() {
    var height = document.getElementById("content").clientHeight;
    var divs = document.getElementsByTagName("div")
    for (i = 0; i < divs.length; i++) {
        if (divs[i].className.indexOf("fill") > -1) {
            if (navigator.appName.indexOf("Explorer") > -1) height += 5;
            divs[i].style.height = (height - 230) + "px"
        }
    }
}
