-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathMenu.js
42 lines (34 loc) · 953 Bytes
/
Menu.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function findObj(n, d) {
var p,i,x;
if(!d) d=document;
if((p=n.indexOf('?'))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n];
for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=findObj(n,d.layers[i].document);
return x;
}
function showmenu(main,menuid) {
obj1=findObj(main);
obj2=findObj(menuid);
if (obj1.style)
obj2=obj2.style;
obj2.top=document.all.menu.offsetTop+20;
obj2.left=obj1.offsetLeft+8;
obj2.visibility='visible';
}
function hidemenu(main,menuid){
obj2=findObj(menuid);
if (obj1.style)
obj2=obj2.style;
obj2.visibility='hidden';
}
function doColor(item) {
item.bgColor = '';
}
function undoColor(item) {
item.bgColor = '';
}