/*
'****************************************************************************************
'**  Copyright Notice
'**  http://www.sagecomputerservices.com
'**
'**  Copyright 2007-2008 Sage Computer Services. All Rights Reserved.
'**
'**  This program is commercial proprietary software and may not be modified or distributed 
'**  either privately or commercially except under the terms of the License that accompanies 
'**  this software.
'**
'**  All copyright notices must remain intact in all scripts.
'**
'**  You may not redistribute, repackage, or sell the whole or any part of this program even
'**  if it is modified or reverse engineered in whole or in part without express
'**  permission from the author.
'**
'**  This program is distributed WITHOUT ANY WARRANTY; without even the implied warranty of
'**  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.
'**
'**  Sage Computer Services
'**  http://www.sagecomputerservices.com
'**  sage@sagecomputerservices.com
'**
'****************************************************************************************     
*/      

// (C) 2002 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this header.
// ==============================
// Set the following variables...
// ==============================
var g_nImageRotateEverySeconds = 15;
var g_nImages = 12;

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = (g_nImageRotateEverySeconds * 1000);

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 3;

var Picture = new Array(); // don't change this
var Caption = new Array(); // don't change this
var Attrib = new Array(); // don't change this

// Specify the image files...
// To add more images, just continue
// the pattern, adding to the array below.
// To use fewer images, remove lines
// starting at the end of the Picture array.
// Caution: The number of Pictures *must*
// equal the number of Captions!

/*
for (var picIndex=1; picIndex < (g_nImages+1); picIndex++)
{
	Picture[picIndex]  = sBaseSite + 'images/common/commitment/home_' + picIndex.toString() + '.jpg';
	Caption[picIndex]  = '';
}
*/
Picture[1]  = '/images/common/rotating/296795965_17may08-306.jpg';
Picture[2]  = '/images/common/rotating/COL_WFP_Colombia_SchFeeding7_Antioquia_DavidParra-1.jpg';
Picture[3]  = '/images/common/rotating/DOMREP_04_WFP_Elio_Rujano.jpg';
Picture[4]  = '/images/common/rotating/DOMREP_10_WFP_Elio_Rujano.jpg';
Picture[5]  = '/images/common/rotating/DOMREP_Arenoso-03_Elio_Rujano.jpg';
Picture[6]  = '/images/common/rotating/PER_Pachacutec_Monica_SanMartin_001.jpg';
Picture[7]  = '/images/common/rotating/WFP-CHICHERI___BOL_240106_-_-009.jpg';
Picture[8]  = '/images/common/rotating/WFP-CHICHERI___DSC00530.jpg';
Picture[9]  = '/images/common/rotating/WFP-CHICHERI___DSC_0369.jpg';

Picture[10]  = '/images/common/rotating/DOMREP_10_WFP_Elio_Rujano.jpg';
Picture[11]  = '/images/common/rotating/WFP-CHICHERI___BOL_240106_-_-009.jpg';
Picture[12]  = '/images/common/rotating/DOMREP_Arenoso-03_Elio_Rujano.jpg';

// Specify the Captions...
// To add more captions, just continue
// the pattern, adding to the array below.
// To use fewer captions, remove lines
// starting at the end of the Caption array.
// Caution: The number of Captions *must*
// equal the number of Pictures!

