// JavaScript Document
//JavaScript Banner Ad Rotator version 2.1 - last modified 16 November 2000
//Obtained from http://www.brettb.com/js_banner_ad_rotator.asp
//Email comments or suggestions using the form at http://www.brettb.com/Contact.asp
//If you want a version of this script that will open links in a new browser window
//then please visit http://www.winnershtriangle.com/w/Products.JavaScriptBannerAdRotator.asp

//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder = ""; //Folder name containing the images
var ImgAlt = new Array
var ImageFileNames = new Array
var ImageURLs = new Array
var ImgCnt = 0

ImgCnt=ImgCnt
ImgAlt[ImgCnt]="Select-A-Ticket"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=184611.10000001&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.selectaticket.com/imagesaff/468x60sat01banner.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Music Notes Gift Cards"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=90283.10000056&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.musicnotes.com/images/linkshare/banners/giftpack_468ani.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Music Notes Learn Guitar the Easy Way"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=90283.10000018&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.musicnotes.com/images/linkshare/banners/gg_banner.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Music Notes What can 40,000 songs do for your guitar?"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=90283.10000034&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.musicnotes.com/images/linkshare/banners/mn_guitartab_banner_ns.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Total Sheet Music"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=162345.10000006&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.alfred.com/images/TSM_Banners/TSM_468x60.jpg"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Vacations under $500"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10001495&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10001495&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Book Package Save Big"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10001388&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10001388&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Last minute car rentals"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10001366&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10001366&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Hotels under $100"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10001320&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10001320&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Airfares under $200"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10001330&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10001330&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Family vacations"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10001169&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10001169&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Great deals to Mexico"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10000960&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10000960&subid=0&type=4&gridnum=16"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Last Minute Cruise deals"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10000833&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10000833&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Romantic trips for two"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10000743&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10000743&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Last Minute Deals"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10000734&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10000734&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Find the beach that's best for you"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10000728&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10000728&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Orbitz Save on trips to Vegas"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=178785.10000704&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=178785.10000704&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Save $70"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000247&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000247&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Save BIG!"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000228&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000228&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Announcing SkyDock"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000217&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000217&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Every NFL Game Plus!"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000069&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000069&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Grateful Dead Channel"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000056&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000056&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius NASCAR Races!"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000063&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000063&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius 100% Comercial Free Music!"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000045&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000045&subid=0&type=4&gridnum=16"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Everything Worth Listening to is Now On Sirius!"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000040&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000040&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Sirius Free Shipping on orders over $49!"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=129871.10000005&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=129871.10000005&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="CheapOair ComboSave"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=184477.10000091&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.cheapoair.com/travel/affiliate/banners/cheapoair_combo_banners/images/468x60.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="CheapOair Generic Flightsaver"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=184477.10000007&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.cheapoair.com/Travel/affiliate/banners/flight-banners-NEW/images/468x60.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="CheapOair Flight-Car-Hotel"
ImageURLs[ImgCnt]="http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=184477.10000013&type=4&subid=0"
ImageFileNames[ImgCnt]="http://www.cheapoair.com/travel/affiliate/banners/Flight-car-hotel-NEW-banners/images/hotel/468x60.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Value of the Day"
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10002033&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/110409/468X60_affiliate.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Electronics Cost Less! "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10002013&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/110409/468X60_elec_affiliate.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Top Toys Cost Less! "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10002023&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/110409/468X60_toy_affiliate.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Clearance! "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001995&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/42109/468X60_Clearance.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Site To Store "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001977&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/72209/1697-3549_468X60_affiliate.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Best Names in Electronics "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001851&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/100808/468X60_electronics.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Gear Up for Game Day "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001823&subid=0&type=4"
ImageFileNames[ImgCnt]="http://ad.linksynergy.com/fs-bin/show?id=Yl363dlItBk&bids=183959.10001823&subid=0&type=4&gridnum=1"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart iPod Values! "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001815&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/061708/iPod_468X60_assrt_v2.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart iPod Bundles Exclusive! "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001816&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/email/nl/061708/iPod_468X60_val.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart 97 cent Shipping "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10001559&type=4&subid=0"
ImageFileNames[ImgCnt]="http://i.walmart.com/i/b/07/camp/97ship/97cent_468X60_affiliate.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="Wal-Mart Music Downoads "
ImageURLs[ImgCnt]="http://linksynergy.walmart.com/fs-bin/click?id=Yl363dlItBk&offerid=183959.10000781&type=4&subid=0"
ImageFileNames[ImgCnt]="http://walmart.com/a/lks/musicDL_468X60.gif"
ImgCnt=ImgCnt+1
ImgAlt[ImgCnt]="4rx"
ImageURLs[ImgCnt]="http://www.4rx.com/online-pharmacy/categories/sexual-health/generic-viagra.html?type=banner&&affId=96808&&img=sildenafil_banner.jpg"
ImageFileNames[ImgCnt]="http://www.4rx.com/images/banners/sildenafil_banner.jpg"

var DefaultURL = 'http://click.linksynergy.com/fs-bin/click?id=Yl363dlItBk&offerid=184611.10000001&type=4&subid=0'; //Default hyperlink for the Banner Ad
var DisplayInterval = 10; //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 randomnumber = Math.floor(Math.random()*(NumberOfImages+1));

//A dd 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) {
TimerObject = setTimeout("ChangeImage()", DisplayInterval);
BannerAdCode = 0;

for (i = 0; i < NumberOfImages; i++) {
BannerAdImages[i] = new Image();
BannerAdImages[i].src = ' ' + ImageFileNames[i];
}

}

}

//Function to change the src of the Banner Ad image
function ChangeImage() {

  if (IsValidBrowser) {
	//random banner ad code
	//randomnumber=Math.floor(Math.random()*(NumberOfImages+1));
	//BannerAdCode = randomnumber;
	//sequential banner code
	BannerAdCode = BannerAdCode + 1;
	if (BannerAdCode == NumberOfImages) {
	  BannerAdCode = 0;
	}
	
	window.document.bannerad.src = BannerAdImages[BannerAdCode].src;
	TimerObject = setTimeout("ChangeImage()", DisplayInterval);
  }
}

//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) {

if (TargetFrame != '' && (FramesObject)) {
FramesObject.location.href = ImageURLs[BannerAdCode];
} else {
document.location = ImageURLs[BannerAdCode];
}

} else if (!IsValidBrowser) {
document.location = DefaultURL;
}

}