//Demonstrates function generalReplacePicts (iDirection, aPhoto, aCapt,  aCred, sPhotoID, sCaptID, sSeqID, sCredID)

//----------------------------Variables for first gallery--------------------->
var aPhotos1 = new Array();
var aCaptions1 = new Array();
var aCreds1 = new Array();

aPhotos1[0]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah01.jpg";	// Pictures.
aPhotos1[1]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah02.jpg";
aPhotos1[2]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah03.jpg";
aPhotos1[3]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah04.jpg";
aPhotos1[4]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah05.jpg";
aPhotos1[5]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah06.jpg";
aPhotos1[6]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah07.jpg";
aPhotos1[7]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah08.jpg";
aPhotos1[8]="http://www.roadtripamerica.com/Thodys-American-Adventures/Utah09.jpg";
aPhotos1[9]=0;// Index of current photo to be displayed. Made an array element to pass by reference.

aCaptions1[0] = "The Apache Motel in Moab -- very welcoming, great value, loads of history and just a short walk from the busy town center";
aCaptions1[1] = "Heading south through Arches National Park, towards the Courthouse Towers area";
aCaptions1[2] = "At 306 ft, Landscape Arch is thought to be the longest natural arch in the world. Bits keep falling off though so no-one knows how much longer it will last.";
aCaptions1[3] = "The spectacular sandstone formations of Park Avenue, a moderate 1 mile (each way) trail that offers a great introduction to Arches NP.";
aCaptions1[4] = "Skyline Arch, one of the 2,000+ natural sandstone arches to be found at Arches NP. Go while you can - 10 are lost to erosion every decade.";
aCaptions1[5] = "Buck Canyon Overlook, just one of the incredible panoramic vistas to be found in the Island in the Sky area of Canyonlands NP.";
aCaptions1[6] = "Mesa Arch, probably the most photographed natural feature in eastern Utah; you certainly won't be alone if you arrive early for that picture postcard sunrise shot.";
aCaptions1[7] = "Red rocks tower over US Route 191, north of Moab. The locos on the line that runs alongside this fairly steep descent take it very slowly indeed.";
aCaptions1[8] = "Red soil, silver-green brush and The Valley of the Gods in the background. If you have the time, there's an unmissable 17-mile dirt route through the valley. Sadly we missed it.";

aCreds1[0] = "Photo by Peter Thody";
aCreds1[1] = "Photo by Peter Thody";
aCreds1[2] = "Photo by Peter Thody";
aCreds1[3] = "Photo by Peter Thody";
aCreds1[4] = "Photo by Peter Thody";
aCreds1[5] = "Photo by Peter Thody";
aCreds1[6] = "Photo by Peter Thody";
aCreds1[7] = "Photo by Peter Thody";
aCreds1[8] = "Photo by Peter Thody";


//----------------------------Variables for second gallery--------------------->

var aPhotos2=new Array();
var aCaptions2=new Array();
var aCreds2 = new Array();

aPhotos2[0]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona01.jpg";	// Pictures.
aPhotos2[1]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona02.jpg";
aPhotos2[2]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona03.jpg";
aPhotos2[3]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona04.jpg";
aPhotos2[4]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona05.jpg";
aPhotos2[5]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona06.jpg";
aPhotos2[6]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona07.jpg";
aPhotos2[7]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona08.jpg";
aPhotos2[8]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona09.jpg";
aPhotos2[9]="http://www.roadtripamerica.com/Thodys-American-Adventures/Arizona10.jpg";
aPhotos2[10]=0;// Index of current photo to be displayed. Made an array element to pass by reference.

