function context(path,menu){
	event.cancelBubble=1;
	if(d.activeContextMenu)contextHide();
	d.activeContextLink=path;
	d.activeContextMenu=menu;
	d.body.appendChild(menu);
	var c=menu.style;
	c.display='block';
	c.top=mouseXY(event)[1];
	c.left=mouseXY(event)[0];
	dAEv('contextmenu,click',contextHide);
	if(path.hasChildren){
		if(path.firstChild.nodeName.toLowerCase()==('textarea'||'input'))path.firstChild.blur();
	}
	window.event.returnValue=false;
}
function context2(path,menu){
	event.cancelBubble=1;
	if(d.activeContextMenu)contextHide();
	d.activeContextLink=path;
	d.activeContextMenu=menu;
	menu.style.display='block';
	var srp=new obj(event.srcElement);
	srp.alignObject(menu,4,1);
	dAEv('contextmenu,click',contextHide);
	if(path.hasChildren){
		if(path.firstChild.nodeName.toLowerCase()==('textarea'||'input'))path.firstChild.blur();
	}
	window.event.returnValue=false;
}
function contextHide(){
	var path=event.srcElement;
	var ac=d.activeContextMenu;
	var sw=1;
	if(event.type=='mousedown'){
		while(path.id){
			if(path==ac){
				sw=0;
				break;
			}
			path=path.parentNode;
		}
	}
	if(sw){
		ac.style.display='none';
		dDEv('contextmenu,click',contextHide);
	}
}
function contextTip(a){
	nodePath(d.activeContextMenu,'\\contextMenuTip').innerText=a;
}