﻿//////for rught click
function right(e) {
    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
        return false;        
    }else if (navigator.appName == 'Microsoft Internet Explorer' &&  (event.button == 2 || event.button == 3)) {
        alert("Sorry, you do not have permission to right click.");
        return false;
    }
    return true;
}
function rightDown(e) {
    disabletext(e);
    if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
        return false;        
    }else if (navigator.appName == 'Microsoft Internet Explorer' &&  (event.button == 2 || event.button == 3)) {
        alert("Sorry, you do not have permission to right click.");
        return false;
    }
    return true;
}
/*
document.onmousedown=rightDown;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
*/

///for selection

function disabletext(e){
    return false
}

function reEnable(){
return true
}

//if the browser is IE4+
//document.onselectstart=new Function ("return false")

//if the browser is NS6
if (window.sidebar){
//document.onmousedown=disabletext
    document.onclick=reEnable
}