aCaptions2[0] = "The classic road view heading south on Highway 163 into Monument Valley. Despite this being the first Saturday in August, the roads are still almost empty.";
aCaptions2[1] = "Monument Valley, familiar from a thousand westerns including John Ford's 'The Searchers,' 'Stagecoach' and 'She Wore a Yellow Ribbon,' as well as non-cowboy hits such as 'The Ten Commandments,' '2001: A Space Odyssey' and 'Forrest Gump.' ";
aCaptions2[2] = "A section of the 17 mile unpaved loop road that winds through the park and takes you past such unforgettable landmarks as John Ford's Point, The Mittens and the Three Sisters (pictured).";
aCaptions2[3] = "One of the distinctively decorated Navajo jewelry stalls that line the roads around Monument Valley.";
aCaptions2[4] = "The newer of the two Navajo Bridges that span the Colorado River's Marble Canyon. Until the first bridge was built in 1929, the nearest crossing was at nearby Lees Ferry, named after Mormon settler John Lee, who established the ferry operation there in 1873.";
aCaptions2[5] = "A California Condor -- one of the world's rarest birds -- takes a rest on the new Navajo Bridge. In 1987 only 22 birds remained in existence. A captive breeding program has built numbers back up to around 300 but it remains  a critically endangered species.";
aCaptions2[6] = "Kaibab National Forest , north of the Grand Canyon. A lightning strike in 2006 resulted in what became known as The Warm Fire, burning some 40,000 acres of forest.";
aCaptions2[7] = "The north rim of the Grand Canyon falls away to reveal the canyon far below along the Bright Angel Point Trail. The trail follows a narrow ridge leading out to Bright Angel Point, 8,148 feet above sea level and 5,780 feet above the Colorado River.";
aCaptions2[8] = "A section of the Cape Royal Trail leads out onto this spectacular fin of limestone rock, known as Angels' Window for its enormous arch.";
aCaptions2[9] = "Some of the animals living along the road to Cape Royal have lost their natural fear of humans. You're not supposed to interact with them but it's hard to do otherwise when they're this forward.";


aCreds2[0] = "Photo by Peter Thody";
aCreds2[1] = "Photo by Peter Thody";
aCreds2[2] = "Photo by Peter Thody";
aCreds2[3] = "Photo by Peter Thody";
aCreds2[4] = "Photo by Peter Thody";
aCreds2[5] = "Photo by Peter Thody";
aCreds2[6] = "Photo by Peter Thody";
aCreds2[7] = "Photo by Peter Thody";
aCreds2[8] = "Photo by Peter Thody";
aCreds2[9] = "Photo by Peter Thody";

//----------------------------Variables for third gallery--------------------->

var aPhotos3=new Array();
var aCaptions3=new Array();
var aCreds3 = new Array();

aPhotos3[0]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-01.jpg";	// Pictures.
aPhotos3[1]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-02.jpg";
aPhotos3[2]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-03.jpg";
aPhotos3[3]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-04.jpg";
aPhotos3[4]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-05.jpg";
aPhotos3[5]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-06.jpg";
aPhotos3[6]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-07.jpg";
aPhotos3[7]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-08.jpg";
aPhotos3[8]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-09.jpg";
aPhotos3[9]="http://www.roadtripamerica.com/Thodys-American-Adventures/Western-Utah-10.jpg";
aPhotos3[10]=0;// Index of current photo to be displayed. Made an array element to pass by reference.

aCaptions3[0] = "The slick rock eastern section of Zion National Park, entirely different from, but no less impressive than, the main Zion canyon.";
aCaptions3[1] = "The view from the Majestic View Lodge, Springdale. It's hard to argue with the description.";
aCaptions3[2] = "It may just be part of the Majestic View Lodge's impressive taxidermy collection but as far as author's wife Carole is concerned, a bear's a bear, dead or alive.";
aCaptions3[3] = "A Harley parked up in Springdale, just outside Zion National Park - it's hard to imagine a more American scene.";
aCaptions3[4] = "A view from the shuttle bus as it makes it way up the 6-mile long Zion Canyon Scenic Drive. A round-trip, without getting off for a hike, takes about 90 minutes.";
aCaptions3[5] = "Towering sandstone cliffs in Zion National Park, carved over 200 million years by the Virgin River.";
aCaptions3[6] = "The life-giving waters of the Virgin River carve a rich green swathe through an otherwise desert landscape.";
aCaptions3[7] = "A fun reconstruction of the old town of Virgin (Est. 1858) viewed from Utah Highway 9.";
aCaptions3[8] = "Heading into the desert west of Milford - it's a long way from anywhere if you run out of gas.";
aCaptions3[9] = "Early afternoon on Highway 21, there's not much happening in the way of traffic - or anything else for that matter.";


aCreds3[0] = "Photo by Peter Thody";
aCreds3[1] = "Photo by Peter Thody";
aCreds3[2] = "Photo by Peter Thody";
aCreds3[3] = "Photo by Peter Thody";
aCreds3[4] = "Photo by Peter Thody";
aCreds3[5] = "Photo by Peter Thody";
aCreds3[6] = "Photo by Peter Thody";
aCreds3[7] = "Photo by Peter Thody";
aCreds3[8] = "Photo by Peter Thody";
aCreds3[9] = "Photo by Peter Thody";

//----------------------------Variables for fourth gallery--------------------->

var aPhotos4=new Array();
var aCaptions4=new Array();
var aCreds4 = new Array();

