var gallery,galleryTmr,galleryPath,galleryIMG,galleryCache=new Image();
function fnGalleryNext(){
	fnResizeIMG(galleryIMG)
	var img=fnLocateIMG(galleryIMG)
	if (d.all&&!AB_Flash.isOpera) {
		img.style.filter="blendTrans(duration="+galleryImageCrossFade_Seconds+")";
		img.filters.blendTrans.Apply();
	}
	img.src = galleryCache.src
	fnGalleryPreLoad()
	if (d.all&&!AB_Flash.isOpera) 
		img.filters.blendTrans.Play();
}
function fnGalleryShow(){
	galleryTmr = setInterval("fnGalleryNext()", galleryImagePause_Seconds*1000);
}
function fnGalleryPause(){
	clearInterval(galleryTmr)
}
function fnGalleryPreLoad(){
	gallery=(gallery+1)%galleryImages
	galleryCache.src = galleryPath+"/image0"+((gallery<=9)?"0":"")+gallery+".jpg"
}
function fnGalleryLoad(pName,pPath){
	galleryIMG=pName
	galleryPath=pPath
	gallery=galleryImages
	fnGalleryPreLoad()
}	

