
eraseCookie(cookieSlideShow);

function preload_gallery(arr)
{

  var content = "";
  for (i=0; i < arr.length; i++)
  {
    content += "<img src=\""+arr[i].active_img+"\" class=\"hiddenPic\">";
  }

  $('preloadImages').innerHTML = content;
}//end


function showSlideShow()
{

  var content = "";
  var style = "";

  randIndex = Math.floor ( Math.random() * slideshow_objects.length ); 
  currentImageIndex = randIndex;
  
  for (i=0; i < slideshow_objects.length; i++)
  {
    if (i == randIndex)
    {
    style = 'style="display: block;"';
    }
    else
    {
    style = 'style="display: none;"';
    }

    
    content += '\n<div class="fade-box" id="box-'+i+'" '+style+'><img src="'+slideshow_objects[i].active_img+'" border=0></div>';
  }

  $('crossfade-container').innerHTML = content;
  
  startPage();

}// end
