﻿var PhotoFilter=[
    'progid:DXImageTransform.Microsoft.Blinds( Bands=4,direction=left)',
    'progid:DXImageTransform.Microsoft.Checkerboard( Direction=right,SquaresX=8,SquaresY=8)',
    'progid:DXImageTransform.Microsoft.Fade(Overlap=1.00)',
    'progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=0.50,wipestyle=0,motion=forward)',
    'progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=50)',
    'progid:DXImageTransform.Microsoft.RandomDissolve(duration=.5)',
    'progid:DXImageTransform.Microsoft.Slide(slidestyle=SWAP,Bands=1)',
    'progid:DXImageTransform.Microsoft.Spiral(GridSizeX=8,GridSizeY=8)',
    'progid:DXImageTransform.Microsoft.Wheel(spokes=10)',
    'progid:DXImageTransform.Microsoft.Zigzag(GridSizeX=8,GridSizeY=8)'
    ];

var PhotoDataTable;
var PhotoPos=0;
var PhotoFilterPos=0;

function slideShow()
{
    var IE = document.all?true:false;

    if(PhotoDataTable==null)
    {    
	    Anthem_InvokeAnotherPageMethod('Gallery.aspx?Anthem_CallBack=true','photoDataSet',[13750],
	        function(result){
	            PhotoDataTable = result.value.Tables['Photo'];

                slideShow();
	        }
	    );
        return;
	}
    
    if(IE){
        SlideShowDiv.style.filter =PhotoFilter[PhotoFilterPos];               
        SlideShowDiv.filters[0].apply();
    
        if(++PhotoFilterPos>=PhotoFilter.length)
            PhotoFilterPos=0;
    }
    
	SlideShowDiv.innerHTML=
	    "<a href='Gallery.aspx?ParTree=" + PhotoDataTable.Rows[PhotoPos]['CatTree']
		+ "&PhotoIdn=" + PhotoDataTable.Rows[PhotoPos]['PhotoIdn'] + "' >"
	    + "<img width=120 height=70 border=0 src='AdvGallery/GalleryShowPic.aspx?PhotoMode=0&PhotoIdn="
	    + PhotoDataTable.Rows[PhotoPos]['PhotoIdn'] + "'></a>";
	
	if(IE) SlideShowDiv.filters[0].play();
	    
	if (++PhotoPos>=PhotoDataTable.Rows.length)
	    PhotoPos=0;
	    
	window.setTimeout("slideShow()", 10000);
	
	   
}

slideShow();



var PhotoDataTable2;
var PhotoPos2=0;
var PhotoFilterPos2=0;

function slideShow2()
{
    var IE = document.all?true:false;

    if(PhotoDataTable2==null)
    {    
	    Anthem_InvokeAnotherPageMethod('Gallery.aspx?Anthem_CallBack=true','photoDataSet',[9328],
	        function(result){
	            PhotoDataTable2 = result.value.Tables['Photo'];

                slideShow2();
	        }
	    );
        return;
	}
    
    if(IE){
        SlideShowDiv2.style.filter =PhotoFilter2[PhotoFilterPos2];               
        SlideShowDiv2.filters[0].apply();
    
        if(++PhotoFilterPos2>=PhotoFilter2.length)
            PhotoFilterPos2=0;
    }
    
	SlideShowDiv2.innerHTML=
	    "<a href='Gallery.aspx?ParTree=" + PhotoDataTable2.Rows[PhotoPos2]['CatTree']
		+ "&PhotoIdn=" + PhotoDataTable2.Rows[PhotoPos2]['PhotoIdn'] + "' >"
	    + "<img width=120 height=70 border=0 src='AdvGallery/GalleryShowPic.aspx?PhotoMode=0&PhotoIdn="
	    + PhotoDataTable2.Rows[PhotoPos2]['PhotoIdn'] + "'></a>";
	
	if(IE) SlideShowDiv2.filters[0].play();
	    
	if (++PhotoPos2>=PhotoDataTable2.Rows.length)
	    PhotoPos2=0;
	    
	window.setTimeout("slideShow2()", 10000);
	
	   
}


//slideShow2();

