Of course, since it is JavaScript, it doesn't work if the visitor has JavaScript disabled or has a browser that doesn't support JavaScript.
That isn't very many users, but anyone with some experience would know a way around this trick.
It will stop new users, and at least make it harder for everyone else. That may be all the discouragement they need to move on to easier pickins.
Image Copying Deterrent
Nothing will stop someone from stealing your images if they are
determined,
but you can make it as difficult as possible and thwart
the majority of would-be thieves.
Instead of just placing an image on
your page, place it inside a special span tag, like this:
<.span oncontextmenu="return false;"
ondragstart="return false"><.img src="picture.jpg"><./span>
If they right click to copy or save your image when it's coded like
this,
or if they try to drag and drop it to save it, they won't have
any
luck in about 95% of the browsers in use.
From Boogie Jack's Almost a Newsletter - September 15,2002
http://www.boogiejack.com/
http://www.boogiejack.com/sitemap.html