function popupform(myform, windowname, width, height){
	var toppos, leftpos, page

	toppos = (screen.height/2)-(height/2)-25;
	leftpos = (screen.width/2)-(width/2);

	if (! window.focus)return true;
	window.open('', windowname, 'toolbar=no, menubar=0, titlebar=0, resizable=no, scrollbars=yes, status=0, width='+width+', height='+height+',left='+leftpos+', top='+toppos);
	myform.target=windowname;
	return true;
}

function openWinClick( location, name, width, height ) {
	var toppos, leftpos, page

	toppos = (screen.height/2)-(height/2)-25;
	leftpos = (screen.width/2)-(width/2);

	popup = window.open( location, name, 'toolbar=no, menubar=0, titlebar=0, resizable=no, scrollbars=yes, status=0, width='+width+', height='+height+',left='+leftpos+', top='+toppos);
	window.opener="";window.close();;
}

function openForm( location, name, width, height ) {
	var toppos, leftpos, page

	toppos = (screen.height/2)-(height/2)-25;
	leftpos = (screen.width/2)-(width/2);

	popup = window.open( location, name, 'toolbar=no, menubar=0, titlebar=0, resizable=yes, scrollbars=yes, status=0, width='+width+', height='+height+',left='+leftpos+', top='+toppos);
	//window.opener="";window.close();;
}

function openPage( location, name, width, height ) {
	var toppos, leftpos, page

	toppos = (screen.height/2)-(height/2)-80;
	leftpos = (screen.width/2)-(width/2);

	popup = window.open( location, name, 'toolbar=no, menubar=0, titlebar=1, resizable=yes, scrollbars=yes, status=1, width='+width+', height='+height+',left='+leftpos+', top='+toppos);
	window.opener="";window.close();;
}

function destroy()
{
	window.open ("close.php", "Sluiten", "height=3, width=3");
	window.opener="";window.close();
}

function toggleImg(id) {
	var a = document.getElementById(id)
	a.alt = (a.alt == 1) ? 2 : 1
	a.src = '' + a.alt + '.gif'
}

function toggle_visibility(id) {
	var e = document.getElementById(id);
	if(e.style.display == 'none')
		e.style.display = 'block';
	else
		e.style.display = 'none';
}

function hide(id) {
	var e = document.getElementById(id);
	e.style.display = 'none';
}

function toggleDiv(id,flagit) {
	if (flagit=="1"){
		if (document.layers) document.layers[''+id+''].visibility = "show"
		else if (document.all) document.all[''+id+''].style.visibility = "visible"
		else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
	}
	else
		if (flagit=="0"){
		if (document.layers) document.layers[''+id+''].visibility = "hide"
		else if (document.all) document.all[''+id+''].style.visibility = "hidden"
		else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
	}
}

function makedate() {
	 var today = new Date() ;
	 var m = today.getMonth() ;
	 var d = today.getDate() ;
	 var y = today.getFullYear() ;
	 var marr = ["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"] ;
	 document.write(d+" "+marr[m]+" "+y) ;
}
