Don't do that. If you're block right-clicks, you're just asking for someone to disable javascript especially for your website (and / or go find a better site). It won't stop anyone from stealing anything, and instead will just make people who wanted to right-click for a different reason less likely to like your site.
Just add a warning. Your average visitor is not a thief, and doesn't want to be treated as one.
(Check out
http://www.sitepoint.com/article/dont-disable-right-click )
You can, of course, achieve the effect by placing the following inside head tags
Code:
<script language="JavaScript1.1">
// distributed by http://www,hypergurl.com
<!-- var debug = true;
function right(e)
{
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
alert('This Page is fully protected!');
return false;
}
return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;
//--></script>