<script LANGUAGE="JavaScript">
<!--DocOzone's Javascript code,
copyright 1997
window.onerror = null;
var netscape = 0;
var goodIE = 0;
browserName = navigator.
appName.substring(0,8);
browserVer = parseFloat
(navigator.appVersion);
if (browserName == "Netscape"
&& browserVer >= 3)
{ netscape = 1; }
if (browserName == "Microsof"
&& browserVer >= 3.01)
{ goodIE = 1; }
if (netscape || goodIE) {
|
This part of
the code contains information how the Browsers will "react" to the
script and of course the copyright and credit lines to
DocOzone.
|
menu = new Array(6);
standard = new Array(6);
over = new Array(6);
|
This is where you tell
the script how many images you use in the remote. (just the
off-images)
I use 6 in my remote
|
standard[0] = new Image;
standard[1] = new Image;
standard[2] = new Image;
standard[3] = new Image;
standard[4] = new Image;
standard[5] = new Image;
|
to load the off images
(always start with 0)
|
over[0] = new Image;
over[1] = new Image;
over[2] = new Image;
over[3] = new Image;
over[4] = new Image;
over[5] = new Image;
|
to load the over
images....
|
menu[0] = new Image;
menu[1] = new Image;
menu[2] = new Image;
menu[3] = new Image;
menu[4] = new Image;
menu[5] = new Image;
|
...and the images that'll
show up in the screen
|
standard[0].src = "rem/but1off.jpg";
standard[1].src = "rem/middle.jpg";
standard[2].src = "rem/but2off.jpg";
standard[3].src = "rem/botleft.jpg";
standard[4].src = "rem/screen.jpg";
standard[5].src = "rem/botright.jpg";
|
here's the image source
for the off images
|
over[0].src = "rem/but1on.jpg";
over[1].src = "rem/middle.jpg";
over[2].src = "rem/but2on.jpg";
over[3].src = "rem/botleft.jpg";
over[4].src = "rem/screen.jpg";
over[5].src = "rem/botright.jpg";
|
here's the image source
for the on images
|
menu[0].src = "rem/text1.jpg";
menu[1].src = "rem/screen.jpg";
menu[2].src = "rem/text2.jpg";
menu[3].src = "rem/screen.jpg";
menu[4].src = "rem/screen.jpg";
menu[5].src = "rem/screen.jpg";
|
...and this is for the
screen images. When you move the mouse over button 1 (over[0]) it
will change the screen in menu [0]
|
}
function msover(num) {
if (netscape || goodIE) {
document.images[num].src = over[num].src;
document.images[4].src = menu[num].src; } }
function msout(num) {
if (netscape || goodIE) {
document.images[num].src = standard[num].src;
document.images[4].src = menu[4].src; } }
function preload() {
if (netscape || goodIE) {
}}
// -->
</script>
|
Here, you define which
image to be switched when you move the mouse over a certain button,
and as you can see it's image number 5 if you count the images from
topleft to bottom right. But since the script starts at 0, the
number will be 4
|