The code for bookmarking a website and disabling right click

Hey guys whats the java code to disable right click on a site so people cant steal my work and such. ANd also whats the java code for bookmarking as a link?

Right, firstly here is the js for 'no-right-click':

..and the for the 'bookmark site' I have just copied from one of my past websites, (http://www.xeophex.com/new/ (one of the rollover buttons in the top right of layout) so just change what doesn't apply to you, such as all the image src if you want it as a text link etc.

But, if you want my opinion, I, along with a lot of other people, no doubt, find that disabling right click quite frustrating. I think it makes the user seem arrogant and paranoid to be honest. After all, all images on your site are cached on the visitors hdd and there are many other easy ways to save the images if someone did want to do it... so why bother.
As for 'bookmark-this-site', again, it is kinda annoying and superfluous. If the visitor wanted to add it to their bookmarks, then I'm sure they are perfectly capable of doing so. Remember; chucking in extra code effects/useless dhtml or js doesn't make a better website. Anyway, do what you will. ;)

This is not related to GfxDiary as a website :)

Topic moved!

I don't advise you to use this sripts - very irritating. But if you do:
no right click

var message="some text";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

bookmark

2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date();
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
}
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);

if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
window.external.AddFavorite (url,title);
}
else {
var msg = "Don't forget to bookmark us!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
alert(msg);
}
}
else {
count++;
SetCookie('count', count, exp);
}
}
checkCount();
// End -->