change the menu

  
Hi,

I want to change the default menu of the right click of the mouse. I have pasted the fellowing code in JavaScript, and set the oncontextmenu=showmenuie5(). But it seems not work. Will you please have a look on it, thank you.

//hide the default menu
document.body.onclick = hidemenuie5;
function hidemenuie5() {
    ie5menu.style.visibility = "hidden";
}

//the new menu
function showmenuie5() {
   

    var rightedge = document.body.clientWidth-event.clientX;
    var bottomedge = document.body.clientHeight-event.clientY;
   
    if (rightedge < ie5menu.offsetWidth)
        ie5menu.style.left = document.body.scrollLeft + event.clientX -
        ie5menu.offsetWidth;
    else
        ie5menu.style.left = document.body.scrollLeft + event.clientX;
    if (bottomedge < ie5menu.offsetHeight)
        ie5menu.style.top = document.body.scrollTop + event.clientY -
        ie5menu.offsetHeight;
    else
        ie5menu.style.top = document.body.scrollTop + event.clientY;
         
    ie5menu.style.visibility = "visible";
    ie5menu.className = menuskin;

    window.event.returnValue=false;
}


<div id="ie5menu" class="skin1" onMouseover="highlightie5()"
onMouseout="lowlightie5()" onclick="handleARs()">
<div id="dist" class="menuitems"></div>
<div id="dupt" class="menuitems"></div>
<div id="dupa" class="menuitems">Duplicate all Opened ARs</div>
</div>