var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
var fact;
var faclandpg;
var facsubpg;
var ftnav;
var aktnav;
var rstnav;
var actnav;
var nstnav;
var strTest = sPage;
switch(strTest)
  {
	case 'about-kabini.php':
	var abtkabini = document.getElementById("abtkabini");
	aktnav = document.getElementById("aktnav");
	aktnav.style.color = "#D5650B";
	break;
	
	case 'kabini-history.php':
	var abthistory = document.getElementById("abthistory");
	aktnav = document.getElementById("aktnav");
    abthistory.style.color = "#D5650B";
	aktnav.style.color = "#D5650B";
	break;
	
	case 'kabini-geography.php':
	var geography = document.getElementById("geography");
	aktnav = document.getElementById("aktnav");
    geography.style.color = "#D5650B";
	aktnav.style.color = "#D5650B";
	break;
	
	case 'kabini-flora.php':
	var flora = document.getElementById("flora");
	aktnav = document.getElementById("aktnav");
    flora.style.color = "#D5650B";
	aktnav.style.color = "#D5650B";
	break;
	
	case 'kabini-fauna.php':
	var fauna = document.getElementById("fauna");
	aktnav = document.getElementById("aktnav");
    fauna.style.color = "#D5650B";
	aktnav.style.color = "#D5650B";
	break;
	
	case 'kabini-people.php':
	var people = document.getElementById("people");
	aktnav = document.getElementById("aktnav");
    people.style.color = "#D5650B";
	aktnav.style.color = "#D5650B";
	break;
	
	case 'kabini-accommodation.php':
	var acnland = document.getElementById("acnland");
	rstnav = document.getElementById("rstnav");
	rstnav.style.color = "#D5650B";
	break;
	
	case 'kabini-pool-hut.php':
	var phut = document.getElementById("phut");
	rstnav = document.getElementById("rstnav");
    phut.style.color = "#D5650B";
	rstnav.style.color = "#D5650B";
	break;
	
	case 'kabini-jacuzzi-hut.php':
	var jhut = document.getElementById("jhut");
	rstnav = document.getElementById("rstnav");
    jhut.style.color = "#D5650B";
	rstnav.style.color = "#D5650B";
	break;
	
	case 'resort-activities.php':
	var actland = document.getElementById("actland");
	actnav = document.getElementById("actnav");
	actnav.style.color = "#D5650B";
	break;
	
	case 'boat-safari.php':
	var boat = document.getElementById("boat");
	actnav = document.getElementById("actnav");
    boat.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'vehicle-safari.php':
	var vehicle = document.getElementById("vehicle");
	actnav = document.getElementById("actnav");
    vehicle.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'resort-elephant.php':
	var restelephant = document.getElementById("restelephant");
	actnav = document.getElementById("actnav");
    restelephant.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'kabini-coracle-ride.php':
	var coracle = document.getElementById("coracle");
	actnav = document.getElementById("actnav");
    coracle.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'tribal-village-visit.php':
	var tribal = document.getElementById("tribal");
	actnav = document.getElementById("actnav");
    tribal.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'guided-bird-watching.php':
	var bird = document.getElementById("bird");
	actnav = document.getElementById("actnav");
    bird.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'resort-evening-activities.php':
	var evening = document.getElementById("evening");
	actnav = document.getElementById("actnav");
    evening.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'children-activity-center.php':
	var centre = document.getElementById("centre");
	actnav = document.getElementById("actnav");
    centre.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'kabini-resort-facilities.php':
	var facility = document.getElementById("facility");
	ftnav = document.getElementById("ftnav");
    ftnav.style.color = "#D5650B";
	
	fact = document.getElementById("fact");
    fact.style.display = "block";
    faclandpg = document.getElementById("faclandpg");
    facsubpg = document.getElementById("facsubpg");
    faclandpg.style.display = "block";
    facsubpg.style.display = "none";
	break;
	
	case 'kabini-reading-lounge.php':
	var read = document.getElementById("read");
	ftnav = document.getElementById("ftnav");
	read.style.color = "#D5650B";
    ftnav.style.color = "#D5650B";
    
	faclandpg = document.getElementById("faclandpg");
    facsubpg = document.getElementById("facsubpg");
	faclandpg.style.display = "none";
    facsubpg.style.display = "block";
	break;
	
	case 'ayurvedic-spa-resort.php':
	var vaidyasala = document.getElementById("vaidyasala");
	ftnav = document.getElementById("ftnav");
	vaidyasala.style.color = "#D5650B";
    ftnav.style.color = "#D5650B";
    
	faclandpg = document.getElementById("faclandpg");
    facsubpg = document.getElementById("facsubpg");
	faclandpg.style.display = "none";
    facsubpg.style.display = "block";
	break;
	
	case 'kabini-infinity-pool.php':
	var infinity = document.getElementById("infinity");
	ftnav = document.getElementById("ftnav");
    infinity.style.color = "#D5650B";
	ftnav.style.color = "#D5650B";
	
	faclandpg = document.getElementById("faclandpg");
    facsubpg = document.getElementById("facsubpg");
	faclandpg.style.display = "none";
    facsubpg.style.display = "block";
    break;
	
	case 'dining-facilities.php':
	var dining = document.getElementById("dining");
	ftnav = document.getElementById("ftnav");
    dining.style.color = "#D5650B";
	ftnav.style.color = "#D5650B";
	
	faclandpg = document.getElementById("faclandpg");
    facsubpg = document.getElementById("facsubpg");
	faclandpg.style.display = "none";
    facsubpg.style.display = "block";
    break;
	
	case 'kabini-guest-comments.php':
	var gtnav = document.getElementById("gtnav");
    gtnav.style.color = "#D5650B";
    break;
	
	case 'naturalist-speak.php':
	nstnav = document.getElementById("nstnav");
	nstnav.style.color = "#D5650B";
	break;
	
	case 'naturalist-profile.php':
	var naturalist = document.getElementById("naturalist");
	nstnav = document.getElementById("nstnav");
	nstnav.style.color = "#D5650B";
	break;
	
	case 'sambar-deer.php':
	var deer = document.getElementById("deer");
	nstnav = document.getElementById("nstnav");
    deer.style.color = "#D5650B";
	nstnav.style.color = "#D5650B";
	break;
	
	case 'elephant-mating-game.php':
	var elegame = document.getElementById("elegame");
	nstnav = document.getElementById("nstnav");
    elegame.style.color = "#D5650B";
	nstnav.style.color = "#D5650B";
	break;
	
	case 'mammals-nagarhole.php':
	var mammals = document.getElementById("mammals");
	nstnav = document.getElementById("nstnav");
    mammals.style.color = "#D5650B";
	nstnav.style.color = "#D5650B";
	break;
	
	case 'media-speak.php':
	var mstnav = document.getElementById("mstnav");
    mstnav.style.color = "#D5650B";
    break; 
	
	case 'kabini-responsible-tourism.php':
	var rtnav = document.getElementById("rtnav");
    rtnav.style.color = "#D5650B";
    break;
	
	default:
	
	
	break;
   }


