<!--

//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder = "images"; //Folder name containing the images
var ImageFileNames = new Array('price_board_01.gif', 'stockaccelerator_01.gif', 'emailinvestorlists_01.gif', 'rhino_01.gif'); //List of images to use
var ImageURLs = new Array('#','http://www.stockaccelerator.com', 'http://www.emailinvestorlists.com', 'http://www.rhino.ca'); //List of hyperlinks associated with the list of images
var DefaultURL = 'http://www.stockpromotionabcs.com'; //Default hyperlink for the Banner Ad
var DisplayInterval = new Array(3000,6000,6000,6000); //Number of seconds to wait before the next image is displayed
var TargetFrame = ""; //Name of the frame to open the hyperlink into

//Internal variables (do not change these unless you know what you are doing)
var IsValidBrowser = false;
var BannerAdCode = 0;
var BannerAdImages = new Array(NumberOfImages);
//var DisplayInterval = DisplayInterval * 1000;
var NumberOfImages = ImageFileNames.length;
var TimesThrough = 0;

//Add a trailing forward slash to the ImageFolder variable if it does not already have one
if (ImageFolder.substr(ImageFolder.length - 1, ImageFolder.length) != "/" && ImageFolder != "") { ImageFolder += "/";
}

if (TargetFrame == '') {
	var FramesObject = null;
} else {
	var FramesObject = eval('parent.' + TargetFrame);
}

//Function runs when this page has been loaded and does the following:
//1. Determine the browser name and version  (since the script will only work on Netscape 3+ and Internet Explorer 4+).
//2. Start the timer object that will periodically change the image displayed by the Banner Ad.
//3. Preload the images used by the Banner Ad rotator script
function InitialiseBannerAdRotator() {

	//Determine the browser name and version
	//The script will only work on Netscape 3+ and Internet Explorer 4+
	var BrowserType = navigator.appName;
	var BrowserVersion = parseInt(navigator.appVersion);
	
	if (BrowserType == "Netscape" && (BrowserVersion >= 3)) {
		IsValidBrowser = true;
	}
	
	if (BrowserType == "Microsoft Internet Explorer" && (BrowserVersion >= 4)) {
		IsValidBrowser = true;
	}
	
	if (IsValidBrowser) {
		
		BannerAdCode = 0;
		TimerObject = setTimeout("ChangeImage()", DisplayInterval[BannerAdCode]);

			for (i = 0; i < NumberOfImages; i++) {
				
				BannerAdImages[i] = new Image();
				BannerAdImages[i].src = ' ' + ImageFolder + ImageFileNames[i];
			}

		
		
	
	}

}

//Function to change the src of the Banner Ad image
function ChangeImage() {

	if (IsValidBrowser) {
		BannerAdCode = BannerAdCode + 1;
		
		if (BannerAdCode == NumberOfImages) {
			BannerAdCode = 1;
			TimesThrough = 1;
		}
	
		window.document.bannerad.src = BannerAdImages[BannerAdCode].src;
		TimerObject = setTimeout("ChangeImage()", DisplayInterval[BannerAdCode]);
	}
}

//Function to redirect the browser window/frame to a new location,
//depending on which image is currently being displayed by the Banner Ad.
//If Banner Ad is being displayed on an old browser then the DefaultURL is displayed
function ChangePage() {

	if (IsValidBrowser) {
		day = new Date();
		id = day.getTime();
		
		if (ImageURLs[BannerAdCode]!="#") {
			if (TargetFrame != '' && (FramesObject)) {
		
				eval("page" + id + " = window.open(ImageURLs[BannerAdCode], '" + id + "', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=650,height=600,left = 500,top = 300');");
		
			} else {
				eval("page" + id + " = window.open(ImageURLs[BannerAdCode], '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1');");
			}
		}
	
	} else if (!IsValidBrowser) {
		eval("page" + id + " = window.open(DefaultURL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1');");
	}

}
// -->