// JavaScript Document
// Coded by Eng. Natalia Sibaja
// SlideShow
//Global variables
var image1
var image2
var image3
var image4
var img_path = "http://demo.blackidsolutions.com/wp2/wp-content/themes/ParadiseProfits/";
var picture = new Array(img_path + "gallery/001.jpg",img_path + "gallery/002.jpg",img_path + "gallery/003.jpg",img_path + "gallery/004.jpg",img_path + "gallery/005.jpg",img_path + "gallery/006.jpg",img_path + "gallery/007.jpg",img_path + "gallery/008.jpg",img_path + "gallery/009.jpg",img_path + "gallery/010.jpg",img_path + "gallery/011.jpg",img_path + "gallery/012.jpg",img_path + "gallery/013.jpg",img_path + "gallery/014.jpg",img_path + "gallery/015.jpg",img_path + "gallery/016.jpg",img_path + "gallery/0017.jpg",img_path + "gallery/018.jpg",img_path + "gallery/019.jpg",img_path + "gallery/020.jpg",img_path + "gallery/021.jpg",img_path + "gallery/022.jpg",img_path + "gallery/023.jpg",img_path + "gallery/024.jpg",img_path + "gallery/025.jpg",img_path + "gallery/026.jpg",img_path + "gallery/027.jpg",img_path + "gallery/028.jpg",img_path + "gallery/029.jpg",img_path + "gallery/030.jpg")
var picNumber=1
var numberofPics = picture.length

//Preload images for slide show
function preloadImages()
{
if(document.images)
{
image1 = new Image (212,276)
image1.src = img_path + "gallery/001.jpg"
image2 = new Image (212,276)
image2.src = img_path + "gallery/002.jpg"
image3 = new Image (212,276)
image3.src = img_path + "gallery/003.jpg"
image4 = new Image (212,276)
image4.src= img_path + "gallery/004.jpg"
image5 = new Image (212,276)
image5.src = img_path + "gallery/005.jpg"
image6= new Image (212,276)
image6.src = img_path + "gallery/006.jpg"
image7 = new Image (212,276)
image7.src = img_path + "gallery/007.jpg"
image8 = new Image (212,276)
image8.src = img_path + "gallery/008.jpg"
image9 = new Image (212,276)
image9.src= img_path + "gallery/009.jpg"
image10 = new Image (212,276)
image10.src = img_path + "gallery/010.jpg"
image11= new Image (212,276)
image11.src = img_path + "gallery/011.jpg"
image12 = new Image (212,276)
image12.src = img_path + "gallery/012.jpg"
image13 = new Image (212,276)
image13.src = img_path + "gallery/013.jpg"
image14 = new Image (212,276)
image14.src= img_path + "gallery/014.jpg"
image15 = new Image (212,276)
image15.src = img_path + "gallery/015.jpg"
image16= new Image (212,276)
image16.src = img_path + "gallery/016.jpg"
image17 = new Image (212,276)
image17.src = img_path + "gallery/017.jpg"
image18 = new Image (212,276)
image18.src = img_path + "gallery/018.jpg"
image19 = new Image (212,276)
image19.src= img_path + "gallery/019.jpg"
image20 = new Image (212,276)
image20.src = img_path + "gallery/020.jpg"
image21= new Image (212,276)
image21.src = img_path + "gallery/021.jpg"
image22 = new Image (212,276)
image22.src = img_path + "gallery/022.jpg"
image23 = new Image (212,276)
image23.src = img_path + "gallery/023.jpg"
image24 = new Image (212,276)
image24.src= img_path + "gallery/024.jpg"
image25 = new Image (212,276)
image25.src = img_path + "gallery/025.jpg"
image26= new Image (212,276)
image26.src = img_path + "gallery/026.jpg"
image27 = new Image (212,276)
image27.src = img_path + "gallery/027.jpg"
image28 = new Image (212,276)
image28.src = img_path + "gallery/028.jpg"
image29 = new Image (212,276)
image29.src= img_path + "gallery/029.jpg"
image30 = new Image (212,276)
image30.src = img_path + "gallery/030.jpg"
}
}
function runSlideShow()
{
	if (document.all)
	{
	 document.pictures.style.filter ="blendTrans(duration=2)";
	 document.pictures.filters.blendTrans.Apply(); 
	}
	if(picNumber < numberofPics)
	{picNumber++}
  	else
	{picNumber=1}
  	document.pictures.src=picture[picNumber-1];
	if (document.all)
	{
	document.pictures.filters.blendTrans.Play();
	}
	setTimeout("runSlideShow()",5*1000);
}
