 <!--//--><![CDATA[//><!--

  //
  // CSS Linked Photo Shuffler v1.1 by
  //   Carl Camera
  //   http://iamacamera.org 
  //
  // setOpacityS03 Function and inpiration from Photo Fade by
  //   Richard Rutter
  //   http://clagnut.com
  //
  // License: Creative Commons Attribution 2.5  License
  //   http://creativecommons.org/licenses/by/2.5/
  //

  // Customize your photo shuffle settings
  // 
  // * Surround the target <img /> with a <div>. specify id= in both
  // * The first and final photo displayed is in the html <img> tag
  // * The array contains paths to photos you want in the rotation. 
  //   If you want the first photo in the rotation, then it's best to
  //   put it as the final array image.  All photos must be same dimension
  // * The rotations variable specifies how many times to repeat array.
  //   images. zero is a valid rotation value.

  var gblPhotoShufflerDivIdS03 = "photodivS03";
  var gblPhotoShufflerImgIdS03 = "photoimgS03";
  var gblPhotoShufflerAnchorIdS03 = "photoanchorS03";
  var gblImgS03 = new Array(
 	"images/projects/dias/prj-C02.gif?v=0",
    "images/projects/dias/prj-C03.gif?v=0",
    "images/projects/dias/0trans.gif?v=0",
    "images/projects/dias/0trans.gif?v=0",
	"images/projects/dias/prj-C01.gif?v=0"	);
  var gblHrefS03 = new Array(
   
	"../Z-projects/05exposiciones/05-prj002/prj05-002.php",
     "../Z-projects/05exposiciones/05-prj001/prj05-001.php",
	 "",
	 "",
	 "../Z-projects/05exposiciones/05-prj001/prj05-001.php"   );
  var gblPauseSecondsS03 = 5;
  var gblFadeSecondsS03 = 1;
  var gblRotationsS03 = 99;

  // End Customization section
  
  var gblDeckSizeS03 = gblImgS03.length;
  var gblOpacityS03 = 100;
  var gblOnDeckS03 = 0;
  var gblStartImgS03;
  var gblStartHrefS03;
  var gblImageRotationsS03 = gblDeckSizeS03 * (gblRotationsS03+1);

 //  window.onload = photoShufflerLaunchS03;
  
  function photoShufflerLaunchS03()
  {
  	var theimgS03 = document.getElementById(gblPhotoShufflerImgIdS03);
        gblStartImgS03 = theimgS03.src; // save away to show as final image
  	var theanchorS03 = document.getElementById(gblPhotoShufflerAnchorIdS03);
        gblStartHrefS03 = theimgS03.href; // save away to show as final image

	document.getElementById(gblPhotoShufflerDivIdS03).style.backgroundImage='url(' + gblImgS03[gblOnDeckS03] + ')';
	setTimeout("photoShufflerFadeS03()",gblPauseSecondsS03*1000);
  }

  function photoShufflerFadeS03()
  {
  	var theimgS03 = document.getElementById(gblPhotoShufflerImgIdS03);
	
  	// determine delta based on number of fade seconds
	// the slower the fade the more increments needed
        var fadeDeltaS03 = 100 / (30 * gblFadeSecondsS03);

	// fade top out to reveal bottom image
	if (gblOpacityS03 < 2*fadeDeltaS03 ) 
	{
	  gblOpacityS03 = 100;
	  // stop the rotation if we're done
	  if (gblImageRotationsS03 < 1) return;
	  photoShufflerShuffleS03();
	  // pause before next fade
          setTimeout("photoShufflerFadeS03()",gblPauseSecondsS03*1000);
	}
	else
	{
	  gblOpacityS03 -= fadeDeltaS03;
	  setOpacityS03(theimgS03,gblOpacityS03);
	  setTimeout("photoShufflerFadeS03()",30);  // 1/30th of a second
	}
  }

  function photoShufflerShuffleS03()
  {
	var thedivS03 = document.getElementById(gblPhotoShufflerDivIdS03);
	var theimgS03 = document.getElementById(gblPhotoShufflerImgIdS03);
	var theanchorS03 = document.getElementById(gblPhotoShufflerAnchorIdS03);
	
	// copy div background-image to img.src
	theimgS03.src = gblImgS03[gblOnDeckS03];
	theanchorS03.href = gblHrefS03[gblOnDeckS03];
	window.status = gblHrefS03[gblOnDeckS03]; // updates status bar (optional)
	// set img opacity to 100
	setOpacityS03(theimgS03,100);

        // shuffle the deck
	gblOnDeckS03 = ++gblOnDeckS03 % gblDeckSizeS03;
	// decrement rotation counter
	if (--gblImageRotationsS03 < 1)
	{
	  // insert start/final image if we're done
	  gblImgS03[gblOnDeckS03] = gblStartImgS03;
	  gblHrefS03[gblOnDeckS03] = gblStartHrefS03;
	}

	// slide next image underneath
	thedivS03.style.backgroundImage='url(' + gblImgS03[gblOnDeckS03] + ')';
  }

function setOpacityS03(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;
}


//--><!]]>
