Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
36 lines (34 sloc)
939 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Handles rollover images for NN3+ and IE4+ | |
| var loaded = new Array(); | |
| function F_loadRollover(image,imageName) { | |
| if (image && image.src && | |
| (null == image.out || typeof(image.out) == typeof(void(0)))) { | |
| s = image.src; | |
| image.out = new Image(); | |
| image.out.src = s; | |
| image.over = new Image(); | |
| if (imageName.lastIndexOf('/') >= 0 || imageName.lastIndexOf('\\') >= 0) { | |
| s = imageName; | |
| } else { | |
| i = s.lastIndexOf('/'); | |
| if (i<0) i = s.lastIndexOf('\\'); | |
| if (i<0) { s = imageName; } | |
| else { s = s.substring(0,i+1) + imageName; } | |
| } | |
| image.over.src = s; | |
| loaded[image.name] = image; | |
| } | |
| } | |
| function F_roll(imageName,over) { | |
| if (document.images) { | |
| if (over) { imageObject = "over"; } | |
| else { imageObject = "out"; } | |
| image = loaded[imageName]; | |
| if (image) { | |
| ref = eval("image."+imageObject); | |
| if (ref) image.src = eval("image."+imageObject+".src"); | |
| } | |
| if (window.event) | |
| window.event.cancelBubble = true; | |
| } | |
| } | |