// Define arrays
var imageArray=new Array();		// stores image path
var largeImageArray=new Array();	// stores large image path
var pbCaptionArray=new Array();		// stores the pbCaption (displayed above enlarged image)
var altArray=new Array();		// stores image alt text


//*******************************************************************************************
//****                    Edit values of variables from here on                         *****	
//*******************************************************************************************

gallery_link = 'http://www.leoproject.org/gallery/sponsored-projects-gallery/project-gallery-save-the-pre-school/';

// Feel free to add more images to the arrays

// Give the full path of the image 
imageArray[0]='http://www.leoproject.org/images/small/save_the_pre_school_1.jpg';
imageArray[1]='http://www.leoproject.org/images/small/save_the_pre_school_2.jpg';
imageArray[2]='http://www.leoproject.org/images/small/save_the_pre_school_3.jpg';
imageArray[3]='http://www.leoproject.org/images/small/save_the_pre_school_4.jpg';
imageArray[4]='http://www.leoproject.org/images/small/save_the_pre_school_5.jpg';
imageArray[5]='http://www.leoproject.org/images/small/save_the_pre_school_6.jpg';
imageArray[6]='http://www.leoproject.org/images/small/save_the_pre_school_7.jpg';
imageArray[7]='http://www.leoproject.org/images/small/save_the_pre_school_8.jpg';
imageArray[8]='http://www.leoproject.org/images/small/save_the_pre_school_9.jpg';
imageArray[9]='http://www.leoproject.org/images/small/save_the_pre_school_10.jpg';


// Give the full path of the large image 
largeImageArray[0]='http://www.leoproject.org/images/large/save_the_pre_school_1.jpg';
largeImageArray[1]='http://www.leoproject.org/images/large/save_the_pre_school_2.jpg';
largeImageArray[2]='http://www.leoproject.org/images/large/save_the_pre_school_3.jpg';
largeImageArray[3]='http://www.leoproject.org/images/large/save_the_pre_school_4.jpg';
largeImageArray[4]='http://www.leoproject.org/images/large/save_the_pre_school_5.jpg';
largeImageArray[5]='http://www.leoproject.org/images/large/save_the_pre_school_6.jpg';
largeImageArray[6]='http://www.leoproject.org/images/large/save_the_pre_school_7.jpg';
largeImageArray[7]='http://www.leoproject.org/images/large/save_the_pre_school_8.jpg';
largeImageArray[8]='http://www.leoproject.org/images/large/save_the_pre_school_9.jpg';
largeImageArray[9]='http://www.leoproject.org/images/large/save_the_pre_school_10.jpg';

// Give the image alt text. Again, numbers correspond.
altArray[0]='Kumari pre-school, in rural Sri Lanka. The current, dark, classroom.';
altArray[1]='Outside the Kumari pre-school. And the Cherry QQ. Our LEO Project Foundation car. No need for an expensive jeep!';
altArray[2]='Children are happy at this pre-school. The teacher has over25 years teaching experience.';
altArray[3]='A great number of the current 5 year olds outside the aging pre-school.';
altArray[4]='The only thing that does comply to standards must be the tables.';
altArray[5]='A good view on the current state of the pre-school. Ready for major renovation!';
altArray[6]='Another look at the pre-school. The only one in a 8 kilometre radius.';
altArray[7]='Typical classroom setting in Sri Lanka with the blackboard simply painted on a concrete wall.';
altArray[8]='The poor condition of the pre-school is well visible inside.';
altArray[9]='Even the children\'s art work is coming down from the walls.';


// Give the caption for above the enlarged image. Again, numbers correspond.
pbCaptionArray[0]='Kumari pre-school, in rural Sri Lanka. The current, dark, classroom.';
pbCaptionArray[1]='Outside the Kumari pre-school. And the Cherry QQ. Our LEO Project Foundation car. No need for an expensive jeep!';
pbCaptionArray[2]='Children are happy at this pre-school. The teacher has over25 years teaching experience.';
pbCaptionArray[3]='A great number of the current 5 year olds outside the aging pre-school.';
pbCaptionArray[4]='The only thing that does comply to standards must be the tables.';
pbCaptionArray[5]='A good view on the current state of the pre-school. Ready for major renovation!';
pbCaptionArray[6]='Another look at the pre-school. The only one in a 8 kilometre radius.';
pbCaptionArray[7]='Typical classroom setting in Sri Lanka with the blackboard simply painted on a concrete wall.';
pbCaptionArray[8]='The poor condition of the pre-school is well visible inside.';
pbCaptionArray[9]='Even the children\'s art work is coming down from the walls.';


var sspeed = 3;		// scroll speed in pixels per 1/10 second
var sWidth = 170;	// width of the image slider
var sHeight = 350;	// height of the image slider

direction = 'vertical';	// horizontal or vertical slider?

// Using null will center the image in the screen. Positions are relative to the small image
var largeImageLeft = 190	// The position of the left side of the enlarged image in pixels
var largeImageTop = null	// The position of the top side of the enlarged image in pixels 

var headerTitle = 'Project Images'	// Title to go in the header for vertical slider only

//*******************************************************************************************
//****                    No more editing beyond this point                              *****	
//*******************************************************************************************

var sspeedperm = sspeed;	// permanent scroll speed storage variable
var mouseoutspeed = sspeedperm; // mouseoutspeed handles the scroll speed on mouse out.

// prepare the html for in the body
bodyHtml = '<div class="header-green">';
bodyHtml = bodyHtml + '<div class="header-content">';
bodyHtml = bodyHtml + headerTitle;
bodyHtml = bodyHtml + '</div></div>';
bodyHtml = bodyHtml + '<div class="container">'
bodyHtml = bodyHtml + '<div class="contents-green" style="height:'+sHeight+'px; text-indent: -1px;">';
bodyHtml = bodyHtml + '<div style="width: '+sWidth+'px; height: '+sHeight+'px; position: relative; text-align: left;">';
bodyHtml = bodyHtml + '<div id="frame" style="width: '+sWidth+'px; height: '+sHeight+'px; position: absolute; clip: rect(0px '+sWidth+'px '+sHeight+'px 0px);">';
bodyHtml = bodyHtml + '<div id="slider" style="width: '+sWidth+'px; height: '+sHeight+'px; position: relative;" onMouseover="sspeed=0" onMouseout="mouseStuff()"></div></div></div>';
bodyHtml = bodyHtml + '</div>';
bodyHtml = bodyHtml + '<div class="footer-green"></div>';
bodyHtml = bodyHtml + '<br clear=all></div>';

// Write html into body
document.write(bodyHtml);
			
for (i=0; i<imageArray.length; i++)
{
	imagesHtml=imagesHtml+'<img id="image'+i+'" src="'+imageArray[i]+'" alt="'+altArray[i]+'" border=0>';
}
slider = document.getElementById('slider');
slider.innerHTML = imagesHtml;

window.onload=function(){startSlider()};
