JavaScript 右クリックを禁止する

[WEB][JavaScript 右クリックを禁止する]
<script language="JavaScript">
<!--
function Click(e){
    if(document.all){
        if(event.button == 2){
            alert("右クリック禁止");
            return false;
        }
    }else if(document.layers || document.getElementById){
        if(e.which == 3){
            alert("右クリック禁止");
            return false;
        }
    }
}

if(document.all){
    document.onmousedown = Click;
}else if(document.layers || document.getElementById){
    window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown = Click;
}
//-->
</script>