Caption[1]  = "This is without a doubt the most important, significant and stimulating challenge we can face together to leave a better region for our children, but most important of all, to leave better children for our region.";
Caption[2]  = "We got together to improve the health, nutrition and educational conditions of our Latin-American children younger than six years old. This is our way to face the battle against inequality.";
Caption[3]  = "Music is a way to bring society together around a topic that unites us all.";
Caption[4]  = "In ALAS, to have artists involved has been important to send this message and fundamental for creating cohesion among those of us who are part of this adventure. This is the first time a movement like this is seen in Latin America; a movement where we all want to accomplish the same goal: a better development for the region that is fairer for our childhood.";
Caption[5]  = "ALAS had a great vision and it may turn this generation in to the one that ends with poverty in Latin America, concentrating particularly in the challenges of the youngest of all.";
Caption[6]  = "In the discussion about the causes and consequences of this crisis, the children and the poor are not the ones to blame. This is why we can´t pass them the bill.";
Caption[7]  = "ALAS is a movement to generate awareness and situations that have as a result benefits for Early Childhood Development. We are the voice of those Latin American kids that didn’t have a voice until today.";
Caption[8]  = "Inequality starts in the crib, and if you don’t deliver the necessary elements since the first days, it is very hard to later overcome the obstacles that our Latin America presents to our children, youth and adults.";
Caption[9]  = "This initiative of taking the presidents of the region to embrace the commitment to boost Early Childhood Development and education is not only pertinent, but also an act of justice. It is, overall, an expression of hope.";
Caption[10]  = "The key to govern, to whatever action made in the field of public policies, is to think that one works for these little kids younger than six who gather us here today. They have Mexico’s absolute commitment to work for the cause of ALAS and all Latin America.";
Caption[11]  = "Every 90 seconds a child younger than five years old dies, and dies for the simple fact of being born poor. Today we can act to prevent them from dying and from living in poverty.";
Caption[12]  = "I feel that ALAS can be an example that not only moves our continent, but that hopefully will move the entire world.";

Attrib[1]  = "&#8211; Carlos Slim";
Attrib[2]  = "&#8211; Shakira";
Attrib[3]  = "&#8211; Lu&iacute;s Alberto Moreno, Director of the Interamerican Development Bank";
Attrib[4]  = "&#8211; Emilio Azcarr&aacute;ga, President of Televisa Group";
Attrib[5]  = "&#8211; Jeffrey Sachs, Director of the Earth Institute at Columbia University";
Attrib[6]  = "&#8211; &Aacute;lvaro Uribe V&eacute;lez, Presidente de Colombia";
Attrib[7]  = "&#8211; Alejandro Sanz";
Attrib[8]  = "&#8211; Michelle Bachelet, President of Chile";
Attrib[9]  = "&#8211; Fher from Man&aacute;";
Attrib[10]  = "&#8211; Felipe Calder&oacute;n, Presidente de M&eacute;xico";
Attrib[11]  = "&#8211; Omar Alfano";
Attrib[12]  = "&#8211; Stanley Motta";

// =====================================
// Do not edit anything below this line!
// =====================================

var tss;
var iss;
var jss = 1;  // satrting image number
var pss = Picture.length-1;
var preLoad=null;

// Were there any pictures?
if (pss >= 0)
{
	preLoad = new Array();
	for (iss = 1; iss < pss+1; iss++)
	{
		preLoad[iss] = new Image();
		preLoad[iss].src = Picture[iss];
	}
}
// =====================================
// runSlideShow
// =====================================
function runSlideShow()
{
	/*
	if (g_bFirst)
	{
		g_bFirst=false;
		setTimeout('runSlideShow()', SlideShowSpeed);
		return;
	}
	*/
	
	if (preLoad==null) // no pictures defined in the database
	{
		return;
	}
	
	if ((document.all) && (!IsOpera()))
	{
		document.images.MyCommitImg.style.filter="blendTrans(duration=2)";
		document.images.MyCommitImg.style.filter="blendTrans(duration=CrossFadeDuration)";
		document.images.MyCommitImg.filters.blendTrans.Apply();
	}
	
	document.images.MyCommitImg.src = preLoad[jss].src;
	
	//alert(document.images.MyCommitImg.src);
	
	//Only if using caption: 
	// <td id=CaptionBox class=Caption ...
	if (document.getElementById) document.getElementById("MyCommitText").innerHTML= Caption[jss];
	if (document.getElementById) document.getElementById("MyCommitAttrib").innerHTML= Attrib[jss];
	
	if ((document.all) && (!IsOpera())) document.images.MyCommitImg.filters.blendTrans.Play();
	
	jss = jss + 1;
	if (jss > (pss)) jss=1;
	tss = setTimeout('runSlideShow()', SlideShowSpeed);
}

// run the slideshow
	runSlideShow();

