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

// Feel free to add more images to the arrays

// Give the full path of the image 
imageArray[0]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_1.jpg';
imageArray[1]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_2.jpg';
imageArray[2]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_3.jpg';
imageArray[3]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_4.jpg';
imageArray[4]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_5.jpg';
imageArray[5]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_6.jpg';
imageArray[6]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_7.jpg';
imageArray[7]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_8.jpg';
imageArray[8]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_9.jpg';
imageArray[9]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_10.jpg';
imageArray[10]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_11.jpg';
imageArray[11]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_12.jpg';
imageArray[12]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_13.jpg';
imageArray[13]='http://www.leoproject.org/images/small/cleaning_the_sri_lankan_beach_14.jpg';

// Give the full path of the large image 
largeImageArray[0]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_1.jpg';
largeImageArray[1]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_2.jpg';
largeImageArray[2]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_3.jpg';
largeImageArray[3]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_4.jpg';
largeImageArray[4]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_5.jpg';
largeImageArray[5]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_6.jpg';
largeImageArray[6]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_7.jpg';
largeImageArray[7]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_8.jpg';
largeImageArray[8]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_9.jpg';
largeImageArray[9]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_10.jpg';
largeImageArray[10]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_11.jpg';
largeImageArray[11]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_12.jpg';
largeImageArray[12]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_13.jpg';
largeImageArray[13]='http://www.leoproject.org/images/large/cleaning_the_sri_lankan_beach_14.jpg';



// Give the image alt text. Again, numbers correspond.
altArray[0]='It doesn\'t look that bad in between the rocks, but even here there is litter';
altArray[1]='Plastic bags, sigaret buds, coconut shells, clothes, plastic bottles etc are all carelessly dumped';
altArray[2]='Where ever you look there is rubbish'
altArray[3]='When zooming out you get a better idea of how severe the situation is: rubbish everywhere';
altArray[4]='Things arent nearly as bad in between the rocks where no one ever comes compared to the sand beach';
altArray[5]='And still people come to these beaches to relax and enjoy the sea';
altArray[6]='The amount of rubbish is huge and everywhere';
altArray[7]='People don\'t seem to realize the health hazerd they\'re walking through';
altArray[8]='And it seems that at least rubbish is being put into heaps, but this might be coincidence';
altArray[9]='It is more likely that people just dump rubbish at places that already have some rubbish';
altArray[10]='Beach tourism can\'t be great for the local businesses such as the hotel in the background';
altArray[11]='Local fishermen actually operate from this poluted place';
altArray[12]='People are living right next to the beach';
altArray[13]='Yet another good look at how bad the situation is';


// Give the caption for above the enlarged image. Again, numbers correspond.
pbCaptionArray[0]='It doesn\'t look that bad in between the rocks, but even here there is litter';
pbCaptionArray[1]='Plastic bags, sigaret buds, coconut shells, clothes, plastic bottles etc are all carelessly dumped';
pbCaptionArray[2]='Where ever you look there is rubbish'
pbCaptionArray[3]='When zooming out you get a better idea of how severe the situation is: rubbish everywhere';
pbCaptionArray[4]='Things arent nearly as bad in between the rocks where no one ever comes compared to the sand beach';
pbCaptionArray[5]='And still people come to these beaches to relax and enjoy the sea';
pbCaptionArray[6]='The amount of rubbish is huge and everywhere';
pbCaptionArray[7]='People don\'t seem to realize the health hazerd they\'re walking through';
pbCaptionArray[8]='And it seems that at least rubbish is being put into heaps, but this might be coincidence';
pbCaptionArray[9]='It is more likely that people just dump rubbish at places that already have some rubbish';
pbCaptionArray[10]='Beach tourism can\'t be great for the local businesses such as the hotel in the background';
pbCaptionArray[11]='Local fishermen actually operate from this poluted place';
pbCaptionArray[12]='People are living right next to the beach';
pbCaptionArray[13]='Yet another good look at how bad the situation is';

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