
/* ####################### begins list of images to be used ####################### */

currentIndx=0;

/* ##################### array for logo ################### */
MyImages=new Array();
MyImages[0]='images/what_lhead8.jpg';
MyImages[1]='images/what_lhead9.jpg';
MyImages[2]='images/what_lhead10.jpg';
MyImages[3]='images/what_lhead11.jpg';



/* ##################### array for title image ################### 
Mytitle=new Array();
Mytitle[0]='images/homeimg/title1.jpg';
Mytitle[1]='images/homeimg/title2.jpg';
*/

/* ####################### now we preload the images ####################### */

imagesPreloaded = new Array(4)
for (var i = 0; i < MyImages.length ; i++) 
{
	imagesPreloaded[i] = new Image(296,160)
	imagesPreloaded[i].src=MyImages[i]
}
/*
titlePreloaded = new Array(2)
for (var j = 0; j < MyImages.length ; j++) 
{
	titlePreloaded[j] = new Image(296,38)	
titlePreloaded[j].src=Mytitle[j]
}
 */


/* ####################### we create the functions to go forward and go back ####################### */

/* function for next image */
function Nexter(){
if (currentIndx<imagesPreloaded.length-1){
currentIndx=currentIndx+1;
document.theImage2.src=imagesPreloaded[currentIndx].src
/* document.theTitle.src=titlePreloaded[currentIndx].src */
}
else {
 currentIndx=0
document.theImage2.src=imagesPreloaded[currentIndx].src
/* document.theTitle.src=titlePreloaded[currentIndx].src */

}
}

/* function for previous image */
function Backer(){
if (currentIndx>0){
currentIndx=currentIndx-1;
document.theImage2.src=imagesPreloaded[currentIndx].src
/* document.theTitle.src=titlePreloaded[currentIndx].src */
}
else {
 currentIndx=2
document.theImage2.src=imagesPreloaded[currentIndx].src
/* document.theTitle.src=titlePreloaded[currentIndx].src */
}}

/* function for slieshow image */
function automaticly() {
if (currentIndx<imagesPreloaded.length){
currentIndx=currentIndx
}
else {
 currentIndx=0
}	
chng(document.theImage2,imagesPreloaded[currentIndx].src)
currentIndx=currentIndx+1;
var delay = setTimeout("automaticly()",3500)
}
function chng(ImgName,ImgSrc) 
{ 
	if(navigator.appName == "Microsoft Internet Explorer")
	{
		ImgName.filters.blendTrans.stop(); 
		ImgName.filters.blendTrans.Apply();
		ImgName.src=ImgSrc;
		ImgName.filters.blendTrans.Play();
	}
	else
	{
		ImgName.src=ImgSrc;	
	}
}