<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
?>
<script language="JavaScript">
var message="Sorry, deze functie is uitgeschakeld.\n© 2009-2010\nNiets van deze site mag worden gekopieerd zonder voorafgaande schiftelijke toestemming.";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</script>
<?php
}else{
?>
<script>
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
</script>
<?php
}
?>
<script language="JavaScript1.2">
function disabletextselect(i){
return false
}
function renabletextselect(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6+
if (window.sidebar){
document.onmousedown=disabletextselect
document.onclick=renabletextselect
}
</script>