


var imageList = new Array();
var urlList = new Array();
var titleList = new Array();

imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1219518.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.stevelawsonart.com/index.aspx?sectionid=740071#1219518';
titleList.length++; titleList[titleList.length-1] = 'Worm by Steve Lawson';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/12002.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.pamos.co.uk';
titleList.length++; titleList[titleList.length-1] = 'Belfast by Pauline Amos';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1682977.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://steveguttenberg.isendyouthis.com/index.aspx?sectionid=740447#1682977';
titleList.length++; titleList[titleList.length-1] = 'Cutaway by Steve Guttenberg';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1688127.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.mattlord.co.uk/index.aspx?sectionid=741372#1688127';
titleList.length++; titleList[titleList.length-1] = 'Love Power by Matt Lord';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1681767.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.susanashworth.com';
titleList.length++; titleList[titleList.length-1] = 'Summer Trees, Glyndebourne by Susan Ashworth';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1219954.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.martamontoliupaintings.com/index.aspx?sectionid=740115#1219954';
titleList.length++; titleList[titleList.length-1] = 'Tres by Marta Montoliu';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1219763.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.yvonnecoomber.com/index.aspx?sectionid=740073#1219763';
titleList.length++; titleList[titleList.length-1] = 'Love Lives Here (2006) by Yvonne Coomber';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1099.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.heidikoenig.co.uk';
titleList.length++; titleList[titleList.length-1] = 'Spray by Heidi Koenig';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1685954.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.louisedear.com/index.aspx?sectionid=740763#1685954';
titleList.length++; titleList[titleList.length-1] = 'experimenting sweet talk i by Louise Dear';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/12001.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.judywilloughby.com/index.aspx?sectionid=11003#12001';
titleList.length++; titleList[titleList.length-1] = 'Fields by Judy Willoughby';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1682290.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.marcheaton.com/index.aspx?sectionid=740300#1682290';
titleList.length++; titleList[titleList.length-1] = 'Heavy Sinker by Marc Heaton';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1686808.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.kerstinuedingslohmannart.com/index.aspx?sectionid=741208#1686808';
titleList.length++; titleList[titleList.length-1] = 'safari by Kerstin Uedingslohmann';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1681007.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://monicaanselmi.isendyouthis.com/index.aspx?sectionid=740258#1681007';
titleList.length++; titleList[titleList.length-1] = 'Red Cascade by Monica Anselmi';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1682156.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.jamesburkeart.com/index.aspx?sectionid=740411#1682156';
titleList.length++; titleList[titleList.length-1] = 'Floor-Platform-Seating by James Burke';
imageList.length++; imageList[imageList.length-1] = 'http://www.isendyouthis.com/images/art/160/1685968.jpg';
urlList.length++; urlList[urlList.length-1] = 'http://www.charlieosullivanart.com/index.aspx?sectionid=740467#1685968';
titleList.length++; titleList[titleList.length-1] = 'Making Moonshine by Charlie O\'Sullivan';


/*
var imgList = [
		     "http://demo.isendyouthis.com/images/homepics/1106.jpg",
		     "http://demo.isendyouthis.com/images/homepics/18067.jpg"
		     ];
var urlList = [
		     "http://www.stevelawsonart.com/",
		     "http://www.stevelawsonart.com/"
		     ];
*/

  /**
   * Since carousel.addItem uses an HTML string to create the interface
   * for each carousel item, this method formats the HTML for an LI.
   **/

  var fmtItem = function(imgUrl, url, title)
  {
    var innerHTML = '<div style="width: 160px; height: 160px;"><a href="' + url + '" rel="nofollow"><img src="' + imgUrl + '" align="absmiddle" border="0"  alt="' + title + '" /></a></div>';

	  return innerHTML;
  };

  /**
   * Custom inital load handler. Called when the carousel loads the initial
   * set of data items. Specified to the carousel as the configuration
   * parameter: loadInitHandler
   **/
  var loadInitialItems = function(type, args)
  {
	  var start = args[0];
	  var last = args[1];

	  load(this, start, last);
  };

  /**
   * Custom load next handler. Called when the carousel loads the next
   * set of data items. Specified to the carousel as the configuration
   * parameter: loadNextHandler
   **/
  var loadNextItems = function(type, args)
  {
	  var start = args[0];
	  var last = args[1];
	  var alreadyCached = args[2];

	  if(!alreadyCached)
	  {
		  load(this, start, last);
	  }
  };

  /**
   * Custom load previous handler. Called when the carousel loads the previous
   * set of data items. Specified to the carousel as the configuration
   * parameter: loadPrevHandler
   **/
  var loadPrevItems = function(type, args)
  {
	  var start = args[0];
	  var last = args[1];
	  var alreadyCached = args[2];

	  if (!alreadyCached)
	  {
		  load(this, start, last);
	  }
  };

  var load = function(carousel, start, last)
  {
	  for (var i=start;i<=last;i++)
	  {
		  carousel.addItem(i, fmtItem(imageList[i-1], urlList[i-1], titleList[i-1]));
	  }
  };

  /**
   * You must create the carousel after the page is loaded since it is
   * dependent on an HTML element (in this case 'dhtml-carousel'.) See the
   * HTML code below.
   **/
/*
  var m_carousel;
  var loadCarousel = function(numShow, scrollInc, startTime, scrollSpeed)
  {
  	if (numShow == null) numShow = 3;
  	if (scrollInc == null) scrollInc = 1;
  	if (startTime == null) startTime = 6000;
  	if (scrollSpeed == null) scrollSpeed = 2;

	  m_carousel = new YAHOO.extension.Carousel("dhtml-carousel",
		  {
			  numVisible:       numShow,
			  animationSpeed:   scrollSpeed,
			  scrollInc:        scrollInc,
			  navMargin:        0,
			  orientation:      "vertical",
			  autoPlay:         startTime,
			  size:             imageList.length,
			  wrap:             true,
			  loadInitHandler:  loadInitialItems,
			  loadNextHandler:  loadNextItems,
				loadPrevHandler:  loadPrevItems
		  }
	  );
  };
  
  var loadCarousel = function(numShow, scrollInc, startTime, scrollSpeed)
  {
    var c = document.getElementById("dhtml-carousel");
    var list = document.getElementById("html-carousel-list");
    for (var i=0; i<3; i++)
    {
      var li = document.createElement("li");
      li.innerHTML = fmtItem(imageList[i], urlList[i], titleList[i]);
  		list.appendChild(li);
    }
  };
*/
