/[drupal]/contributions/themes/adc/rollup.js
ViewVC logotype

Contents of /contributions/themes/adc/rollup.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Sat Apr 5 16:31:02 2003 UTC (6 years, 7 months ago) by almaw
Branch: MAIN
CVS Tags: HEAD
Branch point for: drop, DRUPAL-4-1, DRUPAL-4-2, DRUPAL-4-4, DRUPAL-4-5, DRUPAL-4-6, DRUPAL-4-7
File MIME type: text/javascript
Initial commit of my JavaScript block rollup theme.
1 NS4=IE4=IE5=IE=NS6=0;NS=1;doc=document;ly=null;
2 if (doc.layers) {NS4=1;ly=doc.layers;}
3 else if (doc.all) {IE=1;NS=0;ly=doc.all; IE5=(doc.recalc)?1:0; IE4=1-IE5; }
4 else {NS6=1; ly=doc.getElementsByTagName("*");}
5 win=window;
6
7 function newImage(arg) {
8 if (document.images) {
9 rslt = new Image();
10 rslt.src = arg;
11 return rslt;
12 }
13 }
14
15 function swapImage(arg, over)
16 {
17 if (document.images && (preloadFlag == true))
18 {
19 var divname = 'box' + arg;
20 var imgname = 'link' + arg;
21 var img = ly[imgname];
22 var div = (NS4)?ly[divname]:ly[divname].style;
23 if (over)
24 {
25 if (div.display == "none")
26 img.src = "themes/adc/plus-over.gif";
27 else
28 img.src = "themes/adc/minus-over.gif";
29 }
30 else
31 {
32 if (div.display == "none")
33 img.src = "themes/adc/plus.gif";
34 else
35 img.src = "themes/adc/minus.gif";
36 }
37 }
38 }
39
40 var preloadFlag = false;
41 function preloadImages() {
42 if (document.images) {
43 plusImgLoader = newImage("themes/adc/plus.gif");
44 plusImgOverLoader = newImage("themes/adc/plus-over.gif");
45 minusImgLoader = newImage("themes/adc/minus.gif");
46 minusImgOverLoader = newImage("themes/adc/minus-over.gif");
47 preloadFlag = true;
48 }
49 }
50
51 function toggle(arg)
52 {
53 if (document.images && (preloadFlag == true))
54 {
55 var divname = 'box' + arg;
56 var imgname = 'link' + arg;
57 var img = ly[imgname];
58 var div = (NS4)?ly[divname]:ly[divname].style;
59 if (div.display != "none")
60 {
61 div.display = "none";
62 img.src = "themes/adc/plus.gif";
63 }
64 else
65 {
66 div.display = "block";
67 img.src = "themes/adc/minus.gif";
68 }
69 }
70 }
71

  ViewVC Help
Powered by ViewVC 1.1.2