// JavaScript Document

function show(id) {
	document.getElementById(id).style.display='block';
}

function hide(id) {
	document.getElementById(id).style.display='none';
}

// Left nav on photo page
function navigate() {
	switch (document.lnav) {
		case "ranch":
			document.getElementById('slideshow').innerHTML = "<img src='img/ranch/ranch01.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "View of the off-leash area.";
			document.getElementById('theRanch').innerHTML = "The Ranch"
			break;
		case "barn":
			document.getElementById('slideshow').innerHTML = "<img src='img/barn/barn01.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "The front of the barn.";
			document.getElementById('theBarn').innerHTML = "The Barn"
			break;
		case "play":
			document.getElementById('slideshow').innerHTML = "<img src='img/ranch/ranch01.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "A view of the off-leash area.";
			document.getElementById('playArea').innerHTML = "Off-Leash Play Area"
			break;		
		case "hiking":
			document.getElementById('slideshow').innerHTML = "<img src='img/onLeash/hiking01.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "Roscoe and a friend explore the trail.";
			document.getElementById('hikingTrail').innerHTML = "On-Leash Hiking Trail"
			break;		
		case "guests":
			document.getElementById('slideshow').innerHTML = "<img src='img/guests/JacksonandCarmen.gif' id='photos'>";
			document.getElementById('caption').innerHTML = "Jackson &amp; Carmen";
			document.getElementById('ourGuests').innerHTML = "Our Guests"
			break;		
		case "scenery":
			document.getElementById('slideshow').innerHTML = "<img src='img/scene/scenery01.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "";
			document.getElementById('Scenery').innerHTML = "Scenery"
			break;		
		case "roscoe":
			document.getElementById('slideshow').innerHTML = "<img src='img/roscoe/roscoe01.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "Roscoe at the ranch.";
			document.getElementById('Roscoe').innerHTML = "Roscoe"
			break;		
		case "cottages":
			document.getElementById('slideshow').innerHTML = "<img src='img/cottages/cottages1.jpg' id='photos'>";
			document.getElementById('caption').innerHTML = "Luxury Cottages";
			document.getElementById('Cottages').innerHTML = "Cottages"
			break;		
	}
	   
	   if (document.lnav!='ranch') {
	   document.getElementById('theRanch').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"ranch\";navigate();'>The Ranch</a>"
	   }
	   if (document.lnav!='barn') {
	   document.getElementById('theBarn').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"barn\";navigate();'>The Barn</a>"
	   }
	   if (document.lnav!='play') {
	   document.getElementById('playArea').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"play\";navigate();'>Off-Leash Play Area</a>"
	   }
	   if (document.lnav!='hiking') {
	   document.getElementById('hikingTrail').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"hiking\";navigate();'>Off-Leash Hiking Trail</a>"
	   }
	   if (document.lnav!='guests') {
	   document.getElementById('ourGuests').innerHTML = "<a href='#'  class='leftNav' onClick='document.lnav=\"guests\";navigate();'>Our Guests</a>"
	   }
	   if (document.lnav!='scenery') {
	   document.getElementById('Scenery').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"scenery\";navigate();'>Scenery</a>"
	   }
	   if (document.lnav!='roscoe') {
	   document.getElementById('Roscoe').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"roscoe\";navigate();'>Roscoe</a>"
	   }
	   if (document.lnav!='cottages') {
	   document.getElementById('Cottages').innerHTML = "<a href='#' class='leftNav' onClick='document.lnav=\"cottages\";navigate();'>Cottages</a>"
	   }
}

// slideshow on photo page
var i = 0;

var ranch = new Array
ranch[0]="<img src='img/ranch/ranch01.jpg' width='360' height='240'>"
ranch[1]="<img src='img/ranch/ranch02.jpg' width='240' height='360'>"
ranch[2]="<img src='img/ranch/ranch03.jpg' width='360' height='240'>"
ranch[3]="<img src='img/ranch/ranch04.jpg' width='240' height='360'>"
ranch[4]="<img src='img/ranch/ranch05.jpg' width='360' height='240'>"
ranch[5]="<img src='img/ranch/ranch06.jpg' width='360' height='270'>"
ranch[6]="<img src='img/ranch/ranch07.jpg' width='360' height='270'>"
ranch[7]="<img src='img/ranch/ranch08.jpg' width='360' height='269'>"

var ranchCap = new Array
ranchCap[0]="View of the off-leash area."
ranchCap[1]="The forest shading our on-leash area."
ranchCap[2]="View of the off-leash play area&#59; left half is dedicated to small dogs and right half is for large dogs."
ranchCap[3]="Shelter for the large dogs in the off-leash play area."
ranchCap[4]="Inside view of the off-leash play area for small dogs."
ranchCap[5]="Our home at Roscoe's Ranch."
ranchCap[6]="The peach trees."
ranchCap[7]="Enjoying a little down time."

