1 | /*
|
---|
2 | function openWindow(url) {
|
---|
3 |
|
---|
4 | window.open(url,"berry","width=400,height=300,toolbar=no");
|
---|
5 |
|
---|
6 | }
|
---|
7 | */
|
---|
8 |
|
---|
9 | var parenttbody = new Array();
|
---|
10 | var tbody = new Array();
|
---|
11 | var aftertbody = new Array();
|
---|
12 |
|
---|
13 |
|
---|
14 | function showTBodyArea(category) {
|
---|
15 | console.log("In showTBodyArea");
|
---|
16 |
|
---|
17 | parenttbody[category].insertBefore(tbody[category],aftertbody[category]);
|
---|
18 | //document[category+"openclose"].src="_httpopenmdicon_";
|
---|
19 |
|
---|
20 | var imgname = category+"openclose";
|
---|
21 | var linkname = category+"opencloselink";
|
---|
22 |
|
---|
23 | var imgel = document.getElementById(imgname);
|
---|
24 | //imgel.setAttribute("src","sites/localsite/collect/lomdemo-e/images/open.gif");
|
---|
25 | imgel.setAttribute("src",imgel.getAttribute("data-img-path")+"open.gif");
|
---|
26 |
|
---|
27 | var linkel = document.getElementById(linkname);
|
---|
28 | linkel.setAttribute("href","javascript:hideTBodyArea('"+category+"')");
|
---|
29 |
|
---|
30 | //document.links[category+"opencloselink"].href
|
---|
31 | // ="javascript:hideTBodyArea('"+category+"')";
|
---|
32 | }
|
---|
33 |
|
---|
34 | function hideTBodyArea(category) {
|
---|
35 | console.log("In hideTBodyArea");
|
---|
36 | tbody[category] = document.getElementById(category);
|
---|
37 | parenttbody[category] = tbody[category].parentNode;
|
---|
38 | aftertbody[category] = tbody[category].nextSibling;
|
---|
39 | parenttbody[category].removeChild(tbody[category]);
|
---|
40 |
|
---|
41 | var imgname = category+"openclose";
|
---|
42 | var linkname = category+"opencloselink";
|
---|
43 |
|
---|
44 | // alert("document link lookup 3 = " + document.links[linkname]);
|
---|
45 |
|
---|
46 | var imgel = document.getElementById(imgname);
|
---|
47 | //imgel.setAttribute("src","sites/localsite/collect/lomdemo-e/images/close.gif");
|
---|
48 | imgel.setAttribute("src",imgel.getAttribute("data-img-path")+"close.gif");
|
---|
49 |
|
---|
50 | // document[category+"openclose"].src="_httpclosemdicon_";
|
---|
51 |
|
---|
52 | var linkel = document.getElementById(linkname);
|
---|
53 | linkel.setAttribute("href","javascript:showTBodyArea('"+category+"')");
|
---|
54 |
|
---|
55 | //document.links[category+"opencloselink"].href
|
---|
56 | // ="javascript:showTBodyArea('"+category+"')";
|
---|
57 | }
|
---|
58 |
|
---|