/*
Script: Image Rollovers

Created on: April 12/2000
Created by; Chris Jones(chris@nkaos.com) & Paul Kalupnieks(paulk@nkaos.com).

Description: Changes the source of a given image to an on state and then back again.
			 The functions accept one parameted, the numeric value of that image in
			 the refname array.
			 
Compatibility: Javascript 1.0, Netscape 3.0+, Internet Explorer 4.0+
*/

var itsgood = document.images;
var off = new Array(); // defines an array for off iamges
var on = new Array(); // edfines an array for on images
var imagePath = "/home.nsf/vRTF/nav/$file/"; // this points to the directory where your nav images are

/* 
The refname array is used to build the on and off arrays.
For every image that will be a rollover, the has to be a name value in the tag.. like so
<img src="../images/howto.gif" width=119 height=25 border=0 alt="" NAME="howto">

To make the script more usable make all of the rollover images use this format
offimage = howto.gif
onimage  = howto_ov.gif

and give the image name value 'howto'
*/
refname = new Array(12);
refname[0] = "aboutTDSec";
refname[1] = "equityResearch";
refname[2] = "currencyCredit";
refname[3] = "foreignExchange";
refname[4] = "bondDesk";
refname[5] = "merchantBanking";
refname[6] = "careers";
refname[7] = "contactUs";
refname[8] = "siteMap";
refname[9] = "home";
refname[10] = "search";
refname[11] = "HighYield";

for(j=0;j<refname.length;j++){
	if (itsgood){ 
		off[j] = new Image();
		off[j].src = imagePath + refname[j] + '.gif';
		on[j] = new Image();
		on[j].src = imagePath + refname[j] + '_o.gif';
	}
}

// these are the funcitons that actually execute the the rollovers
// msover is for the oMouseover event, and msout is for the onMouseout event
function msover(number) {
	if (itsgood){
		var name=refname[number];
		document.images[name].src = on[number].src;
	}
}
		
function msout(number) {
	if (itsgood){
		var name=refname[number];
		document.images[name].src = off[number].src;
	}
}