
function dblclick() {
window.scrollTo(0,0)
}
if (document.layers) {
document.captureEvents(Event.ONDBLCLICK);
}
document.ondblclick=dblclick;

function hidestatus() {
window.status=''
return true
}
if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)
document.onmouseover=hidestatus
document.onmouseout=hidestatus

function blockError() {
return true;
}
window.onerror = blockError;

// disable right mouse click; script by maximus (maximus@nsimail.com) w/ mods by dynamicdrive
// for full source code, visit http://www.dynamicdrive.com
var message="Als u voor persoonlijk gebruik of genealogisch onderzoek\nmateriaal wilt gebruiken, neem dan a.u.b. contact op.\n\n(de functies van de muisknoppen zijn uitgeschakeld om\nte voorkomen dat er ongevraagd materiaal wordt gebruikt\nwaarop eventueel copyright of auteursrechten rusten)";

function clickIE4() {
if (event.button==2) {
alert(message);
return false;
}
}

function clickNS4(e) {
if (document.layers||document.getElementById&&!document.all) {
if (e.which==2||e.which==3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById) {
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")

function noselect(e){
return false
}

function reAan(){
return true
}

// voor IE4+
document.onselectstart=new Function ("return false")
// voor Netscape 6+
if (window.sidebar){
document.onmousedown=noselect
document.onclick=reAan
}

var specialcase=((navigator.userAgent.indexOf('Mac') != -1) || document.all)
var flag=0;
var msg="Als u voor persoonlijk gebruik of genealogisch onderzoek\nmateriaal wilt gebruiken, neem dan a.u.b. contact op.\n\n(de functies van de muisknoppen zijn uitgeschakeld om te\nvoorkomen dat er ongevraagd materiaal wordt gebruikt\nwaarop eventueel copyright of auteursrechten rusten)";

var x,y,x1,y1,copyAttempt;
function init()
{
	if (!(document.getElementById || document.all || document.layers)) return;
	if (specialcase && document.layers)
	{
		document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove = special;
	}
	for (i=0;i<document.images.length;i++)
	{
		document.images[i].onmousedown = checkIt;
		document.images[i].onmouseup = function() {return false};
		if (specialcase)
		{
			document.images[i].onmousemove = special;
			document.images[i].onclick = clearIt;
		}
	}
}

function checkIt(e)
{
	copyAttempt = 0;
	if (window.Event)
	{
		x = e.screenX;
		y = e.screenY;
		theButt = (e.which == 3);
	}
	else
	{
		x = window.event.clientX;
		y = window.event.clientY;
		theButt = (window.event.button == 2);
	}
	if (theButt)
	{
		copyAttempt = 1;
		flag = 0;
		alert(msg);
		return false; // alleen voor NN4
	}
	if (specialcase) flag = 1;
	return false;
}

function special(e)
{
	theObj = '';
	if (window.Event)
	{
		x1 = e.screenX;
		y1 = e.screenY;
		if (e.target.parentNode) theObj = e.target.parentNode.tagName;
	}
	else
	{
		x1 = window.event.clientX;
		y1 = window.event.clientY;
		theObj = window.event.srcElement.parentElement.tagName;
	}
	var isLink = (theObj == 'A');
	if (flag && (!isLink || ((Math.abs(x-x1) > 10) || (Math.abs(y-y1) > 10))))
	{
		copyAttempt = 1;
		flag = 0;
		alert(msg);
		return false;
	}
}

function clearIt()
{
	flag = 0;
	if (copyAttempt)
	{
		copyAttempt = 0;
		return false;
	}
}
onload=init;

// var NewWin=null;
// function showFoto(titel,image,imgalt,theTop,theLeft,theWidth,theHeight){
// if (NewWin)
// if (!NewWin.closed)
// NewWin.close();
// NewWin= open('','_blank',"top="+theTop+",left="+theLeft+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+theWidth+",height="+theHeight);
// NewWin.document.open();
// NewWin.document.writeln('<html><head><title>'+titel+'</title>');
// NewWin.document.writeln('<meta http-equiv="imagetoolbar" content="no">');
// NewWin.document.writeln('</script></head><body>');
// NewWin.document.writeln('<center><img src="'+image+'" alt="'+imgalt+'" border="0"></center></body></html>');
// NewWin.document.close();
// }
// // 
// // function to hide addresses from spam harvesting robots.
// // note "mailto" is in hex, and we reverse the parameters.
// // 
// function show_addr(ext,domain,user)
// {
// document.write('<a href="');
// document.write('&#109;&#97;&#105;&#108;&#116;&#111;');
// document.write(':');
// document.write(user);
// document.write('&#64;');
// document.write(domain);
// document.write('.');
// document.write(ext); 
// document.write('">'); 
// //
// // use the address as the visible text
// //
// document.write(user);
// document.write('&#064;');
// document.write(domain);
// document.write('.');
// document.write(ext); 
// document.write('<\/a>');
// }

