//Tourism Section Script
//User defined variables - change these variables to alter the behaviour of the script
var ImageFolder1= "../photogallery/Tourism/TouristThumbnails"; //Folder name containing the images
var ImageFileNames1 = new Array('manudevi-waterfall.jpg','amba.jpg','amba1.jpg','manudevi.jpg','pal-foresty.jpg','suki-dam-natuarl-bliss.jpg','sant-mukai-sagar-hatnur.jpg','manudevi-main-waterfall.jpg','hatnur-dam.jpg','suki-dam.jpg','manudevi-in-monsoon.jpg','manudevi-route.jpg','padmalaya-temple.jpg','unapdev-temple.jpg','lush-green-fields.jpg','waghur-river.jpg'); //List of images to use
var ImageURLs1 = new Array('../photogallery/Tourism/TouriestView/manudevi-waterfall.jpg','../photogallery/Tourism/TouriestView/Dsc01331.jpg','../photogallery/Tourism/TouriestView/Dsc01332.jpg','../photogallery/Tourism/TouriestView/manudevi.jpg','../photogallery/Tourism/TouriestView/pal-forestry.jpg','../photogallery/Tourism/TouriestView/suki-dam-natural-bliss.jpg','../photogallery/Tourism/TouriestView/sant-muktai-sagar-hatnur.jpg','../photogallery/Tourism/TouriestView/manudevi-main-waterfall.jpg','../photogallery/Tourism/TouriestView/hatnur-dam.jpg','../photogallery/Tourism/TouriestView/suki-dam.jpg','../photogallery/Tourism/TouriestView/manudevi-in-monsoon.jpg',
'../photogallery/Tourism/TouriestView/manudevi-route.jpg','../photogallery/Tourism/TouriestView/manudevi-watefall.jpg','../photogallery/Tourism/TouriestView/padmalaya-temple.jpg','../photogallery/Tourism/TouriestView/unapdev-temple.jpg','../photogallery/Tourism/TouriestView/lush-green-fields.jpg','../photogallery/Tourism/TouriestView/waghur-river.jpg'); //List of hyperlinks associated with the list of images
var DefaultURL1 = 'manudevi-waterfall.jpg'; //Default hyperlink for the Banner Ad
var DisplayInterval1 = 7; //Number of seconds to wait before the next image is displayed
var TargetFrame1 = "blank"; //Name of the frame to open the hyperlink into

//Internal variables (do not change these unless you know what you are doing)
var IsValidBrowser1 = false;
var BannerAdCode1 = 0;
var BannerAdImages1 = new Array(NumberOfImages1);
var DisplayInterval1 = DisplayInterval1 * 1000;
var NumberOfImages1= ImageFileNames1.length;

//A dd a trailing forward slash to the ImageFolder1 variable if it does not already have one
if (ImageFolder1.substr(ImageFolder1.length - 1, ImageFolder1.length) != "/" && ImageFolder1 != "") { ImageFolder1 += "/";
}

if (TargetFrame1 == '') {
var FramesObject = null;
} else {
var FramesObject = eval('parent.' + TargetFrame1);
}

//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 BrowserType= navigator.appName;
var BrowserVersion = parseInt(navigator.appVersion);

if (BrowserType == "Netscape" && (BrowserVersion >= 3)) {
IsValidBrowser1 = true;
}

if (BrowserType == "Microsoft Internet Explorer" && (BrowserVersion >= 4)) {
IsValidBrowser1 = true;
}

if (IsValidBrowser1) {
TimerObject = setTimeout("ChangeImage1()", DisplayInterval1);
BannerAdCode1 = 0;

for (i = 0; i < NumberOfImages1; i++) {BannerAdImages1[i] = new Image();BannerAdImages1[i].src = ' ' + ImageFolder1 + ImageFileNames1[i];
}

}

}

//Function to change the src of the Banner Ad image
function ChangeImage1() {

if (IsValidBrowser1) {
BannerAdCode1 = BannerAdCode1 + 1;

if (BannerAdCode1 == NumberOfImages1) {
BannerAdCode1 = 0;
}

window.document.bannerad1.src =BannerAdImages1[BannerAdCode1].src;
TimerObject = setTimeout("ChangeImage1()", DisplayInterval1);
}
}

//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 DefaultURL1 is displayed
function ChangePage1() {

if (IsValidBrowser1) {

if (TargetFrame1 != '' && (FramesObject)) {
FramesObject.location.href = ImageURLs1[BannerAdCode1];
} else {
document.location = ImageURLs1[BannerAdCode1];
}

} else if (!IsValidBrowser1) {
document.location = DefaultURL1;
}

}
// -->
