// 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';

// Feel free to add more images to the arrays

// Give the full path of the image 
imageArray[0]='http://www.leoproject.org/images/small/sri_lanka_34.jpg';
imageArray[1]='http://www.leoproject.org/images/small/sri_lanka_35.jpg';
imageArray[2]='http://www.leoproject.org/images/small/sri_lanka_36.jpg';
imageArray[3]='http://www.leoproject.org/images/small/sri_lanka_37.jpg';
imageArray[4]='http://www.leoproject.org/images/small/sri_lanka_38.jpg';
imageArray[5]='http://www.leoproject.org/images/small/sri_lanka_39.jpg';
imageArray[6]='http://www.leoproject.org/images/small/sri_lanka_40.jpg';
imageArray[7]='http://www.leoproject.org/images/small/sri_lanka_41.jpg';
imageArray[8]='http://www.leoproject.org/images/small/sri_lanka_42.jpg';
imageArray[9]='http://www.leoproject.org/images/small/sri_lanka_43.jpg';
imageArray[10]='http://www.leoproject.org/images/small/sri_lanka_44.jpg';
imageArray[11]='http://www.leoproject.org/images/small/sri_lanka_45.jpg';
imageArray[12]='http://www.leoproject.org/images/small/sri_lanka_46.jpg';
imageArray[13]='http://www.leoproject.org/images/small/sri_lanka_47.jpg';
imageArray[14]='http://www.leoproject.org/images/small/sri_lanka_48.jpg';
imageArray[15]='http://www.leoproject.org/images/small/sri_lanka_49.jpg';
imageArray[16]='http://www.leoproject.org/images/small/sri_lanka_50.jpg';
imageArray[17]='http://www.leoproject.org/images/small/teaching_english_6.jpg';
imageArray[18]='http://www.leoproject.org/images/small/teaching_english_10.jpg';
imageArray[19]='http://www.leoproject.org/images/small/teaching_english_11.jpg';
imageArray[20]='http://www.leoproject.org/images/small/teaching_english_14.jpg';
imageArray[21]='http://www.leoproject.org/images/small/teaching_english_15.jpg';
imageArray[22]='http://www.leoproject.org/images/small/teaching_english_16.jpg';
imageArray[23]='http://www.leoproject.org/images/small/teaching_english_17.jpg';


// Give the full path of the large image 
largeImageArray[0]='http://www.leoproject.org/images/large/sri_lanka_34.jpg';
largeImageArray[1]='http://www.leoproject.org/images/large/sri_lanka_35.jpg';
largeImageArray[2]='http://www.leoproject.org/images/large/sri_lanka_36.jpg';
largeImageArray[3]='http://www.leoproject.org/images/large/sri_lanka_37.jpg';
largeImageArray[4]='http://www.leoproject.org/images/large/sri_lanka_38.jpg';
largeImageArray[5]='http://www.leoproject.org/images/large/sri_lanka_39.jpg';
largeImageArray[6]='http://www.leoproject.org/images/large/sri_lanka_40.jpg';
largeImageArray[7]='http://www.leoproject.org/images/large/sri_lanka_41.jpg';
largeImageArray[8]='http://www.leoproject.org/images/large/sri_lanka_42.jpg';
largeImageArray[9]='http://www.leoproject.org/images/large/sri_lanka_43.jpg';
largeImageArray[10]='http://www.leoproject.org/images/large/sri_lanka_44.jpg';
largeImageArray[11]='http://www.leoproject.org/images/large/sri_lanka_45.jpg';
largeImageArray[12]='http://www.leoproject.org/images/large/sri_lanka_46.jpg';
largeImageArray[13]='http://www.leoproject.org/images/large/sri_lanka_47.jpg';
largeImageArray[14]='http://www.leoproject.org/images/large/sri_lanka_48.jpg';
largeImageArray[15]='http://www.leoproject.org/images/large/sri_lanka_49.jpg';
largeImageArray[16]='http://www.leoproject.org/images/large/sri_lanka_50.jpg';
largeImageArray[17]='http://www.leoproject.org/images/large/teaching_english_6.jpg';
largeImageArray[18]='http://www.leoproject.org/images/large/teaching_english_10.jpg';
largeImageArray[19]='http://www.leoproject.org/images/large/teaching_english_11.jpg';
largeImageArray[20]='http://www.leoproject.org/images/large/teaching_english_14.jpg';
largeImageArray[21]='http://www.leoproject.org/images/large/teaching_english_15.jpg';
largeImageArray[22]='http://www.leoproject.org/images/large/teaching_english_16.jpg';
largeImageArray[23]='http://www.leoproject.org/images/large/teaching_english_17.jpg';

