/*
'****************************************************************************************
'**  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 = 9;

// Set the slideshow speed (in milliseconds)
var SlideShowSpeed = (g_nImageRotateEverySeconds * 1000);

// Set the duration of crossfade (in seconds)
var CrossFadeDuration = 4;

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]  = "Es sin duda el reto m&aacute;s importante, trascendente y estimulante que podemos enfrentar, y enfrentar juntos para dejar un mejor regi&oacute;n a nuestros hijos, pero especialmente y m&aacute;s importante, dejarle mejores hijos a nuestro regi&oacute;n.";
Caption[2]  = "Queremos unirnos para mejorar las condiciones de salud, de nutrici&oacute;n y de educaci&oacute;n de nuestros ni&ntilde;os Latinoamericanos menores de 6 a&ntilde;os. Esa ser&aacute; nuestra forma de encarar la batalla contra la desigualdad.";
Caption[3]  = "A trav&eacute;s de la m&uacute;sica hay una manera de congregar a la sociedad, y congregarla alrededor de un tema que nos une a todos.";
Caption[4]  = "El involucramiento de los artistas es fundamental para mandar este mensaje y lo ha sido en este caso en ALAS para crear cohesi&oacute;n entre todos los que formamos parte de esta aventura. Esta es la primera vez que se ve en Am&eacute;rica Latina esta uni&oacute;n d&oacute;nde todos queremos un mismo fin que es un desarrollo mucho mejor para la regi&oacute;n y mucho m&aacute;s justo para la ni&ntilde;ez.";
Caption[5]  = "ALAS ha tenido una gran visi&oacute;n, y puede que conviertan a &eacute;sta en la generaci&oacute;n que acabe con la pobreza de Am&eacute;rica Latina, particularmente concentr&aacute;ndose en los retos de los m&aacute;s ni&ntilde;os.";
Caption[6]  = "En la discusi&oacute;n importante sobre las causas y  consecuencias de esta crisis  los ni&ntilde;os y los pobres no son los culpables. Por eso a ellos no podemos cobrarles la factura.";
Caption[7]  = "ALAS es un movimiento para concienciar y generar situaciones que tengan como resultado el beneficio para el Desarrollo Infantil Temprano, somos, por as&iacute; decirlo, la voz de los ni&ntilde;os latinoamericanos que hasta ahora no hab&iacute;an tenido voz.";
Caption[8]  = "La desigualdad parte desde la cuna, y si uno no logra entregar efectivamente los elementos desde los primeros d&iacute;as, es muy dif&iacute;cil m&aacute;s adelante pasar los obst&aacute;culos que la vida en nuestra Am&eacute;rica Latina le va presentando a los ni&ntilde;os, y luego j&oacute;venes y adultos.";
Caption[9]  = "Esta iniciativa de ALAS de llevar a los presidentes de la regi&oacute;n a abrazar el compromiso de impulsar el desarrollo Infantil temprano y la educaci&oacute;n, no s&oacute;lo es pertinente, es un acto de justicia elemental.  Pero es, sobre todo, un gesto de esperanza.";
Caption[10]  = "La clave de gobernar, de cualquier acci&oacute;n que se haga en pol&iacute;tica p&uacute;blica es pensar que uno trabaja para unos patronos que son estos ni&ntilde;os menores de seis a&ntilde;os que hoy nos re&uacute;nen y cuentan con el compromiso decidido y absoluto de M&eacute;jico para trabajar por la causa de ALAS y de todos los latinoamericanos.";
Caption[11]  = "Porque cada 90 segundos muere un ni&ntilde;o menor de 5 a&ntilde;os, y muere por el simple hecho de haber nacido pobre. Hoy podemos actuar para impedir que muera, y tambi&eacute;n para hacer que deje de ser pobre.";
Caption[12]  = "Siento que ALAS puede ser un ejemplo que no solamente puede mover nuestro continente, pero que ojal&aacute; mueva al mundo entero.";


Attrib[1]  = "&#8211; Carlos Slim";
Attrib[2]  = "&#8211; Shakira";
Attrib[3]  = "&#8211; Lu&iacute;s Alberto Moreno, Director del Banco Interamericano de Desarrollo";
Attrib[4]  = "&#8211; Emilio Azcarr&aacute;ga, Presidente Grupo Televisa";
Attrib[5]  = "&#8211; Jeffrey Sachs, Director del Earth Institute";
Attrib[6]  = "&#8211; &Aacute;lvaro Uribe V&eacute;lez, Presidente de Colombia";
Attrib[7]  = "&#8211; Alejandro Sanz";
Attrib[8]  = "&#8211; Michelle Bachelet, Presidenta de 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();


