If having your content stolen is of legitimate concern to you, I hate to say it, but putting your content on the Web might not be the best idea...
Perhaps if you provided low-resolution samples of your art and excerpts of your book, you could then sell access to the genuine articles.
Unfortunately, although he didn't put it very diplomatically, goober has a point. The way the Web works, there is no secure way to make something available without allowing people to use it themselves. Anti-rightclick scripts and referrer checks will work on the surface, but anyone who really wants something from your site can just switch off their JavaScript at a convenient moment, use their browser's view-source command (or use a view-source: URL), or just copy it out of their browser's cache.
Here at SitePoint our content is our livelihood, but despite the fact that we have no safeguards against the pilfering of that content, we have only ever had to deal with one case of content theft.
A clearly-stated copyright notice is as big a deterrent as a crippling script. Such safeguards actually only tend to encourage thieves, who like to feel like they've outsmarted you by circumventing such measures.
Now, all that said, I'm still willing to answer your original question. 
In your frameset page, you can include code something like this:
Code:
<script language="JavaScript">
<!--
var copyProtection = "ok";
//-->
</script>
Then, in any of your documents that should always be loaded in that frameset, you can add the following:
Code:
<script language="JavaScript">
<!--
if (top.copyProtection!="ok") {
location = "errorpage.html";
}
//-->
</script>
Where 'errorpage.html' is the page you'd like to display when someone attempts to display the document outside your frameset. Don't make the message too unfriendly, because it could result from something as innocent as a "open link in new window" command.
prevention is better than cure
You're quoting out of context. That saying's meaning is roughly equivalent to "it's better to take vitamins to stay healthy than it is to have to get over a cold." Prevention in this case would be not putting your valuable content online so that you didn't have to pursue people who stole it (the cure). I'm afraid the above script is only a placebo. Anyone who wanted to use your content out of context could just put that variable on their own page.
Bookmarks