aboutsummaryrefslogtreecommitdiffstats
path: root/src/documentation/stylesheets/script-cli.js
blob: 580dd4a1ba1bca94bea1433127cce326b2e95226 (plain)
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
rolloverImagesOn=new Array();
rolloverImagesOff=new Array();

function rolloverOn(name) {
  if(document.images[name] && rolloverImagesOn[name]) document.images[name].src=rolloverImagesOn[name].src;
}

function rolloverOff(name) {
 if(document.images[name] && rolloverImagesOff[name]) document.images[name].src=rolloverImagesOff[name].src;
}


function rolloverLoad(name,on,off) {
  rolloverImagesOn[name]=new Image();
  rolloverImagesOn[name].src=mangle(on);
  rolloverImagesOff[name]=new Image();
  rolloverImagesOff[name].src=mangle(off);
}

function mangle(name) {

  name = name.replace(/:/g, "_");
  name = name.replace(/\?/g, "_");
  name = name.replace(/\"/g, "\'");

  return name;
}