home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
212.85.102.23
/
2014.12.212.85.102.23.tar
/
212.85.102.23
/
5d2.rar
/
SOFTWARE
/
PR2
/
pr.cab
/
tut.js
< prev
next >
Wrap
Text File
|
2003-09-03
|
1KB
|
48 lines
// active nav item
var activeRollover = "";
var arrRollovers = new Array();
// main nav items
addRollover ("welcome");
addRollover ("fetch");
addRollover ("printer");
addRollover ("paper");
addRollover ("theme");
addRollover ("print");
addRollover ("end");
// bottom nav items
addRollover ("nav_back");
addRollover ("nav_forward");
function Rollover (name) {
this.name = name;
this.normal = new Image();
this.over = new Image();
this.active = new Image();
this.normal.src = "../img/" + name + "_n.gif";
this.over.src = "../img/" + name + "_o.gif";
this.active.src = "../img/" + name + "_a.gif";
}
function addRollover (name) {
arrRollovers[name] = arrRollovers[arrRollovers.length] = new Rollover (name);
}
function over (name) {
if (document.images && name != activeRollover)
document.images[name].src = arrRollovers[name].over.src;
}
function out (name) {
if (document.images && name != activeRollover)
document.images[name].src = arrRollovers[name].normal.src;
}
function init(template_name) {
activeRollover = template_name;
document.body.scroll="no";
if (document.images)
document.images[activeRollover].src = arrRollovers[activeRollover].active.src;
}