aPhotos4[0]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-01.jpg";	// Pictures.
aPhotos4[1]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-02.jpg";
aPhotos4[2]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-03.jpg";
aPhotos4[3]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-04.jpg";
aPhotos4[4]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-05.jpg";
aPhotos4[5]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-06.jpg";
aPhotos4[6]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-07.jpg";
aPhotos4[7]="http://www.roadtripamerica.com/Thodys-American-Adventures/Nevada-08.jpg";
aPhotos4[8]=0;// Index of current photo to be displayed. Made an array element to pass by reference.

aCaptions4[0] = "A long-dead horse drives a long dead car - one of a number of bizarre sculptures that line the road leading into Great Basin National Park.";
aCaptions4[1] = "The 6-storey Hotel Nevada in Ely. When it opened in 1929 (selling bootleg 'Bathtub Gin'), it was the tallest building in the whole state.";
aCaptions4[2] = "Big Job - a Ford F800 in Ely. They don't make 'em like this anymore!";
aCaptions4[3] = "Walk a hundred yards or so from the comfort of your air-conditioned car and you begin to appreciate just how hostile the desert can be.";
aCaptions4[4] = "US Route 6, the Grand Army of the Republic Highway. This section, between Ely and Tonopah, was also known as the Theodore Roosevelt Highway and follows the route of the historic Midland Trail.";
aCaptions4[5] = "A salt flat viewed from the dirt road leading up to the Lunar Crater Volcanic Field.";
aCaptions4[6] = "It's hard to imagine how they survive out here but much of what appears to be impossibly harsh desert is actually cattle range.";
aCaptions4[7] = "Another 20 miles of dead straight empty road stretch out in front of us as we pass through the valleys and ranges of central Nevada.";


aCreds4[0] = "Photo by Peter Thody";
aCreds4[1] = "Photo by Peter Thody";
aCreds4[2] = "Photo by Peter Thody";
aCreds4[3] = "Photo by Peter Thody";
aCreds4[4] = "Photo by Peter Thody";
aCreds4[5] = "Photo by Peter Thody";
aCreds4[6] = "Photo by Peter Thody";
aCreds4[7] = "Photo by Peter Thody";

//----------------------------Variables for fifth gallery--------------------->

var aPhotos5=new Array();
var aCaptions5=new Array();
var aCreds5 = new Array();

aPhotos5[0]="http://www.roadtripamerica.com/Thodys-American-Adventures/California01.jpg";	// Pictures.
aPhotos5[1]="http://www.roadtripamerica.com/Thodys-American-Adventures/California02.jpg";
aPhotos5[2]="http://www.roadtripamerica.com/Thodys-American-Adventures/California03.jpg";
aPhotos5[3]="http://www.roadtripamerica.com/Thodys-American-Adventures/California04.jpg";
aPhotos5[4]="http://www.roadtripamerica.com/Thodys-American-Adventures/California05.jpg";
aPhotos5[5]="http://www.roadtripamerica.com/Thodys-American-Adventures/California06.jpg";
aPhotos5[6]="http://www.roadtripamerica.com/Thodys-American-Adventures/California07.jpg";
aPhotos5[7]="http://www.roadtripamerica.com/Thodys-American-Adventures/California08.jpg";
aPhotos5[8]="http://www.roadtripamerica.com/Thodys-American-Adventures/California09.jpg";
aPhotos5[9]="http://www.roadtripamerica.com/Thodys-American-Adventures/California10.jpg";
aPhotos5[10]=0;// Index of current photo to be displayed. Made an array element to pass by reference.

aCaptions5[0] = "Beautiful June Lake on the eastern Sierra Nevada, viewed from a section of the 22 mile scenic loop that also takes in Gull Lake, Silver Lake and Grant Lake.";
aCaptions5[1] = "An outhouse at the western end of the ghost town of Bodie. In its heyday, this gold mining town boasted 65 saloons and was described by one clergyman as 'a sea of sin, lashed by the tempests of lust and passion.'";
aCaptions5[2] = "Mono Lake has no outlet so salt levels are two and a half times higher than seawater. The tufa towers to the left are created by calcium-bearing freshwater springs that well up through the alkaline lake water to create limestone.";
aCaptions5[3] = "A section of the Tioga Pass, the mountain route that allows summer visitors to cross the Sierra Nevada into Yosemite National Park. The open season depends in snowfall but can be as short as July to October.";
aCaptions5[4] = "Yosemite's most recognisable feature, Half Dome, viewed from Glacier Point. Experts now believe that  the missing chunk may have been smaller than originally thought and that we should perhaps be calling it Threequarters Dome.";
aCaptions5[5] = "Our first ever, real-life wild bear. Coming from a country where anything larger or more dangerous than a rabbit is a big deal, this was something quite special (although, to be completely honest, I have more aggressive rabbits).";
aCaptions5[6] = "Looking up into the trees in the Sequoia National Park, home to the earth's largest living species. It's almost beyond belief that, as recently as 2006, conservationists were having to fight proposals by the Bush administration to allow logging here.";
aCaptions5[7] = "Sitting by our campfire in the Sequoia National Park, watching the sun disappear through the trees. Life really doesn't get much better than this.";
aCaptions5[8] = "The burned out remnants of the Warden's home on Alcatraz Island. It was destroyed during the Native American Occupation of Alcatraz (1969-71), designed, among other things, to raise awareness of the plight of native peoples.";
aCaptions5[9] = "The streets of San Francisco. Sure they're steep, but if you walk one way and jump on a cable car on the way back you really do get to see more of the city.";


