//Get browser name

var nav=navigator.appName;



//Determine whether browser is Internet Explorer or Netscape

var ie=(nav.indexOf("Microsoft")!=-1);

var ns=(nav.indexOf("Netscape")!=-1);



//Disables right click in IE

function nrcIE(){return false;}



//Disables right click in NS versions 4 and up

function nrcNS(e){



//Check if mouse button pressed is the right one

if(e.which==2 || e.which==3){

return false;

}

 }



//If browser is IE, set the right click event to don't show the context menu when clicking

if(ie){

document.oncontextmenu=nrcIE;

}



//If browser is NS4, capture the right click event and set it to don't show the context menu when clicking

if(ns){

if(document.layers){

document.captureEvents(Event.MOUSEDOWN);

document.onmousedown=nrcNS;

}



//If browser is NS6 capture the right click event and set it to don't show the context menu when clicking

if(document.getElementById){document.onmouseup=nrcNS;}}



//Disable drag & drop

document.ondragstart=new Function("return false;");




