I have a better one, but just to let you know, these run on Javascript and all someone has to do is disable Javascript for that code not to work. There are SEVERAL ways to go about viewing the source. If you are worried that people will steal images, this is what I do. I put a clear image over the real image so that when people right click and want to save the image they save a clear JPG instead of the actual photo. ;)
Just change the part that talks about my site to your own words.
<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Original: Martin Webb (
[email protected]) -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
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("All content contained herein is the sole property of Romping Ratties Rattery and may not be used without prior written consent from the owner ©2002-2003 ");
return false;
}
return true;
}
document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
// End -->
</script>