// Give the image alt text. Again, numbers correspond.
altArray[0]='Pineapples, called ananasie in Sri Lanka, are sold everywhere at roadside stalls';
altArray[1]='On your volunteer trip to Sri Lanka you will often find beautifully decorated lorries like this one';
altArray[2]='One of the landmark temples of Sri Lanka';
altArray[3]='Kandy Fire breathing. Only a stone throw from our volunteer placements in Sri Lanka';
altArray[4]='Jack fruit as often seen throughout the country';
altArray[5]='A magnificant tree in the botanical gardens of Kandy. A must see on your volunteer placement';
altArray[6]='Kandy botanical gardens Sri Lanka. Another huge tree rising up like a mountain';
altArray[7]='The train through the hill country. Again not far from the volunteer placement projects';
altArray[8]='Tea picking in the hill country. Easy to see from within the train, but best yet to visit a tea factory';
altArray[9]='World\'s End. Stand at the End of the World!';
altArray[10]='Getting stuck in the mud during safari at Yala National park';
altArray[11]='An amazing sunset. You will see many of these during your volunteering in Sri Lanka';
altArray[12]='A new born elephant baby. Only hours old';
altArray[13]='A \'wild\' cow. You will see many cows just wandering around in Sri Lanka';
altArray[14]='Boy and bike';
altArray[15]='Father and child. Living in the house in the next image';
altArray[16]='Typiucal mud hut found in the inlands of Sri Lanka';
altArray[17]='Teaching English as a volunteer';
altArray[18]='The English class in Kurunegala. One of the first volunteers on this project ever';
altArray[19]='Five classes in one hall. You will really discover what it is to teach in another country';
altArray[20]='Happy to read';
altArray[21]='A great day at school. Today they are given shoes by the LEO Project.';
altArray[22]='Fun to get on the camera';
altArray[23]='One last photo before leaving school with the new shoes. Perhaps wearing them would be an idea :)';


// Give the caption for above the enlarged image. Again, numbers correspond.
pbCaptionArray[0]='Pineapples, called ananasie in Sri Lanka, are sold everywhere at roadside stalls';
pbCaptionArray[1]='On your volunteer trip to Sri Lanka you will often find beautifully decorated lorries like this one';
pbCaptionArray[2]='One of the landmark temples of Sri Lanka';
pbCaptionArray[3]='Kandy Fire breathing. Only a stone throw from our volunteer placements in Sri Lanka';
pbCaptionArray[4]='Jack fruit as often seen throughout the country';
pbCaptionArray[5]='A magnificant tree in the botanical gardens of Kandy. A must see on your volunteer placement';
pbCaptionArray[6]='Kandy botanical gardens Sri Lanka. Another huge tree rising up like a mountain';
pbCaptionArray[7]='The train through the hill country. Again not far from the volunteer placement projects';
pbCaptionArray[8]='Tea picking in the hill country. Easy to see from within the train, but best yet to visit a tea factory';
pbCaptionArray[9]='World\'s End. Stand at the End of the World!';
pbCaptionArray[10]='Getting stuck in the mud during safari at Yala National park';
pbCaptionArray[11]='An amazing sunset. You will see many of these during your volunteering in Sri Lanka';
pbCaptionArray[12]='A new born elephant baby. Only hours old';
pbCaptionArray[13]='A \'wild\' cow. You will see many cows just wandering around in Sri Lanka';
pbCaptionArray[14]='Boy and bike';
pbCaptionArray[15]='Father and child. Living in the house in the next image';
pbCaptionArray[16]='Typiucal mud hut found in the inlands of Sri Lanka';
pbCaptionArray[17]='Teaching English as a volunteer';
pbCaptionArray[18]='The English class in Kurunegala. One of the first volunteers on this project ever';
pbCaptionArray[19]='Five classes in one hall. You will really discover what it is to teach in another country';
pbCaptionArray[20]='Happy to read';
pbCaptionArray[21]='A great day at school. Today they are given shoes by the LEO Project.';
pbCaptionArray[22]='Fun to get on the camera';
pbCaptionArray[23]='One last photo before leaving school with the new shoes. Perhaps wearing them would be an idea :)';


var sspeed = 3;		// scroll speed in pixels per 1/10 second
var sWidth = 170;	// width of the image slider
var sHeight = 1450;	// 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()};
