window| Menu | Web page
Make a pop-up menu similar to the window's right button.
The code is as follows:
var obj;
function Loadobj (o)
{
Obj=o;
}
function expand ()
{
var h=parseint (obj.height);
var w=parseint (obj.width);
var op=10;
if (h<=170)
{
if (w<60)
obj.style.width=w+6;
obj.style.height=h+17;
X=settimeout (' expand () ', 25);
}
Else
{
obj.style.width=60;
obj.style.height=174;
Cleartimeout (x);
}
}
var drag=0;
var move=0;
function Dblclick ()
{
if (event.button==0)
{
obj.style.visibility= "visible";
Obj.style.left=window.event.x;
Obj.style.top =window.event.y;
obj.style.width=0;
obj.style.height=0;
Obj.filters.item (0). apply ();
Obj.filters.item (0). Transition = 25;
Obj.filters (0). Play (0.5);
expand ();
}
}
function MouseMove ()
{
if (move==1)
{
Obj.style.cursor= "Move";
Obj.style.left=window.event.x-l;
Obj.style.top=window.event.y-t;
}
}
function MouseDown ()
{
if (drag)
{
L = window.event.x-parseint (obj.style.left);
t = window.event.y-parseint (obj.style.top);
Obj.style.zindex+=1;
move=1;
}
Else
{
Document.body.style.cursor= ' Default ';
obj.style.visibility= ' hidden ';
}
}
function Mousestop ()
{
Window.event.returnvalue=false;
}
function MouseUp ()
{
move=0;
Obj.style.cursor= "Hand";
}
Document.ondblclick=dblclick;
Document.onmousedown=mousedown;
Document.onmousemove=mousemove;
Document.ondragstart=mousestop;
Document.onmouseup=mouseup;