aCreds5[0] = "Photo by Peter Thody";
aCreds5[1] = "Photo by Peter Thody";
aCreds5[2] = "Photo by Peter Thody";
aCreds5[3] = "Photo by Peter Thody";
aCreds5[4] = "Photo by Peter Thody";
aCreds5[5] = "Photo by Peter Thody";
aCreds5[6] = "Photo by Peter Thody";
aCreds5[7] = "Photo by Peter Thody";
aCreds5[8] = "Photo by Peter Thody";
aCreds5[9] = "Photo by Peter Thody";

//----------------------------Variables for sixth gallery--------------------->

var aPhotos6=new Array();
var aCaptions6=new Array();
var aCreds6 = new Array();

aPhotos6[0]="http://www.roadtripamerica.com/Thodys-American-Adventures/South01.jpg";	// Pictures.
aPhotos6[1]="http://www.roadtripamerica.com/Thodys-American-Adventures/South02.jpg";
aPhotos6[2]="http://www.roadtripamerica.com/Thodys-American-Adventures/South03.jpg";
aPhotos6[3]="http://www.roadtripamerica.com/Thodys-American-Adventures/South04.jpg";
aPhotos6[4]="http://www.roadtripamerica.com/Thodys-American-Adventures/South05.jpg";
aPhotos6[5]="http://www.roadtripamerica.com/Thodys-American-Adventures/South06.jpg";
aPhotos6[6]="http://www.roadtripamerica.com/Thodys-American-Adventures/South07.jpg";
aPhotos6[7]="http://www.roadtripamerica.com/Thodys-American-Adventures/South08.jpg";
aPhotos6[8]=0;// Index of current photo to be displayed. Made an array element to pass by reference.

aCaptions6[0] = "Beautiful June Lake on the eastern Sierra Nevada, viewed from a section of the 22 mile scenic loop that also takes in Gull Lake, Silver Lake and Grant Lake.";
aCaptions6[1] = "An outhouse at the western end of the ghost town of Bodie. In its heyday, this gold mining town boasted 65 saloons and was described by one clergyman as 'a sea of sin, lashed by the tempests of lust and passion.'";
aCaptions6[2] = "Mono Lake has no outlet so salt levels are two and a half times higher than seawater. The tufa towers to the left are created by calcium-bearing freshwater springs that well up through the alkaline lake water to create limestone.";
aCaptions6[3] = "A section of the Tioga Pass, the mountain route that allows summer visitors to cross the Sierra Nevada into Yosemite National Park. The open season depends in snowfall but can be as short as July to October.";
aCaptions6[4] = "Yosemite's most recognisable feature, Half Dome, viewed from Glacier Point. Experts now believe that  the missing chunk may have been smaller than originally thought and that we should perhaps be calling it Threequarters Dome.";
aCaptions6[5] = "Our first ever, real-life wild bear. Coming from a country where anything larger or more dangerous than a rabbit is a big deal, this was something quite special (although, to be completely honest, I have more aggressive rabbits).";
aCaptions6[6] = "Looking up into the trees in the Sequoia National Park, home to the earth's largest living species. It's almost beyond belief that, as recently as 2006, conservationists were having to fight proposals by the Bush administration to allow logging here.";
aCaptions6[7] = "Sitting by our campfire in the Sequoia National Park, watching the sun disappear through the trees. Life really doesn't get much better than this.";

aCreds6[0] = "Photo by Peter Thody";
aCreds6[1] = "Photo by Peter Thody";
aCreds6[2] = "Photo by Peter Thody";
aCreds6[3] = "Photo by Peter Thody";
aCreds6[4] = "Photo by Peter Thody";
aCreds6[5] = "Photo by Peter Thody";
aCreds6[6] = "Photo by Peter Thody";
aCreds6[7] = "Photo by Peter Thody";