// JavaScript Document
/***
Gerrit Kooiman
***/

// init en size
function _resize() {
	var maincel = document.getElementById("maincel");
	var toptable = document.getElementById("toptable");
	var original_maincelWidth = 850;
	var original_maincelHeight = maincel.clientHeight;
	var content = document.getElementById("content");
	//var webstats = document.getElementById("webstats");
	if (is_ie) 
	{
		bodyWidth = parseInt(document.body.clientWidth);
		bodyHeight = parseInt(document.body.clientHeight);
		toptable.style.width = bodyWidth + "px";
		toptable.style.height = bodyHeight + "px";
		//original_maincelWidth = maincel.clientWidth;
		if (bodyHeight > 92) {
			original_maincelHeight = bodyHeight - 92;
			if (bodyWidth < original_maincelWidth)
			{
				content.style.width = bodyWidth + "px";			
			} 
			else 
			{
				content.style.width = original_maincelWidth + "px";
			}
			if (bodyHeight < original_maincelHeight)
			{
				content.style.height = (bodyHeight - 92) + "px";
			} 
			else 
			{
				//document.getElementById("show").innerText = original_maincelHeight;
				if (original_maincelHeight > 20) {
					content.style.height = (original_maincelHeight - 20) + "px";
				}
			}
		}			
	}
	else if (is_opera)
	{
		alert("opera");
		bodyWidth = parseInt(document.body.clientWidth);
		bodyHeight = parseInt(document.body.clientHeight);
		toptable.style.width = bodyWidth;
		toptable.style.height = bodyHeight;
		original_maincelHeight = maincel.clientHeight;
		if (bodyWidth < original_maincelWidth)
		{
			//content.style.width = bodyWidth + "px";			
		} 
		else 
		{
			//content.style.width = original_maincelWidth + "px";
		}
		if (bodyHeight < original_maincelHeight)
		{
			//content.style.height = (bodyHeight - 98) + "px";
		} 
		else 
		{
			//content.style.height = original_maincelHeight + "px";
		}
		//webstats.style.left = (bodyWidth - 18) + "px";
		//webstats.style.top = (bodyHeight - 18) + "px";
	}
	else if (is_gecko)
	{
		bodyWidth = parseInt(window.innerWidth);
		bodyHeight = parseInt(window.innerHeight);
		toptable.style.width = bodyWidth + "px";
		toptable.style.height = bodyHeight + "px";
		//original_maincelWidth = maincel.clientWidth;
		if (bodyHeight > 92) {
			original_maincelHeight = bodyHeight - 92;
			if (bodyWidth < original_maincelWidth)
			{
				content.style.width = bodyWidth + "px";			
			} 
			else 
			{
				content.style.width = original_maincelWidth + "px";
			}
			if (bodyHeight < original_maincelHeight)
			{
				content.style.height = (bodyHeight - 92) + "px";
			} 
			else 
			{
				//document.getElementById("show").innerText = original_maincelHeight;
				if (original_maincelHeight > 20) {
					content.style.height = (original_maincelHeight - 20) + "px";
				}
			}
		}			
	}
}
function _init(){
	_resize();
}

/***
Gerrit Kooiman
***/

// hoofd javascript


var cName = "middle";
var emailName = "emailadresMiddle";
/***
Gerrit Kooiman
***/

// paginas javascript

function loadCSS(format, format2) {
	var elements_array = document.body.getElementsByTagName("*");
	for (i=0;i<elements_array.length;i++) {
		if ((elements_array[i].className == "small") || (elements_array[i].className == "middle") || (elements_array[i].className == "big")) {
			elements_array[i].className = format;
		}
	}
	parent.cName = format;
	if (document.getElementById("emailadres")) {
		var emailadres = document.getElementById("emailadres");
		emailadres.className = format2;
		parent.emailName = format2;
	}
}
function open_link(url) {
	window.open(url,'jevensternaam');
} 
function show_image(img) {
	window.open(img,'jevensternaam','width=800,height=600,scrollbars=yes,toolbar=yes,location=yes,resize=yes'); 
}
function show_image3D(img, w, h) {
	window.open(img,'jevensternaam','left=0,top=0,width=' + w + ',height=' + h + ',scrollbars=0,toolbar=0,location=0,resize=0'); 
}
window.setInterval("scroll()", 200);
function scroll() {
	//document.getElementById("hallo").style.top = document.body.scrollTop + "px";
	//document.getElementById("hallo").style.visibility = "hidden";
}
/***
Gerrit Kooiman
***/