var message="Sorry, you do not have permission to right click on this page.";
var isnn, isie;

if (navigator.appName=='Microsoft Internet Explorer'){
	isie=true;
}

if(navigator.appName=='Netscape'){
	isnn=true;
}

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;
		}
	}
}

function key(k){
	if(isie) {
		if(event.keyCode==17 || event.keyCode==93) {
			alert("Sorry, you do not have permission to press this key.") ;
			return false;
		 } 
	}
	if(isnn){
		if(k.ctrlKey){
			alert("Sorry, you do not have permission to press this key.");
			return false;
		} 
	}   
}


if (document.layers){
	window.captureEvents(Event.KEYPRESS);
	document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
	document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false");
document.onkeydown=key;