var barn = new Array
barn[0]="<img src='img/barn/barn01.jpg' width='350' height='263'>"
barn[1]="<img src='img/barn/barn02.jpg' width='360' height='270'>"
barn[2]="<img src='img/barn/barn03.jpg' width='360' height='270'>"
barn[3]="<img src='img/barn/barn04.jpg' width='360' height='270'>"
barn[4]="<img src='img/barn/barn05.jpg' width='360' height='270'>"
barn[5]="<img src='img/barn/barn06.jpg' width='268' height='360'>"
barn[6]="<img src='img/barn/barn07.jpg' width='271' height='360'>"
barn[7]="<img src='img/barn/barn08.jpg' width='360' height='270'>"

var barnCap = new Array
barnCap[0]="The front and side view of the barn."
barnCap[1]="The front and side view of the barn and kennels."
barnCap[2]="The front and side view of the barn."
barnCap[3]="Interior view of the barn. Notice the space heaters mounted above the kennels for those chilly evenings."
barnCap[4]="A fresh dusting of snow."
barnCap[5]="One of our kennels."
barnCap[6]="One of our kennels. Note the door leading to a contained area outside."
barnCap[7]="The exterior of our barn on a foggy Northwest morning."

var play = new Array
play[0]="<img src='img/ranch/ranch01.jpg' width='360' height='240'>"
play[1]="<img src='img/ranch/ranch03.jpg' width='360' height='240'>"
play[2]="<img src='img/ranch/ranch05.jpg' width='360' height='240'>"
play[3]="<img src='img/ranch/ranch04.jpg' width='240' height='360'>"
play[4]="<img src='img/ranch/ol01.jpg' width='360' height='240'>"

var playCap = new Array
playCap[0]="A view of the off-leash area."
playCap[1]="Inside the off-leash area&#59; the left half is dedicated to the small dogs and the right half is for the large dogs."
playCap[2]="Inside the off-leash area for small dogs."
playCap[3]="Shelter for the large dogs in the off-leash area."
playCap[4]="The off-leash area for large dogs."

var hiking = new Array
hiking[0]="<img src='img/onLeash/hiking01.jpg' width='360' height='240'>"
hiking[1]="<img src='img/onLeash/hiking02.jpg' width='240' height='360'>"
hiking[2]="<img src='img/onLeash/hiking03.jpg' width='270' height='360'>"
hiking[3]="<img src='img/onLeash/hiking04.jpg' width='268' height='360'>"
hiking[4]="<img src='img/onLeash/hiking05.jpg' width='270' height='360'>"

var hikingCap = new Array
hikingCap[0]="Roscoe and a friend explore the trail."
hikingCap[1]="The on-leash hiking trail is shaded by a forest of evergreens."
hikingCap[2]="The on-leash trail paved with wood chips."
hikingCap[3]="The on-leash trail paved with wood chips."
hikingCap[4]="The on-leash trail paved with wood chips."

var guests = new Array
guests[0]="<img src='img/guests/JacksonandCarmen.gif' width='300' height='192'>"
guests[1]="<img src='img/guests/cocoa.jpg' width='120' height='200'>"
guests[2]="<img src='img/guests/meatball01.jpg' width='360' height='270'>"
guests[3]="<img src='img/guests/shannon01.jpg' width='349' height='270'>"
guests[4]="<img src='img/guests/spenser.jpg' width='360' height='270'>"
guests[5]="<img src='img/guests/jasper01.jpg' width='360' height='270'>"
guests[6]="<img src='img/guests/stirling01.jpg' width='360' height='270'>"
guests[7]="<img src='img/guests/ama01.jpg' width='360' height='270'>"

var guestsCap = new Array
guestsCap[0]="Jackson &amp; Carmen"
guestsCap[1]="CocoaBear"
guestsCap[2]="Meatball"
guestsCap[3]="Shannon"
guestsCap[4]="Spenser"
guestsCap[5]="Jasper"
guestsCap[6]="Stirling"
guestsCap[7]="Ama"

var scenery = new Array
scenery[0]="<img src='img/scene/scenery01.jpg' width='240' height='360'>"
scenery[1]="<img src='img/scene/scenery02.jpg' width='240' height='360'>"
scenery[2]="<img src='img/scene/scenery03.jpg' width='360' height='270'>"

var sceneryCap = new Array
sceneryCap[0]=""
sceneryCap[1]=""
sceneryCap[2]=""

var roscoe = new Array
roscoe[0]="<img src='img/roscoe/roscoe01.jpg' width='360' height='240'>"
roscoe[1]="<img src='img/roscoe/roscoe02.jpg' width='240' height='360'>"
roscoe[2]="<img src='img/roscoe/roscoe03.jpg' width='360' height='270'>"
roscoe[3]="<img src='img/roscoe/roscoe04.jpg' width='360' height='270'>"
roscoe[4]="<img src='img/roscoe/roscoe05.jpg' width='360' height='270'>"

