var slideShowSpeed = 5000
var crossFadeDuration = 3
var Pic = new Array() 
var root = "http://www.agnespostelmans.be";
//var root = "http://localhost/php study";

Pic[0]= root + '/images/Manege Agnes postelmans 1.jpg'
Pic[1]= root + '/images/Manege Agnes postelmans 2.jpg'
Pic[2]= root + '/images/Manege Agnes postelmans 3.jpg'
Pic[3]= root + '/images/Manege Agnes postelmans 4.jpg'

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function positionWindow()
{
	x = (document.documentElement.clientHeight - 618) /2;
	y = (document.documentElement.clientWidth - 874)/2;
	
	document.getElementById("contentarea").style.top = x;
	document.getElementById("contentarea").style.left = y;
	document.getElementById("contentarea").style.visibility="visible";
}

function runSlideShow(){

   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function showPic(obj)
{
document.getElementById("photoalbum_largepic").src = '.' + obj.src.substr(obj.src.lastIndexOf("/"));
}


function openAlbum(obj)
{
	document.getElementById("contentarea").style.visibility="visible";
	switch (obj)
	{
		case "1":
			location.replace( root + "/manege/index.php");
			break;
		case "2":
			location.replace( root + "/paardenkamp/index.php");
			break;
		case "3":
			location.replace( root + "/nieuw/index.php");
			break;
	}
	
}
