function gallery(sector,numb) {
area = sector;
show(numb);
preload();
}

function show(num) {
photos = new Array(27);
photos[0] = "intro";

if ( area == "colour1" ) {
photos[1] = "butterfly"; // out of the cocoon
photos[2] = "darktree"; // wandering in the park
photos[3] = "shore"; // carves like water
photos[4] = "barnacles"; // they all love the water
photos[5] = "light"; // sun shines through
photos[6] = "halfwater"; // half water, half earth, all beautiful
photos[7] = "woodchuck"; // he can chuck a lot of wood
photos[8] = "spring"; // spring at last
photos[9] = "cliffjump"; // earthbound, airborne, underwater
photos[10] = "babytree"; // moss grows on the shield
photos[11] = "bluelake"; // welcome, swimmers
photos[12] = "j-bird"; // we warned you...
photos[13] = "yellowflowers"; // reaching for the sun
photos[14] = "splitrock"; // water and rock
photos[15] = "tilt"; // falling off the earth
photos[16] = "breakwater"; // breakwater, Victoria
photos[17] = "redtree"; // a hidden dragonfly
photos[18] = "cookin"; // delicious
photos[19] = "tunnelway"; // the best way out is through
photos[20] = "nearlyblooming"; // beauty unfolding
photos[21] = "lotus"; // padma
photos[22] = "riffle"; // the endless ebb and flow
photos[23] = "flower"; // life happens
photos[24] = "waterfall"; // to do: laugh, swim, climb waterfall
photos[25] = "helmwheel"; // as long as we can sail away
photos[26] = "fish"; // not too amused
photos[27] = "lisa_dylan"; // mother and child
}

if ( area == "colour2" ) {
photos[1] = "mountain"; // do things always look this good to birds?
photos[2] = "katie_dylan"; // playtime
photos[3] = "froggy"; // lord of the river
photos[4] = "windy"; // rough water
photos[5] = "coniferrock"; // rock to soil to tree
photos[6] = "turtle"; // watch your toes, kids...
photos[7] = "bluewave"; // the waves massage the shore...
photos[8] = "mushroom"; // hidden treasure
photos[9] = "grasshopper"; // mr. hopper going about his business
photos[10] = "mosstree"; // my first rainforest
photos[11] = "apples"; // organic snackin'
photos[12] = "logfall"; // what goes up...
photos[13] = "kayla"; // in every little girl, there's a mighty lion
photos[14] = "leaflog"; // death/rebirth
photos[15] = "mark_dylan"; // father and child
photos[16] = "firepit"; // we built a home for fire
photos[17] = "crawler"; // this one's optimistic...
photos[18] = "greyrock"; // a thousand shades of grey
photos[19] = "emma"; // emmmmma
photos[20] = "roundmountain"; // on the way back
photos[21] = "tipi"; // old school
photos[22] = "spider"; // ever watchful
photos[23] = "plants"; // tame plants
photos[24] = "checkers"; // this is war...
photos[25] = "redfire"; // the yang side
photos[26] = "leaves"; // the yin side
photos[27] = "mymirror3"; // self-portrait with beard and seriousness
}

if ( area == "grey" ) {
photos[1] = "zooma"; // the heavyweight champ
photos[2] = "fishy"; // find the fish!
photos[3] = "plane"; // come fly with me
photos[4] = "crick"; // leeches, frogs, and joy
photos[5] = "umbrella"; // drained of purple
photos[6] = "winter2"; // reach for the winter sun
photos[7] = "dinofoot"; // tracking the big bird
photos[8] = "winter1"; // together we stand...
photos[9] = "winterreeds"; // somebody find me a sax...
photos[10] = "sundial"; // the slant of sunlight
photos[11] = "logchain"; // bamfield harbour, BC
photos[12] = "wintertracks"; // the white birch
photos[13] = "darkleaves"; // study in darkness
photos[14] = "fernfence"; // in the end the jungle wins
photos[15] = "shadow"; // don't look back
photos[16] = "microflint"; // look closer
photos[17] = "darkmaple"; // leaf vs. light
photos[18] = "winterwater"; // time for hibernation
photos[19] = "daniel"; // waking joy
photos[20] = "david"; // sleeping joy
photos[21] = "darkdoo"; // be here now
photos[22] = "vip"; // let's kick it
photos[23] = "thecrew"; // the brotherhood
photos[24] = "j-bird2"; // the flip side
photos[25] = "darkmirror"; // self-portrait '97
photos[26] = "drunk_punk"; // original three reprazent
photos[27] = "juanmar"; // giovanni
}

document.mainimage.src = area + '/' + photos[num] + '.jpg';
var prev = num - 1;
if ( prev == 0 ) { prev = 27; }
document.getElementById("prev").innerHTML = "<a href=\"javascript:show(" + prev + ")\"><img src=\"images/prev.gif\"></a>";
var next = num + 1;
if ( next == 28 ) { next = 1; }
document.getElementById("next").innerHTML = "<a href=\"javascript:show(" + next + ")\"><img src=\"images/next.gif\"></a>";

}

function preload() {
var prel = new Array(27);
for( i = 0; i < 27; i++ ) 
{ prel[i] = new Image(); 
prel[i] = area + '/' + photos[i] + '.jpg';
}
}

