var photos=new Array();
var photoslink=new Array();
var which=0;

//define images. You can have as many as you want:
photos[0]="intro_images/p7.jpg";
photos[1]="intro_images/p8.jpg";
photos[2]="intro_images/p9.jpg";
photos[3]="intro_images/p10.jpg";
photos[4]="intro_images/p1.jpg";
photos[5]="intro_images/p2.jpg";
photos[6]="intro_images/p3.jpg";
photos[7]="intro_images/p4.jpg";
photos[8]="intro_images/p5.jpg";
photos[9]="intro_images/p6.jpg";

//define arrow color
var arrowLeft = new Array();
var arrowRight = new Array();
arrowLeft[0]="arrows_images/small_icon/arrow_left_grey.jpg";
arrowLeft[1]="arrows_images/small_icon/arrow_left.jpg";
arrowRight[0]="arrows_images/small_icon/arrow_right_grey.jpg";
arrowRight[1]="arrows_images/small_icon/arrow_right.jpg";

//do NOT edit pass this line

var preloadedimages=new Array();

for (i=0;i<photos.length;i++){
	preloadedimages[i]=new Image();
	preloadedimages[i].src=photos[i];
}

function applyeffect(){
	if (document.all && photoslider.filters){
		photoslider.filters.revealTrans.Transition=12;
		photoslider.filters.revealTrans.stop();
		photoslider.filters.revealTrans.apply();
	}
}

function playeffect(){
	if (document.all && photoslider.filters)
	photoslider.filters.revealTrans.play();
}

function keeptrack(){
	window.status="Image "+(which+1)+" of "+photos.length;
}


function backward(){
	if (which>0){
		which--;
		applyeffect();
		document.images.photoslider.src=photos[which];
		playeffect();
		keeptrack();
		printArrowLeft();
		printArrowRight();
	}
}

function forward(){
	if (which<photos.length-1){
		which++;
		applyeffect();
		document.images.photoslider.src=photos[which];
		playeffect();
		keeptrack();
		printArrowLeft();
		printArrowRight();
	}
}

function printArrowLeft(){
	if(which == 0) {
		document.images.arrow_left.src=arrowLeft[0];
	}
	else {
		document.images.arrow_left.src=arrowLeft[1];
	}
}

function printArrowRight(){
	if(which == photos.length-1) {
		document.images.arrow_right.src=arrowRight[0];
	}
	else {
		document.images.arrow_right.src=arrowRight[1];
	}
}	