
	dim switchEnabled
	dim curSlide
	dim slideCount
	dim autoSwitch

	curSlide = 1		' first slide
	slideCount = 9		' number of slides
	autoSwitch = True	' automatic slide show

	sub Window_onLoad()
		dim i
		for i = 2 to slideCount
			document.all.item("slide" & i).style.visibility = "hidden"
		next

		switchEnabled = True
		if autoSwitch then
			SwitchSlides()
		end if
	end sub

	sub SlideContainer_OnFilterChange()
		switchEnabled = True
		if autoSwitch then
			SwitchSlides()
		end if
	end sub

	sub SwitchSlides()
		if switchEnabled then
			switchEnabled = False

			SlideContainer.filters.item(0).Apply()
			SlideContainer.filters.item(0).Transition = 25

			document.all.item("Slide" & curSlide).style.visibility = "hidden"
			curSlide = curSlide + 1
			if curSlide > slideCount then
				curSlide = 1
			end if
			document.all.item("Slide" & curSlide).style.visibility = ""

			SlideContainer.filters(0).play()
		end if
	end sub



