function onpageload()
{
    function disableSelection(target){
        if (typeof target.onselectstart!="undefined")
            target.onselectstart=function(){return false}
        else if (typeof target.style.MozUserSelect!="undefined")
            target.style.MozUserSelect="none"
        else
            target.onmousedown=function(){return false}
        target.style.cursor = "default"
    }

    var message="Sorry, this function is disabled.\nAll Rights Reserved."; 
    function click(e) {
        if (event.button == 2 || event.button == 3) {
            alert(message);
            return false;
        }
    }

    document.onmousedown=click;
    disableSelection(document.body);
}

function printpage() 
{
  window.print();
}
