var sysETSOOSlideStyle=[];
function ETSOOSlideStyle(arrScript,strId,strTitleId,numInterval,numPhotoIndex){
	if(arrScript==null)arrScript=[];
	var numPhotoLen=arrScript.length;
	if(strId==null)strId="ETSOOSlideStyle";
	if(strTitleId==null)strTitleId="ETSOOSlideStyleTitle";
	if(numPhotoIndex==null)numPhotoIndex=0;
	else{
	    numPhotoIndex++;
	    if(numPhotoIndex>=numPhotoLen)numPhotoIndex=0;
	}
	var objPhoto=document.getElementById(strId);
	if(objPhoto&&numPhotoLen>0){
	    var blnFilter=true;
	    if(objPhoto.style.filter==null)blnFilter=false;
	    
	    objPhoto.onmouseover=function(){sysETSOOSlideStyle[this.id][5]="N"};
	    objPhoto.onmouseout=function(){sysETSOOSlideStyle[this.id][5]="Y"};
        if(numInterval==null)numInterval=5000;
        else{
            numInterval=parseInt(numInterval);
            if(isNaN(numInterval))numInterval=5000;
        }
        var objOne=sysETSOOSlideStyle[strId];
        if(objOne==null){
            var objTimers=setInterval("ETSOOSlideStyleAdd('"+strId+"')", numInterval);
            sysETSOOSlideStyle[strId]=[arrScript,strId,strTitleId,numInterval,numPhotoIndex];
        }else{
            objOne[4]=numPhotoIndex;
        }
	    if(blnFilter){
	        if(objPhoto.filters.revealTrans==null)objPhoto.style.filter+="revealTrans(duration=1,transition=5)";
            objPhoto.filters.revealTrans.Transition=Math.floor(Math.random()*25);
            objPhoto.filters.revealTrans.apply();
            objPhoto.filters.revealTrans.play();
	    }
	    var objImage=arrScript[numPhotoIndex];
	    var strTitle=objImage[1];
	    var strLink=objImage[2];
	    if(strLink==null)strLink="";
	    
	    if(blnFilter){
	        if(strLink=="")objPhoto.style.cursor="";
	        else objPhoto.style.cursor="hand";
	    }else{
	        if(objPhoto.style){
	            if(strLink=="")objPhoto.style.cursor="";
	            else objPhoto.style.cursor="pointer";
	        }
	    }
	    
	    objPhoto.src=objImage[0];
	    objPhoto.title=strTitle;
	    if(strLink!="")objPhoto.onclick=function(){window.location=strLink};
	    
	    var objTitle=document.getElementById(strTitleId);
	    if(objTitle){
	        if(strLink=="")objTitle.innerHTML=strTitle;
	        else objTitle.innerHTML='<a href="'+strLink+'">'+strTitle+'</a>';
	    }
	}
}
function ETSOOSlideStyleAdd(strId){
    var objOne=sysETSOOSlideStyle[strId];
    if(objOne&&objOne[5]!="N")ETSOOSlideStyle(objOne[0],objOne[1],objOne[2],objOne[3],objOne[4]);
}