var roscoeCap = new Array
roscoeCap[0]="Roscoe at the ranch."
roscoeCap[1]="Roscoe posing for the camera."
roscoeCap[2]="Roscoe showing off his stick."
roscoeCap[3]="A very proud Roscoe."
roscoeCap[4]="Roscoe's sister, Kiya."

var cottages = new Array
cottages[0]="<img src='img/cottages/cottages1.jpg' width='360' height='270'>"
cottages[1]="<img src='img/cottages/cottages2.jpg' width='270' height='360'>"
cottages[2]="<img src='img/cottages/cottages3.jpg' width='270' height='360'>"
cottages[3]="<img src='img/cottages/cottages4.jpg' width='360' height='270'>"
cottages[4]="<img src='img/cottages/cottages5.jpg' width='270' height='360'>"
cottages[5]="<img src='img/cottages/cottages6.jpg' width='360' height='270'>"
cottages[6]="<img src='img/cottages/cottages7.jpg' width='270' height='360'>"
cottages[7]="<img src='img/cottages/cottages8.jpg' width='360' height='270'>"



var cottagesCap = new Array
cottagesCap[0]="Luxury Cottages"
cottagesCap[1]="Luxury Cottages"
cottagesCap[2]="Luxury Cottages"
cottagesCap[3]="Luxury Cottages"
cottagesCap[4]="Luxury Cottages"
cottagesCap[5]="Luxury Cottages"
cottagesCap[6]="Luxury Cottages"
cottagesCap[7]="Luxury Cottages"


function nextimage() {
	switch (document.lnav) {
		case "ranch":
		i = i + 1;
  		if(i > 7) i=0;
		document.getElementById('slideshow').innerHTML = ranch[i];
		document.getElementById('caption').innerHTML = ranchCap[i];
		break;

		case "barn":
		i = i + 1;
  		if(i > 7) i=0;
		document.getElementById('slideshow').innerHTML = barn[i];
		document.getElementById('caption').innerHTML = barnCap[i];
		break;

		case "play":
		i = i + 1;
  		if(i > 4) i=0;
		document.getElementById('slideshow').innerHTML = play[i];
		document.getElementById('caption').innerHTML = playCap[i];
		break;

		case "hiking":
		i = i + 1;
  		if(i > 4) i=0;
		document.getElementById('slideshow').innerHTML = hiking[i];
		document.getElementById('caption').innerHTML = hikingCap[i];
		break;

		case "guests":
		i = i + 1;
  		if(i > 7) i=0;
		document.getElementById('slideshow').innerHTML = guests[i];
		document.getElementById('caption').innerHTML = guestsCap[i];
		break;

		case "scenery":
		i = i + 1;
  		if(i > 2) i=0;
		document.getElementById('slideshow').innerHTML = scenery[i];
		document.getElementById('caption').innerHTML = sceneryCap[i];
		break;

		case "roscoe":
		i = i + 1;
  		if(i > 4) i=0;
		document.getElementById('slideshow').innerHTML = roscoe[i];
		document.getElementById('caption').innerHTML = roscoeCap[i];
		break;
		
		case "cottages":
		i = i + 1;
  		if(i > 7) i=0;
		document.getElementById('slideshow').innerHTML = cottages[i];
		document.getElementById('caption').innerHTML = cottagesCap[i];
		break;
	}
}


function lastimage() {
	switch (document.lnav) {
		case "ranch":
		i = i - 1;
  		if(i < 0) i=7;
		document.getElementById('slideshow').innerHTML = ranch[i];
		document.getElementById('caption').innerHTML = ranchCap[i];
		break;

		case "barn":
		i = i - 1;
  		if(i < 0) i=7;
		document.getElementById('slideshow').innerHTML = barn[i];
		document.getElementById('caption').innerHTML = barnCap[i];
		break;

		case "play":
		i = i - 1;
  		if(i < 0) i=4;
		document.getElementById('slideshow').innerHTML = play[i];
		document.getElementById('caption').innerHTML = playCap[i];
		break;

		case "hiking":
		i = i - 1;
  		if(i < 0) i=4;
		document.getElementById('slideshow').innerHTML = hiking[i];
		document.getElementById('caption').innerHTML = hikingCap[i];
		break;

		case "guests":
		i = i - 1;
  		if(i < 0) i=7;
		document.getElementById('slideshow').innerHTML = guests[i];
		document.getElementById('caption').innerHTML = guestsCap[i];
		break;

		case "scenery":
		i = i - 1;
  		if(i < 0) i=2;
		document.getElementById('slideshow').innerHTML = scenery[i];
		document.getElementById('caption').innerHTML = sceneryCap[i];
		break;

		case "roscoe":
		i = i - 1;
  		if(i < 0) i=4;
		document.getElementById('slideshow').innerHTML = roscoe[i];
		document.getElementById('caption').innerHTML = roscoeCap[i];
		break;
		
		case "cottages":
		i = i - 1;
  		if(i < 0) i=7;
		document.getElementById('slideshow').innerHTML = cottages[i];
		document.getElementById('caption').innerHTML = cottagesCap[i];
		break;
	}
}

function newWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
