<!--
//JavaScript Banner Ad Rotator version 2.1 - last modified 16 November 2000
//Obtained from http://www.brettb.com/js_banner_ad_rotator.asp

//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder2 = "/images/home"; //Folder name containing the images
var ImageFileNames2 = new Array( 'accreditation.jpg', 'linksforwink2010.jpg', 'makeitwork.jpg',  'connexontario_webchat.jpg', 'justice_book.jpg', 'events.jpg'); //List of images to use
var ImageURLs2 = new Array( '/about_us/accreditation.asp' , '/announcement/linksforwink2010.asp','/makeitwork/default.asp',  '/announcement/connexON.asp', '/docs/home/justice_book.pdf','/events/events.asp'); //List of hyperlinks associated with the list of images
var DefaultURL2 = '/about_us/accreditation.asp'; //Default hyperlink for the Banner Ad
var DisplayInterval2 = 7; //Number of seconds to wait before the next image is displayed
var TargetFrame2 = "_blank"; //Name of the frame to open the hyperlink into


//Internal variables (do not change these unless you know what you are doing)
var IsValidBrowser2 = false;
var BannerAdCode2 = 0;
var BannerAdImages2 = new Array(NumberOfImages2);
var DisplayInterval2 = DisplayInterval2 * 1000;
var NumberOfImages2 = ImageFileNames2.length;

//Add a trailing forward slash to the ImageFolder variable if it does not already have one
if (ImageFolder2.substr(ImageFolder2.length - 1, ImageFolder2.length) != "/" && ImageFolder2 != "") { ImageFolder2 += "/";
}

if (TargetFrame2 == '') {
var FramesObject2 = null;
} else {
var FramesObject2 = eval('parent.' + TargetFrame2);
}

//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 InitialiseBannerAdRotator2() {

//Determine the browser name and version
//The script will only work on Netscape 3+ and Internet Explorer 4+
var BrowserType2 = navigator.appName;
var BrowserVersion2 = parseInt(navigator.appVersion);

if (BrowserType2 == "Netscape" && (BrowserVersion2 >= 3)) {
IsValidBrowser2 = true;
}

if (BrowserType2 == "Microsoft Internet Explorer" && (BrowserVersion2 >= 4)) {
IsValidBrowser2 = true;
}

if (IsValidBrowser2) {
TimerObject2 = setTimeout("ChangeImage2()", DisplayInterval2);
BannerAdCode2 = 0;

for (i = 0; i < NumberOfImages2; i++) {
BannerAdImages2[i] = new Image();
BannerAdImages2[i].src = ' ' + ImageFolder2 + ImageFileNames2[i];
}

}

}

//Function to change the src of the Banner Ad image
function ChangeImage2() {

if (IsValidBrowser2) {
BannerAdCode2 = BannerAdCode2 + 1;

if (BannerAdCode2 == NumberOfImages2) {
BannerAdCode2 = 0;
}

window.document.bannerad2.src = BannerAdImages2[BannerAdCode2].src;
TimerObject2 = setTimeout("ChangeImage2()", DisplayInterval2);
}
}

//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 ChangePage2() {

if (IsValidBrowser2) {

if (TargetFrame2 != '' && (FramesObject2)) {
FramesObject2.location.href = ImageURLs2[BannerAdCode2];
} else {
document.location = ImageURLs2[BannerAdCode2];
}

} else if (!IsValidBrowser2) {
document.location = DefaultURL2;
}

}
// -->

