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

  //
  // CSS Linked Photo Shuffler v1.1 by
  //   Carl Camera
  //   http://iamacamera.org 
  //
  // setOpacityS11 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 gblPhotoShufflerDivIdS11 = "photodivS11";
  var gblPhotoShufflerImgIdS11 = "photoimgS11";
  var gblPhotoShufflerAnchorIdS11 = "photoanchorS11";
  var gblImgS11 = new Array(
	"images/projects/dias/prj-L01.gif?v=0",
	"images/projects/dias/prj-L02.gif?v=0",
	"images/projects/dias/prj-L03.gif?v=0",
	"images/projects/dias/prj-L04.gif?v=0",
	"images/projects/dias/prj-L05.gif?v=0"   );
  var gblHrefS11 = new Array(
	"http://garciatorrentearquitectos.blogspot.com/",
	"http://garciatorrentearquitectos.blogspot.com/",
	"http://garciatorrentearquitectos.blogspot.com/",
    "http://garciatorrentearquitectos.blogspot.com/",
	"http://garciatorrentearquitectos.blogspot.com/"   );
  var gblPauseSecondsS11 = 0.3;
  var gblFadeSecondsS11 = 0.3;
  var gblRotationsS11 = 99;

  // End Customization section
  
  var gblDeckSizeS11 = gblImgS11.length;
  var gblOpacityS11 = 100;
  var gblOnDeckS11 = 0;
  var gblStartImgS11;
  var gblStartHrefS11;
  var gblImageRotationsS11 = gblDeckSizeS11 * (gblRotationsS11+1);

 //  window.onload = photoShufflerLaunchS11;
  
  function photoShufflerLaunchS11()
  {
  	var theimgS11 = document.getElementById(gblPhotoShufflerImgIdS11);
        gblStartImgS11 = theimgS11.src; // save away to show as final image
  	var theanchorS11 = document.getElementById(gblPhotoShufflerAnchorIdS11);
        gblStartHrefS11 = theimgS11.href; // save away to show as final image

	document.getElementById(gblPhotoShufflerDivIdS11).style.backgroundImage='url(' + gblImgS11[gblOnDeckS11] + ')';
	setTimeout("photoShufflerFadeS11()",gblPauseSecondsS11*1000);
  }

  function photoShufflerFadeS11()
  {
  	var theimgS11 = document.getElementById(gblPhotoShufflerImgIdS11);
	
  	// determine delta based on number of fade seconds
	// the slower the fade the more increments needed
        var fadeDeltaS11 = 100 / (30 * gblFadeSecondsS11);

	// fade top out to reveal bottom image
	if (gblOpacityS11 < 2*fadeDeltaS11 ) 
	{
	  gblOpacityS11 = 100;
	  // stop the rotation if we're done
	  if (gblImageRotationsS11 < 1) return;
	  photoShufflerShuffleS11();
	  // pause before next fade
          setTimeout("photoShufflerFadeS11()",gblPauseSecondsS11*1000);
	}
	else
	{
	  gblOpacityS11 -= fadeDeltaS11;
	  setOpacityS11(theimgS11,gblOpacityS11);
	  setTimeout("photoShufflerFadeS11()",30);  // 1/30th of a second
	}
  }

  function photoShufflerShuffleS11()
  {
	var thedivS11 = document.getElementById(gblPhotoShufflerDivIdS11);
	var theimgS11 = document.getElementById(gblPhotoShufflerImgIdS11);
	var theanchorS11 = document.getElementById(gblPhotoShufflerAnchorIdS11);
	
	// copy div background-image to img.src
	theimgS11.src = gblImgS11[gblOnDeckS11];
	theanchorS11.href = gblHrefS11[gblOnDeckS11];
	window.status = gblHrefS11[gblOnDeckS11]; // updates status bar (optional)
	// set img opacity to 100
	setOpacityS11(theimgS11,100);

        // shuffle the deck
	gblOnDeckS11 = ++gblOnDeckS11 % gblDeckSizeS11;
	// decrement rotation counter
	if (--gblImageRotationsS11 < 1)
	{
	  // insert start/final image if we're done
	  gblImgS11[gblOnDeckS11] = gblStartImgS11;
	  gblHrefS11[gblOnDeckS11] = gblStartHrefS11;
	}

	// slide next image underneath
	thedivS11.style.backgroundImage='url(' + gblImgS11[gblOnDeckS11] + ')';
  }

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


//--><!]]>