/*
   Milonic DHTML Menu Context/Right Click Menu Module contextmenu.js version 1.1
   This module is only compatible with the Milonic DHTML Menu version 5.16 or higher

   Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
   This is a commercial software product, please visit http://www.milonic.com/ for more information.
*/

contextDisabled=false;
contextMenu="contextMenu";

function rclick(e){
	if(contextDisabled)
	{
		_d.oncontextmenu=null
		return true;
	}
	if(_d.all)ev=event.button; else ev=e.which
	if(ev==2||ev==3){
		_gm=getMenuByName(contextMenu)
		if(_gm!=null)popup(contextMenu,1)
		return false
	}
	else{
		//if(ev==1)closeAllMenus();
	}
	return true;
}

if(ns4){
	_d.captureEvents(Event.MOUSEDOWN);
	_d.onmousedown=rclick;
}
else{
	_d.onmouseup=rclick
	_d.oncontextmenu=new Function("return false")
}