function clickIE4(){
    if (event.button==2){
    alert(message);
    return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

function simpleAlert(e){
    if (!e) var e = window.event;
    var isDrag = (e.type=="dragstart" || e.type=="drag" );
    if( isDrag && !isTargetImg(e) ){}
    else { 
        alert(message);return false;
    }
}

if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
            document.onmousedown=clickIE4;
     }
     
function isTargetImg(e){
    var targ;
    if (!e) var e = window.event;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
        targ = targ.parentNode;
    return ( targ.nodeName=="IMG");
}

function t1(e){

    if( isTargetImg(e) ) {
         if (e.preventDefault) { e.preventDefault();}
    //  e.cancelBubble = true;
    //  if (e.stopPropagation) e.stopPropagation();
        return false;
    }
}
if(document.captureEvents){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=t1;
}
else document.onmousedown ="if (event.preventDefault) {event.preventDefault(); }"


document.ondragstart        = simpleAlert;
document.ondrag             = simpleAlert;
/*document.oncontextmenu      = simpleAlert;*/

/*
document.oncontextmenu = new Function("alert(message);return false")
document.ondragstart = new Function("alert(message);return false")
document.ondrag  = new Function("alert(message);return false")
*/
