var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
var fact;
var faclandpg;
var facsubpg;
var ftnav;
var amtnav;
var rstnav;
var actnav;
var mstnav;
var strTest = sPage;
switch(strTest)
  {
	case 'amazing-coorg.php':
	var amzland = document.getElementById("amzland");
	amtnav = document.getElementById("amtnav");
    amtnav.style.color = "#D5650B";
	break;
	
	case 'coorg-history.php':
	var amazehistory = document.getElementById("amazehistory");
	amtnav = document.getElementById("amtnav");
    amazehistory.style.color = "#D5650B";
	amtnav.style.color = "#D5650B";
	break;
	
	case 'coorg-geography.php':
	var geography = document.getElementById("geography");
	amtnav = document.getElementById("amtnav");
    geography.style.color = "#D5650B";
	amtnav.style.color = "#D5650B";
	break;
	
	case 'coorg-coffee-spice.php':
	var cospice = document.getElementById("cospice");
	amtnav = document.getElementById("amtnav");
    cospice.style.color = "#D5650B";
	amtnav.style.color = "#D5650B";
	break;
	
	case 'coorg-kodavas-culture.php':
	var culture = document.getElementById("culture");
	amtnav = document.getElementById("amtnav");
    culture.style.color = "#D5650B";
	amtnav.style.color = "#D5650B";
	break;
	
	case 'coorg-people.php':
	var people = document.getElementById("people");
	amtnav = document.getElementById("amtnav");
    people.style.color = "#D5650B";
	amtnav.style.color = "#D5650B";
	break;
	
	case 'coorg-accommodation.php':
	var	accland = document.getElementById("accland");
	rstnav = document.getElementById("rstnav");
	rstnav.style.color = "#D5650B";
	break;
	
	case 'coorg-private-pool-villa.php':
	var privatepool = document.getElementById("privatepool");
	rstnav = document.getElementById("rstnav");
    privatepool.style.color = "#D5650B";
	rstnav.style.color = "#D5650B";
	break;
	
	case 'coorg-presidential-villa.php':
	var presidential = document.getElementById("presidential");
	rstnav = document.getElementById("rstnav");
    presidential.style.color = "#D5650B";
	rstnav.style.color = "#D5650B";
	break;
	
	case 'coorg-kings-court.php':
	var kings = document.getElementById("kings");
	rstnav = document.getElementById("rstnav");
    kings.style.color = "#D5650B";
	rstnav.style.color = "#D5650B";
	break;
	
	case 'coorg-county-cottage.php':
	var countycottage = document.getElementById("countycottage");
	rstnav = document.getElementById("rstnav");
    countycottage.style.color = "#D5650B";
	rstnav.style.color = "#D5650B";
	break;
	
	case 'coorg-resort-activities.php':
	var actland = document.getElementById("actland");
	actnav = document.getElementById("actnav");
	actnav.style.color = "#D5650B";
	break;
	
	case 'coorg-plantation-tour.php':
	var plant = document.getElementById("plant");
	actnav = document.getElementById("actnav");
    plant.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'forest-trekking-coorg.php':
	var forestwalk = document.getElementById("forestwalk");
	actnav = document.getElementById("actnav");
    forestwalk.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 'coorg-coracle-ride.php':
	var coracle = document.getElementById("coracle");
	actnav = document.getElementById("actnav");
    coracle.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 'dubare-elephant-camp.php':
	var elephantcamp = document.getElementById("elephantcamp");
	actnav = document.getElementById("actnav");
    elephantcamp.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'bylekuppe-tibetan-settlement.php':
	var tibet = document.getElementById("tibet");
	actnav = document.getElementById("actnav");
    tibet.style.color = "#D5650B";
	actnav.style.color = "#D5650B";
	break;
	
	case 'coorg-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 'coorg-coffee-lounge.php':
	var coffee = document.getElementById("coffee");
	ftnav = document.getElementById("ftnav");
	coffee.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 'ayurveda-vaidyasala.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 'communal-swimming-pool.php':
	var pool = document.getElementById("pool");
	ftnav = document.getElementById("ftnav");
    pool.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 'coorg-guest-comments.php':
	var gtnav = document.getElementById("gtnav");
    gtnav.style.color = "#D5650B";
    break;
	
	case 'coorg-responsible-tourism.php':
	var rtnav = document.getElementById("rtnav");
    rtnav.style.color = "#D5650B";
    break;
	
	case 'coorg-media-speak.php':
	var mstnav = document.getElementById("mstnav");
    mstnav.style.color = "#D5650B";
    break;
	
	default:
	
	
	break;
   }



/********** For plantation photogallery ***********/
var gpphotos=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*/
gpphotos[0]="./images/activities_plantation_img1.jpg"
gpphotos[1]="./images/activities_plantation_img2.jpg"
gpphotos[2]="./images/activities_plantation_img3.jpg"
gpphotos[3]="./images/activities_plantation_img4.jpg"

function gpbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=gpphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=gpphotos.length-1
		document.images.photoslider.src=gpphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function gpforward()
{
	if (which<gpphotos.length-1)
	{
		which++
		document.images.photoslider.src=gpphotos[which]
		//alert(photos.length);
	}
	else if (which==gpphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=gpphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For naturewalk photogallery ***********/

var nwphotos=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*/
nwphotos[0]="./images/activities_nature_img1.jpg"
nwphotos[1]="./images/activities_nature_img2.jpg"


function nwbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=nwphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=nwphotos.length-1
		document.images.photoslider.src=nwphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function nwforward()
{
	if (which<nwphotos.length-1)
	{
		which++
		document.images.photoslider.src=nwphotos[which]
		//alert(photos.length);
	}
	else if (which==nwphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=nwphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For bird watching photogallery ***********/
var bwphotos=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*/
bwphotos[0]="./images/activities_bird_img1.jpg"
bwphotos[1]="./images/activities_bird_img2.jpg"


function bwbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=bwphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=bwphotos.length-1
		document.images.photoslider.src=bwphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function bwforward()
{
	if (which<bwphotos.length-1)
	{
		which++
		document.images.photoslider.src=bwphotos[which]
		//alert(photos.length);
	}
	else if (which==bwphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=bwphotos[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 Activity center photogallery ***********/
var actphotos=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*/
actphotos[0]="./images/activities_children_img1.jpg"
actphotos[1]="./images/activities_children_img2.jpg"
actphotos[2]="./images/activities_children_img3.jpg"

function actbackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=actphotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=actphotos.length-1
		document.images.photoslider.src=actphotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function actforward()
{
	if (which<actphotos.length-1)
	{
		which++
		document.images.photoslider.src=actphotos[which]
		//alert(photos.length);
	}
	else if (which==actphotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=actphotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For elephant camp photogallery ***********/
var elephotos=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*/
elephotos[0]="./images/activities_elephant_img1.jpg"
elephotos[1]="./images/activities_elephant_img2.jpg"
elephotos[2]="./images/activities_elephant_img3.jpg"
elephotos[3]="./images/activities_elephant_img4.jpg"

function elebackward()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=elephotos[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=elephotos.length-1
		document.images.photoslider.src=elephotos[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function eleforward()
{
	if (which<elephotos.length-1)
	{
		which++
		document.images.photoslider.src=elephotos[which]
		//alert(photos.length);
	}
	else if (which==elephotos.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=elephotos[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/********** For Bylekuppe photogallery ***********/

var smimg=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*/
smimg[0]="./images/activities_bylekuppe_photoimg1.jpg"
smimg[1]="./images/activities_bylekuppe_img2.jpg"
smimg[2]="./images/activities_bylekuppe_img3.jpg"



function previous()
{
	if (which>0)
	{
		window.status=''
		which--
		document.images.photoslider.src=smimg[which]
	}
	else if (which==0) 
	{
		
		window.status=''
		which=smimg.length-1
		document.images.photoslider.src=smimg[which]
	}
	else
	{ 
		window.status='start of gallery'
		document.images.src="rht_arrow.gif";
		//alert(window.status);
	}
}

function next()
{
	if (which<smimg.length-1)
	{
		which++
		document.images.photoslider.src=smimg[which]
		//alert(photos.length);
	}
	else if (which==smimg.length-1) 
	{
		window.status=''
		which=0
		document.images.photoslider.src=smimg[which]
	}
	else 
	{
		window.status='End of gallery'
		
	}
}
/************************************************************************/

function subpg()
{
	a=document.coorg.suites[document.coorg.suites.selectedIndex].value;		
	if(a=="Onsite")
	{
		document.location="coorg-plantation-tour.php";
	}
	if(a=="Offsite")
	{
		document.location="dubare-elephant-camp.php";
	}
}

function rooms()
{
	a=document.coorg.suites[document.coorg.suites.selectedIndex].value;		
	if(a=="countycottage")
	{
		document.location="coorg-county-cottage.php";
	}
	if(a=="poolvilla")
	{
		document.location="coorg-private-pool-villa.php";
	}
	if(a=="presidentvilla")
	{
		document.location="coorg-presidential-villa.php";
	}
	if(a=="kingscourt")
	{
		document.location="coorg-kings-court.php";
	}
}

function showPreview(imagePath,imageIndex,caption)
{
	var displayWaitMessage=true;
	document.getElementById("cap").innerHTML = 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';	
		//document.getElementById('largeImageCaption').innerHTML = imageGalleryCaptions[imageIndex];
		//document.getElementById('largeImageCaption').style.display='block';
		
	}

function sitenav()
{
	a=document.coorg.sites[document.coorg.sites.selectedIndex].value;		
	if(a=="Kabini")
	{
		document.location="../kabini/home.php";
	}
}
