//NoPrint/NoCopy Script
//Currently works with Blackboard Basic Version 6.3, FireFox 3.0, IE 8.0
//This script disables the right mouse button
//and the ctrl and alt keys

function IE(e) 
//traps right-click in IE
{
     if (navigator.appName == "Microsoft Internet Explorer" && (event.button == "2" || event.button == "3"))
     {
	  	alert("No right-click");		 
        return false;
     } 
}
function NS(e) 
//traps right-click in Netscape/firefox, et al
{
     if (document.layers || (document.getElementById && !document.all))
     {
          if (e.which == "2" || e.which == "3")
          {
			  	alert("No right-click");
                return false;
          }
     }
}

function handlePress(e) {
//traps ctrl and alt keys
  var evtobj=window.event? event : e;
  if (evtobj.ctrlKey || evtobj.altKey) {
	  alert("Can't use Ctrl or alt Key");
	return false;
  }
}

//added Jan 10, 2007 to stop text selection in Firefox
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
	target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
	target.style.MozUserSelect="none"
else //All other route (ie: Opera)
	target.onmousedown=function(){return false}
target.style.cursor = "default"
}


disableSelection(document.body)


document.onselectstart=new Function('return false');function ds(e){return false;}function ra(){return true;}document.onmousedown=ds;document.onclick=ra;

document.onmousedown=IE;
document.onmouseup=NS;
document.oncontextmenu=new Function("return false");
document.onkeydown=handlePress;
