-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile2html.js
64 lines (62 loc) · 1.38 KB
/
profile2html.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
function ToggleChildren(n)
{
var cs = n.parentNode.childNodes;
for (var i=0;i<cs.length;i++)
{
var c=cs.item(i);
if (c.nodeType==1)
{
if (c.className=='xmlverb-element-container' || c.className=='xmlverb-text' || c.nodeName=='BR')
{
if (c.style.display=='none')
{
n.firstChild.nodeValue=String.fromCharCode(8211);
c.style.display='inline';
}
else
{
n.firstChild.nodeValue='+';
c.style.display='none';
}
}
}
}
}
function ToggleUpId(id)
{
var n;
n = document.getElementById(id);
if (n == null)
{
var c = document.getElementsByName(id);
for (n in c)
{
ToggleUp(n);
}
}
else
{
ToggleUp(n);
}
}
function ToggleUp(n)
{
if (n.parentNode!=null)
{
var cs = n.parentNode.childNodes;
for (var i=0;i<cs.length;i++)
{
var c=cs.item(i);
if (c.nodeType==1)
{
if (c.className=='xmlverb-element-container' || c.className=='xmlverb-text' || c.nodeName=='BR')
{
n.firstChild.nodeValue=String.fromCharCode(8211);
c.style.display='inline';
}
}
}
var p = n.parentNode;
if (p!=null) {ToggleUp(p);}
}
}