  var gblPhotoShufflerDivId = "content_0";
  var gblPhotoShufflerImgId = "gallery"; 
  var gblImg = new Array(
	"images/aged.hands.holding.flower.00.jpg",
	"images/autumn.rain.00.jpg",
	"images/autumn.sunset.jpg",
	"images/away.from.reality.jpg",
	"images/baby.chick.00.jpg",
	"images/beautiful.sky.01.jpg",
	"images/beauty.00.jpg",
	"images/beauty.01.jpg",
	"images/bee.balanced.jpg",
	"images/blue.eyes.00.jpg",
	"images/blue.lake.jpg",
	"images/buggy.blue.eyes.00.jpg",
	"images/butterfly.and.flower.00.jpg",
	"images/butterfly.stillness.00.jpg",
	"images/cat.on.the.hat.jpg",
	"images/chocolate.chip.cookies.00.jpg",
	"images/Christmas.kitty.00.jpg",
	"images/cute.lil.bee.and.flower.00.jpg",
	"images/cute.lil.kitty.00.jpg",
	"images/cute.lil.kitty.01.jpg",
	"images/cute.lil.kitty.02.jpg",
	"images/cute.lil.pup.01.jpg",
	"images/disney.00.jpg",
	"images/disneyland.castle.00.jpg",
	"images/dogs.eye.00.jpg",
	"images/dragonfly.00.jpg",
	"images/dreams.in.copper.jpg",
	"images/elegance.00.jpg",
	"images/end.of.2005.jpg",
	"images/evil.leaf.jpg",
	"images/eye.of.the.tiger.jpg",
	"images/fly.eyes.00.jpg",
	"images/forrest.fire.00.jpg",
	"images/full.moon.00.jpg",
	"images/God.and.man.00.jpg",
	"images/God.and.man.01.jpg",
	"images/heaven.00.jpg",
	"images/heavy.gale.jpg",
	"images/humphy.lil.kitty.00.jpg",
	"images/inner.radiance.00.jpg",
	"images/island.of.refuge.jpg",
	"images/leopard.baby.eyes.jpg",
	"images/lets.get.buggy.jpg",
	"images/light.jpg",
	"images/lightning.00.jpg",
	"images/lions.00.jpg",
	"images/lions.on.the.hunt.jpg",
	"images/little.lion.jpg",
//	"images/malia.jones.00.jpg",
	"images/massive.tornado.00.jpg",
	"images/Merry.Christmas.01.07.06.jpg",
	"images/mighty.mantids.jpg",
	"images/milky.way.jpg",
	"images/milky.white.jpg",
	"images/mirror.of.my.soul.jpg",
	"images/mr.tibbs.jpg",
	"images/my.angel.00.jpg",
	"images/my.precious.jpg",
	"images/naughty.kitty.00.jpg",
	"images/offshore.lightning.jpg",
	"images/paradise.palm.jpg",
	"images/pinecone.jpg",
	"images/pissed.off.lions.jpg",
	"images/red.rose.00.jpg",
	"images/reflection.of.innocence.jpg",
	"images/ring.nebula.00.jpg",
	"images/serenity.00.jpg",
	"images/silence.00.jpg",
	"images/single.memory.jpg",
	"images/sky.so.blue.jpg",
	"images/sunset.in.chile.jpg",
	"images/tender.kiss.00.jpg",
	"images/tiger.deep.in.thought.00.jpg",
	"images/tiger.lullaby.jpg",
	"images/tootsies.00.jpg",
	"images/traversing.along.the.road.alone.jpg",
	"images/tree.sunset.00.jpg",
	"images/whisper.jpg",
	"images/white.forrest.jpg",
	"images/winter.wonderland.jpg",
	"images/world.of.colors.jpg"
);

  for(var j,x,i=gblImg.length; i; j = parseInt(Math.random() * i), x = gblImg[--i], gblImg[i]=gblImg[j], gblImg[j] = x);
	

  var gblPauseSeconds = 5;
  var gblFadeSeconds = .85;
  var gblRotations = 1;  
  var gblDeckSize = gblImg.length;
  var gblOpacity = 100;
  var gblOnDeck = 0;
  var gblStartImg;
  var gblImageRotations = gblDeckSize * (gblRotations+1);

  function shuffle()
  {
  	var theimg = document.getElementById(gblPhotoShufflerImgId);
        gblStartImg = theimg.src; // save away to show as final image

	document.getElementById(gblPhotoShufflerDivId).style.backgroundImage='url(' + gblImg[gblOnDeck] + ')';
	setTimeout("photoShufflerFade()",gblPauseSeconds*1000);
  }

  function photoShufflerFade()
  {
  	var theimg = document.getElementById(gblPhotoShufflerImgId);
	
  	// determine delta based on number of fade seconds
	// the slower the fade the more increments needed
        var fadeDelta = 100 / (30 * gblFadeSeconds);

	// fade top out to reveal bottom image
	if (gblOpacity < 2*fadeDelta ) 
	{
	  gblOpacity = 100;
	  // stop the rotation if we're done
	  if (gblImageRotations < 1) return;
	  photoShufflerShuffle();
	  // pause before next fade
          setTimeout("photoShufflerFade()",gblPauseSeconds*1000);
	}
	else
	{
	  gblOpacity -= fadeDelta;
	  setOpacity(theimg,gblOpacity);
	  setTimeout("photoShufflerFade()",30);  // 1/30th of a second
	}
  }

  function photoShufflerShuffle()
  {
	var thediv = document.getElementById(gblPhotoShufflerDivId);
	var theimg = document.getElementById(gblPhotoShufflerImgId);
	
	// copy div background-image to img.src
	theimg.src = gblImg[gblOnDeck];
	// set img opacity to 100
	setOpacity(theimg,100);

        // shuffle the deck
	gblOnDeck = ++gblOnDeck % gblDeckSize;
	// decrement rotation counter
	if (--gblImageRotations < 1)
	{
	  // insert start/final image if we're done
	  gblImg[gblOnDeck] = gblStartImg;
	}

	// slide next image underneath
	thediv.style.backgroundImage='url(' + gblImg[gblOnDeck] + ')';
  }

  function setOpacity(obj, opacity) {
    opacity = (opacity == 100)?99.999:opacity;
    
    // IE/Win
    obj.style.filter = "alpha(opacity:"+opacity+")";
    
    // Safari<1.2, Konqueror
    obj.style.KHTMLOpacity = opacity/100;

    // Older Mozilla and Firefox
    obj.style.MozOpacity = opacity/100;

    // Safari 1.2, newer Firefox and Mozilla, CSS3
    obj.style.opacity = opacity/100;
  }