var imgs = new Array(
		new img(3,"img1","pictures/pic1a.jpg","pictures/pic2a.jpg","pictures/pic3a.jpg","")
		);

function startChange()
{

	changePic();
	
	setTimeout("startChange()", 3000);

}

function img(iCount, sHolder, sPath, sPath1, sPath2, sPath3)
{

	this.count = iCount;
	this.holder = sHolder;
	this.path0 = sPath;
	this.path1 = sPath1;
	this.path2 = sPath2;
	this.path3 = sPath3;
	this.current = 0;

}

function changePic()
{

	for(i=0;i<=imgs.length-1;i++){

		if((i % 2) > 0)
		{
		
			setTimeout("", 500);
		
		}

		//alert(imgs[i].holder);

		document.images[imgs[i].holder].filters[0].apply();

		if(imgs[i].current + 1 < imgs[i].count)
		{
			
			//alert(imgs[i].current);
			
			imgs[i].current += 1;
				
		}
		else
		{
			
			imgs[i].current = 0;
			
		}
			
		//alert("imgs[i].path" + imgs[i].current.toString());
					
		document.images[imgs[i].holder].src = eval("imgs[i].path" + imgs[i].current.toString());
		
		document.images[imgs[i].holder].filters[0].play();
		
	}

}