/********** For boatsafari photogallery ***********/
var bsphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
bsphotos[0]="./images/activities_boat_img1.jpg"
bsphotos[1]="./images/activities_boat_img2.jpg"


function bsbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=bsphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=bsphotos.length-1
		document.images.photoslider.src=bsphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function bsforward()
{
	if (which<bsphotos.length-1)
	{
		which++
		document.images.photoslider.src=bsphotos[which]
		//alert(photos.length);
	}
	else if (which==bsphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=bsphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For vehicle safari photogallery ***********/
var vsphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
vsphotos[0]="./images/activities_vehicle_img1.jpg"
vsphotos[1]="./images/activities_vehicle_img2.jpg"
vsphotos[2]="./images/activities_vehicle_img3.jpg"

function vsbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=vsphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=vsphotos.length-1
		document.images.photoslider.src=vsphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function vsforward()
{
	if (which<vsphotos.length-1)
	{
		which++
		document.images.photoslider.src=vsphotos[which]
		//alert(photos.length);
	}
	else if (which==vsphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=vsphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For resort elephant photogallery ***********/
var rephotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
rephotos[0]="./images/activities_elephant_img1.jpg"
rephotos[1]="./images/activities_elephant_img2.jpg"


function rebackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=rephotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=rephotos.length-1
		document.images.photoslider.src=rephotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function reforward()
{
	if (which<rephotos.length-1)
	{
		which++
		document.images.photoslider.src=rephotos[which]
		//alert(photos.length);
	}
	else if (which==rephotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=rephotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For Coracle ride photogallery ***********/
var crphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
crphotos[0]="./images/activities_coracle_img1.jpg"
crphotos[1]="./images/activities_coracle_img2.jpg"


function crbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=crphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=crphotos.length-1
		document.images.photoslider.src=crphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function crforward()
{
	if (which<crphotos.length-1)
	{
		which++
		document.images.photoslider.src=crphotos[which]
		//alert(photos.length);
	}
	else if (which==crphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=crphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For Tribal village visit photogallery ***********/
var tvvphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
tvvphotos[0]="./images/activities_tribal_img1.jpg"
tvvphotos[1]="./images/activities_tribal_img2.jpg"


function tvvbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=tvvphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=tvvphotos.length-1
		document.images.photoslider.src=tvvphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function tvvforward()
{
	if (which<tvvphotos.length-1)
	{
		which++
		document.images.photoslider.src=tvvphotos[which]
		//alert(photos.length);
	}
	else if (which==tvvphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=tvvphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For Guided bird watch photogallery ***********/
var gbwphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
gbwphotos[0]="./images/activities_bird_img1.jpg"
gbwphotos[1]="./images/activities_bird_img2.jpg"


function gbwbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=gbwphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=gbwphotos.length-1
		document.images.photoslider.src=gbwphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function gbwforward()
{
	if (which<gbwphotos.length-1)
	{
		which++
		document.images.photoslider.src=gbwphotos[which]
		//alert(photos.length);
	}
	else if (which==gbwphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=gbwphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For evenieng activity photogallery ***********/
var eaphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
eaphotos[0]="./images/activities_evening_img1.jpg"
eaphotos[1]="./images/activities_evening_img2.jpg"

function eabackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=eaphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=eaphotos.length-1
		document.images.photoslider.src=eaphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function eaforward()
{
	if (which<eaphotos.length-1)
	{
		which++
		document.images.photoslider.src=eaphotos[which]
		//alert(photos.length);
	}
	else if (which==eaphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=eaphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For activity center photogallery ***********/
var acphotos=new Array()
var which=0
/*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/
acphotos[0]="./images/activities_children_img1.jpg"
acphotos[1]="./images/activities_children_img2.jpg"
acphotos[2]="./images/activities_children_img3.jpg"

function acbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=acphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=acphotos.length-1
		document.images.photoslider.src=acphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function acforward()
{
	if (which<acphotos.length-1)
	{
		which++
		document.images.photoslider.src=acphotos[which]
		//alert(photos.length);
	}
	else if (which==acphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=acphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/************************************************************************/

function rooms()
{
	a=document.kabini.suites[document.kabini.suites.selectedIndex].value;		
	if(a=="jacuzzi")
	{
		document.location="acn-jacuzzihut.php";
	}
	if(a=="poolhut")
	{
		document.location="acn-poolhut.php";
	}
}



/*var activeImage = false;
	var imageGalleryLeftPos = false;
	var imageGalleryWidth = false;
	var imageGalleryObj = false;
	var maxGalleryXPos = false;
imageGalleryObj = document.getElementById('wrap');
		imageGalleryLeftPos = imageGalleryObj.offsetLeft;
		imageGalleryWidth = document.getElementById('wrap').offsetWidth - 80;
		maxGalleryXPos = imageGalleryObj.offsetLeft; 
		minGalleryXPos = imageGalleryWidth - document.getElementById('slideEnd').offsetLeft;
var slideshowImages = imageGalleryObj.getElementsByTagName('IMG');
		for(var no=0;no<slideshowImages.length;no++){
			slideshowImages[no].onmouseover = showImage;
		}

var divs = imageGalleryObj.getElementsByTagName('DIV');
		for(var no=0;no<divs.length;no++){
			if(divs[no].className=='imageCaption')imageGalleryCaptions[imageGalleryCaptions.length] = divs[no].innerHTML;
		}*/
function showPreview(imagePath,imageIndex,caption)
{
	var displayWaitMessage=true;
	document.getElementById('largeImageCaption').innerHTML = caption;
	//alert(caption)
	var subImages = document.getElementById('previewPane').getElementsByTagName('IMG');
	 if(subImages.length==0){
                        var img = document.createElement('IMG');
                        document.getElementById('previewPane').appendChild(img);
            }else
            {
                        img = subImages[0];
                        img.setAttribute('alt',caption);
                        img.setAttribute('title',caption);
            }
	if(displayWaitMessage)
	{
	    document.getElementById('waitMessage').style.display='inline';
	}
	img.onload = function() { hideWaitMessageAndShowCaption(imageIndex-1); };
	img.src = imagePath;
	
}

function hideWaitMessageAndShowCaption(imageIndex)
	{
		//alert(imageIndex)
		document.getElementById('waitMessage').style.display='none';	
	}
function sitenav()
{
	a=document.kabini.sites[document.kabini.sites.selectedIndex].value;		
	if(a=="Coorg")
	{
		document.location="../coorg/home.php";
	}
}
