leftree.js
3.14 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*left-js*/
function showsubmenu(sid)
{
var whichEl = document.getElementById("submenu" + sid);
var subm=document.getElementById("showmenu"+sid);
if (whichEl.style.display !== "block")
{
whichEl.style.display = "block";
subm.style.backgroundImage='url(images/left_tt.gif)';
}
else
{
whichEl.style.display = "none";
subm.style.backgroundImage='url(images/left_t.gif)';
}
}
function showtwomenu(num)
{
if(num !== null)
{
var whichE = document.getElementById("twomenu" + num).style.display;
var contents = document.getElementById("twomenu" + num).id;
var subm=document.getElementById("shtmu"+num);
if (whichE !== "block")
{
document.getElementById("twomenu" + num).style.display="block";
document.getElementById('shtmu' + num).className = "twomenu";
subm.className="showmu1";
}
else
{
document.getElementById("twomenu" + num).style.display="none";
document.getElementById('shtmu' + num).className = "twomenu_on";
subm.className="showmu2";
}
}else
{
return;
}
}
/*չ���˵�*/
function openmenu()
{
var act=document.getElementsByTagName("active");
var divFF = document.getElementsByTagName("li");
for (i=0; i<divFF.length; i++)
{
if(divFF[i].className == "active" || divFF[i].className == " active")
{
divFF[i].parentNode.parentNode.parentNode.style.display="block";
divFF[i].parentNode.parentNode.style.display="block";
divFF[i].parentNode.style.display="block";
divFF[i].style.backgroundColor = "#3ba4f5";
divFF[i].firstChild.style.color='#ffffff';
}
if(divFF[i].className == "showmu1 active")
{
divFF[i].parentNode.style.display="block";
divFF[i].style.background = "none";
divFF[i].style.backgroundColor = "#3ba4f5";
divFF[i].firstChild.style.color='#ffffff';
}
}
}
/*main*/
var highlightcolor='#c1ebff';
//�˴�clickcolorֻ����winϵͳ��ɫ������ܳɹ�,�����#xxxxxx�Ĵ���Ͳ���,��û�����Ϊʲô:(
var clickcolor='#51b2f6';
function changeto(){
source=event.srcElement;
if (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs = source.children;
//alert(cs.length);
if (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor=highlightcolor;
}
}
function changeback(){
if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
return
if (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor="";
}
}
function clickto(){
source=event.srcElement;
if (source.tagName=="TR"||source.tagName=="TABLE")
return;
while(source.tagName!="TD")
source=source.parentElement;
source=source.parentElement;
cs = source.children;
//alert(cs.length);
if (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor=clickcolor;
}
else
for(i=0;i<cs.length;i++){
cs[i].style.backgroundColor="";
}
}