// JavaScript Document
// Common functions

function rclick() {
    if (document.images) {
    	for(i=0;i<document.images.length;i++) {
		    if (document.images[i].name=='protect') {
		        document.images[i].onmousedown = click;
                }			    
		    }
	    }
    }
    
function click(e) {

    // blocks right-click but not left (in MSIE & Netscape). Adapted from http://www.rgagnon.com/jsdetails/js-0061.html
    
    if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
        alert("Sorry, this image is protected");
        return false;
        }
    else {
        if (navigator.appName == 'Netscape' && e.which == 3) {
            alert("Sorry, this image is protected");
            return false;
            }
        }            
   return true;
}

function nospam(user, domain, name) {
    document.write('<a href=\"mailto:' + user + '@' + domain + '\">');
    document.write(name + '</a>');
}

