Pohela Boishak
<
script LANGUAGE="JavaScript">
currentIndx=0;
MyImages=new Array("/Files/Uploads/archive/images/picture_big/1.JPG","/Files/Uploads/archive/images/picture_big/2.JPG",
"/Files/Uploads/archive/images/picture_big/3.JPG","/Files/Uploads/archive/images/picture_big/4.JPG",
"/Files/Uploads/archive/images/picture_big/5.JPG","/Files/Uploads/archive/images/picture_big/6.JPG",
"/Files/Uploads/archive/images/picture_big/7.JPG","/Files/Uploads/archive/images/picture_big/8.JPG",
"/Files/Uploads/archive/images/picture_big/9.JPG","/Files/Uploads/archive/images/picture_big/10.JPG",
"/Files/Uploads/archive/images/picture_big/11.JPG","/Files/Uploads/archive/images/picture_big/12.JPG"
);
//MyImages[0]='1.gif';
//MyImages[1]='2.gif';
//MyImages[2]='3.gif';
//MyImages[3]='4.gif';
Messages=new Array()
//Messages[0]='We learn about our world through the 5 senses';
//Messages[1]='We use our eyes to see things';
//Messages[2]='Our ears to hear things'
//Messages[3]='And our sense of touch to feel things.';
/* ####################### now we preload the images #######################
/
imagesPreloaded = new Array(12)
for (var i = 0; i < MyImages.length ; i++)
{
imagesPreloaded[i] = new Image()
imagesPreloaded[i].src=MyImages[i]
}
/ ####################### we create the functions to go forward and go back ####################### */
function Nexter(){
if (currentIndx<imagesPreloaded.length-1){
currentIndx=currentIndx+1;
document.theImage.src=imagesPreloaded[currentIndx].src
//document.form1.text1.value=Messages[currentIndx];
}
else {
currentIndx=0
document.theImage.src=imagesPreloaded[currentIndx].src
//document.form1.text1.value=Messages[currentIndx];
}
}
function Backer(){
if (currentIndx>0){
currentIndx=currentIndx-1;
document.theImage.src=imagesPreloaded[currentIndx].src
//document.form1.text1.value=Messages[currentIndx];
}
else {
currentIndx=11
document.theImage.src=imagesPreloaded[currentIndx].src
//document.form1.text1.value=Messages[currentIndx];
}}
function automaticly() {
if (document.getElementById('chkautomatic').checked)
{
if (currentIndx<imagesPreloaded.length)
{
currentIndx=currentIndx
}
else
{
currentIndx=0
}
document.theImage.src=imagesPreloaded[currentIndx].src
//document.form1.text1.value=Messages[currentIndx];
currentIndx=currentIndx+1;
var delay = setTimeout("automaticly()",2500)
}
}