//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="Function Disabled!";

///////////////////////////////////
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("return(false);"); //new Function("alert(message);return false")
*/


//init function exec onload
/*function fnInit(){
	if (document.layers) {
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown=fnHandleClickNS;
	} else {
		document.onmouseup=fnHandleClickIE;
	}
	document.oncontextmenu=new Function("return false");
	document.onselectstart=new Function ("return false");
}

var strUA = navigator.userAgent.toLowerCase();
var isIE = (navigator.appVersion.indexOf("msie") != -1) ? true : false;
var isMac = (navigator.appVersion.indexOf("mac") != -1) ? true : false;

//disable right-click functions
var message="";
function fnHandleClickIE(){
	if (isIE && (event.button > 1)) {
		event.cancelBubble = true;
		event.returnValue = false;
	}
}
function fnHandleClickNS(e) {
	if (document.layers || ( document.getElementById && !document.all) ) {
		if (e.which==2||e.which==3) {(message);return false;}
	}
}

fnInit();
*/
function trapclick(){
	if(document.images){
		for(i=0;i<document.images.length;i++) {
			document.images[i].onmousedown = right;
			document.images[i].onmouseup = right; 
		}
	}
}


function right(e) {
	var msg = "This function has been disabled.";

	if (navigator.appName == 'Netscape' && e.which == 3) {
		alert(msg);
	return false;
	}

	if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
		alert(msg);
	return false;
	}
	else return true;
}