// 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/about-gallery/about-sri-lanka-picture-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_1.jpg';
imageArray[1]='http://www.leoproject.org/images/small/sri_lanka_2.jpg';
imageArray[2]='http://www.leoproject.org/images/small/sri_lanka_3.jpg';
imageArray[3]='http://www.leoproject.org/images/small/sri_lanka_4.jpg';
imageArray[4]='http://www.leoproject.org/images/small/sri_lanka_5.jpg';
imageArray[5]='http://www.leoproject.org/images/small/sri_lanka_6.jpg';
imageArray[6]='http://www.leoproject.org/images/small/sri_lanka_7.jpg';
imageArray[7]='http://www.leoproject.org/images/small/sri_lanka_8.jpg';
imageArray[8]='http://www.leoproject.org/images/small/sri_lanka_9.jpg';
imageArray[9]='http://www.leoproject.org/images/small/sri_lanka_10.jpg';
imageArray[10]='http://www.leoproject.org/images/small/sri_lanka_11.jpg';
imageArray[11]='http://www.leoproject.org/images/small/sri_lanka_12.jpg';
imageArray[12]='http://www.leoproject.org/images/small/sri_lanka_13.jpg';
imageArray[13]='http://www.leoproject.org/images/small/sri_lanka_14.jpg';
imageArray[14]='http://www.leoproject.org/images/small/sri_lanka_15.jpg';
imageArray[15]='http://www.leoproject.org/images/small/sri_lanka_16.jpg';
imageArray[16]='http://www.leoproject.org/images/small/sri_lanka_17.jpg';
imageArray[17]='http://www.leoproject.org/images/small/sri_lanka_18.jpg';
imageArray[18]='http://www.leoproject.org/images/small/sri_lanka_19.jpg';
imageArray[19]='http://www.leoproject.org/images/small/sri_lanka_20.jpg';
imageArray[20]='http://www.leoproject.org/images/small/sri_lanka_21.jpg';
imageArray[21]='http://www.leoproject.org/images/small/sri_lanka_22.jpg';
imageArray[22]='http://www.leoproject.org/images/small/sri_lanka_23.jpg';
imageArray[23]='http://www.leoproject.org/images/small/sri_lanka_24.jpg';
imageArray[24]='http://www.leoproject.org/images/small/sri_lanka_25.jpg';
imageArray[25]='http://www.leoproject.org/images/small/sri_lanka_26.jpg';
imageArray[26]='http://www.leoproject.org/images/small/sri_lanka_27.jpg';
imageArray[27]='http://www.leoproject.org/images/small/sri_lanka_28.jpg';
imageArray[28]='http://www.leoproject.org/images/small/sri_lanka_29.jpg';
imageArray[29]='http://www.leoproject.org/images/small/sri_lanka_30.jpg';
imageArray[30]='http://www.leoproject.org/images/small/sri_lanka_31.jpg';
imageArray[31]='http://www.leoproject.org/images/small/sri_lanka_32.jpg';
imageArray[32]='http://www.leoproject.org/images/small/sri_lanka_33.jpg';

// Give the full path of the large image 
largeImageArray[0]='http://www.leoproject.org/images/large/sri_lanka_1.jpg';
largeImageArray[1]='http://www.leoproject.org/images/large/sri_lanka_2.jpg';
largeImageArray[2]='http://www.leoproject.org/images/large/sri_lanka_3.jpg';
largeImageArray[3]='http://www.leoproject.org/images/large/sri_lanka_4.jpg';
largeImageArray[4]='http://www.leoproject.org/images/large/sri_lanka_5.jpg';
largeImageArray[5]='http://www.leoproject.org/images/large/sri_lanka_6.jpg';
largeImageArray[6]='http://www.leoproject.org/images/large/sri_lanka_7.jpg';
largeImageArray[7]='http://www.leoproject.org/images/large/sri_lanka_8.jpg';
largeImageArray[8]='http://www.leoproject.org/images/large/sri_lanka_9.jpg';
largeImageArray[9]='http://www.leoproject.org/images/large/sri_lanka_10.jpg';
largeImageArray[10]='http://www.leoproject.org/images/large/sri_lanka_11.jpg';
largeImageArray[11]='http://www.leoproject.org/images/large/sri_lanka_12.jpg';
largeImageArray[12]='http://www.leoproject.org/images/large/sri_lanka_13.jpg';
largeImageArray[13]='http://www.leoproject.org/images/large/sri_lanka_14.jpg';
largeImageArray[14]='http://www.leoproject.org/images/large/sri_lanka_15.jpg';
largeImageArray[15]='http://www.leoproject.org/images/large/sri_lanka_16.jpg';
largeImageArray[16]='http://www.leoproject.org/images/large/sri_lanka_17.jpg';
largeImageArray[17]='http://www.leoproject.org/images/large/sri_lanka_18.jpg';
largeImageArray[18]='http://www.leoproject.org/images/large/sri_lanka_19.jpg';
largeImageArray[19]='http://www.leoproject.org/images/large/sri_lanka_20.jpg';
largeImageArray[20]='http://www.leoproject.org/images/large/sri_lanka_21.jpg';
largeImageArray[21]='http://www.leoproject.org/images/large/sri_lanka_22.jpg';
largeImageArray[22]='http://www.leoproject.org/images/large/sri_lanka_23.jpg';
largeImageArray[23]='http://www.leoproject.org/images/large/sri_lanka_24.jpg';
largeImageArray[24]='http://www.leoproject.org/images/large/sri_lanka_25.jpg';
largeImageArray[25]='http://www.leoproject.org/images/large/sri_lanka_26.jpg';
largeImageArray[26]='http://www.leoproject.org/images/large/sri_lanka_27.jpg';
largeImageArray[27]='http://www.leoproject.org/images/large/sri_lanka_28.jpg';
largeImageArray[28]='http://www.leoproject.org/images/large/sri_lanka_29.jpg';
largeImageArray[29]='http://www.leoproject.org/images/large/sri_lanka_30.jpg';
largeImageArray[30]='http://www.leoproject.org/images/large/sri_lanka_31.jpg';
largeImageArray[31]='http://www.leoproject.org/images/large/sri_lanka_32.jpg';
largeImageArray[32]='http://www.leoproject.org/images/large/sri_lanka_33.jpg';

// Give the image alt text. Again, numbers correspond.
altArray[0]='';
altArray[1]='';
altArray[2]='';
altArray[3]='';
altArray[4]='';
altArray[5]='';
altArray[6]='';
altArray[7]='';
altArray[8]='';
altArray[9]='';
altArray[10]='';
altArray[11]='';
altArray[12]='';
altArray[13]='';
altArray[14]='';
altArray[15]='';
altArray[16]='';
altArray[17]='';
altArray[18]='';
altArray[19]='';
altArray[20]='';
altArray[21]='';
altArray[22]='';
altArray[23]='';
altArray[24]='';
altArray[25]='';
altArray[26]='';
altArray[27]='';
altArray[28]='';
altArray[29]='';
altArray[30]='';
altArray[31]='';
altArray[32]='';


// Give the caption for above the enlarged image. Again, numbers correspond.
pbCaptionArray[0]='';
pbCaptionArray[1]='';
pbCaptionArray[2]='';
pbCaptionArray[3]='';
pbCaptionArray[4]='';
pbCaptionArray[5]='';
pbCaptionArray[6]='';
pbCaptionArray[7]='';
pbCaptionArray[8]='';
pbCaptionArray[9]='';
pbCaptionArray[10]='';
pbCaptionArray[11]='';
pbCaptionArray[12]='';
pbCaptionArray[13]='';
pbCaptionArray[14]='';
pbCaptionArray[15]='';
pbCaptionArray[16]='';
pbCaptionArray[17]='';
pbCaptionArray[18]='';
pbCaptionArray[19]='';
pbCaptionArray[20]='';
pbCaptionArray[21]='';
pbCaptionArray[22]='';
pbCaptionArray[23]='';
pbCaptionArray[24]='';
pbCaptionArray[25]='';
pbCaptionArray[26]='';
pbCaptionArray[27]='';
pbCaptionArray[28]='';
pbCaptionArray[29]='';
pbCaptionArray[30]='';
pbCaptionArray[31]='';
pbCaptionArray[32]='';


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