require "Scene_1.lua"
require "Scene_2.lua"
require "Scene_3.lua"

require "Scene_4.lua"
require "Scene_5.lua"
require "Scene_6.lua"

require "Scene_7.lua"
require "Scene_8.lua"
require "Scene_9.lua"
require "Scene_10.lua"

local time = 0

function EndAnimation()
	AnimationReset()
end

currentMult = Begining
	
local TS1B = true
local TS1E = true

local TS2B = true
local TS2E = true

local TS3B = true
local TS3E = true

local TS4B = true
local TS4E = true

local TS5B = true
local TS5E = true

local TS6B = true
local TS6E = true

local TS7B = true
local TS7E = true

local TS8B = true
local TS8E = true

local TS9B = true
local TS9E = true

local TS10B = true
local TS10E = true
	
local isNowLightning
	
function AnimationReset()
	v1On = 0
	v2On = 0
	v3On = 0
	v4On = 0
	v5On = 0
	v6On = 0
	v7On = 0
	v8On = 0
	v10On = 0

	TS1B = true
	TS1E = true
	
	TS2B = true
	TS2E = true
	
	TS3B = true
	TS3E = true
	
	TS4B = true
	TS4E = true
	
	TS5B = true
	TS5E = true
	
	TS6B = true
	TS6E = true
	
	TS7B = true
	TS7E = true
	
	TS8B = true
	TS8E = true
	
	TS9B = true
	TS9E = true
	
	TS10B = true
	TS10E = true
	
	time = 0
---	DoAnim9 = false
	
	isNowLightning = false		
	currentMult.Effect10.layer.isVisible = false	
	currentMult.Effect10.Candle1:Do ("Finish")
	currentMult.Effect10.Candle2:Do ("Finish")
	currentMult.Effect10.Sphere:Do ("Finish")
	                               
	currentMult.Effect07.layer.isVisible = false			
--	currentMult.Effect07.Altar:Do ("Finish")
	
	currentMult.Effect06.layer.isVisible = false		
	currentMult.Effect06.Altar:Do ("Finish")
	
	currentMult.Effect05.layer.isVisible = false	
	currentMult.Effect05.Candle1:Do ("Finish")
	currentMult.Effect05.Candle2:Do ("Finish")
	currentMult.Effect05.Sphere:Do ("Finish")
	
	
	currentMult.Effect04.layer.isVisible = false	
	currentMult.Effect04.RainRight:Do("Finish")		
	currentMult.Effect04.BackgroundRain:Do("Finish")			
	currentMult.Effect04.TreeFlame1:Do("Finish")			
	currentMult.Effect04.TreeFlame2:Do("Finish")			
	currentMult.Effect04.TreeFlame3:Do("Finish")				
	
	currentMult.Effect03.layer.isVisible = false		
	currentMult.Effect03_cloud.layer.isVisible = false	
	currentMult.Effect03.RainRight:Do("Finish")		
	currentMult.Effect03.BackgroundRain:Do("Finish")		
	currentMult.Effect03.Vulkan:Do("Finish")		
	currentMult.Effect03_cloud.DarkClouds3:Do("Finish")			
	
	
	currentMult.Effect01.layer.isVisible = false	
	currentMult.Effect01.Moloko:Do("Finish")	
	currentMult.Effect01.Sun1:Do("Finish")	
	
	
	currentMult.Effect02.layer.isVisible = false	
--	currentMult.Effect04.Lightning4:Do("Reset")
	
	currentMult.Effect09.layer.isVisible = false
	currentMult.Effect09.Spark1:Do ("Finish")
	currentMult.Effect09.Spark2:Do ("Finish")
	currentMult.Effect09.Spark3:Do ("Finish")
	currentMult.Effect09.Spark4:Do ("Finish")
	currentMult.Effect09.Spark5:Do ("Finish")
	currentMult.Effect09.Spark6:Do ("Finish")
	currentMult.Effect09.Spark7:Do ("Finish")
	currentMult.Effect09.Spark8:Do ("Finish")
	currentMult.Effect09.Glow:Do   ("Finish")
--	currentMult.Effect09.Altar:Do  ("Finish")	
	
	currentMult.Effect09A.layer.isVisible = false		
	currentMult.Effect09A.Altar:Do          ("Finish")	
	
	currentMult.Effect09R.layer.isVisible = false		
	currentMult.Effect09R.RainRight:Do      ("Finish")	
	currentMult.Effect09R.BackgroundRain:Do ("Finish")		
	
	currentMult.Effect08.layer.isVisible = false		
	currentMult.Effect08.Bubble1:Do ("Fisinsh")
	currentMult.Effect08.Bubble2:Do ("Fisinsh")	         
	
	currentMult.Effect08A.layer.isVisible = false		
	currentMult.Effect08A.Altar:Do   ("Fisinsh")	
	                      
	currentMult.Scene1.layer.isVisible = false	
	currentMult.Scene2.layer.isVisible = false	
	currentMult.Scene3.layer.isVisible = false	
	currentMult.Scene3_sky.layer.isVisible = false	
	currentMult.Scene3_light.layer.isVisible = false		
	currentMult.Scene3.Light.color = Color (255,255,255,0)
	
	currentMult.Scene4.layer.isVisible = false		
	currentMult.Scene4_light.layer.isVisible = false		
	currentMult.Scene4.Light.color = Color (255,255,255,0)
	currentMult.Scene5.layer.isVisible = false	
	currentMult.Scene6.layer.isVisible = false	
	
	currentMult.Scene7.layer.isVisible = false	
	
	currentMult.Scene6.Symbol.color = Color(255, 255, 255, 255)
	currentMult.Scene7.Symbol.color = Color(255, 255, 255, 255)
	currentMult.Scene8.Symbol.color = Color(255, 255, 255, 255)
	currentMult.Scene9.Symbol.color = Color(255, 255, 255, 255)

	currentMult.Scene8.layer.isVisible = false	
	currentMult.Scene9.layer.isVisible = false	
	currentMult.Scene9_light.layer.isVisible = false
	currentMult.Scene9.Light.color = Color (255,255,255,0)		
	currentMult.Scene10.layer.isVisible = false	
	currentMult.Scene10A.layer.isVisible = false	
	SetIdTextScene(0,0,0)
end	

function BeginShadow (LeftTime, timeScene)
	if timeScene <= LeftTime then
		local timeShadow = timeScene/LeftTime
		currentMult.BlackBackground.BlackSqr.color = Color(255, 255, 255, lerp(255, 0, timeShadow))		
	end		
end


function EndShadow (timeScene, RightTime)
	if 1 - timeScene <= RightTime then
		local timeShadow = (RightTime + timeScene-1)/RightTime
		currentMult.BlackBackground.BlackSqr.color = Color(255, 255, 255, lerp(0,255, timeShadow))		
	end	
end

function BeginTextShadow (LeftTime, timeScene)
	if timeScene <= LeftTime then
		local timeShadow = timeScene/LeftTime		
		SetAlpha(lerp(0, 255, timeShadow))
	end		
end

function EndTextShadow (timeScene, RightTime)
	if 1 - timeScene <= RightTime then
		local timeShadow = (RightTime + timeScene-1)/RightTime		
		SetAlpha(lerp(255, 0, timeShadow))
	end	
end

v1On = 0
function Scene1Move (leftTime, rightTime, Alpha, Betha, Relax, time)
	if  leftTime <= time and time < rightTime then				--
		if TS1B then
			Scene1Show()
			TS1B = false			
--			TS1E = true
--			currentMult.Effect01.Sun1:Do("Reset")
			SetIdTextScene(11, 400, 170)
			currentMult.Effect01.layer.isVisible = true			
			Sound:PlaySample("Sound1")
--			Sound:PlaySample("Narrator1")
		end

		if (leftTime+8 <= time) and (v1On == 0) then
			Sound:PlaySample("Narrator1")
			v1On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Effects01(timeScene)	
		Visual_1 (timeScene, Relax)
		
		local smena = 0.24

		if smena+0.1 < timeScene and timeScene <= smena+0.3  then
			local lt = (timeScene - smena-0.1)/0.2
			SetIdTextScene(1, 400, 170)
			BeginTextShadow (0.9, lt)	
		end	

	elseif (time >= rightTime) then
--	else
		if TS1E then
			currentMult.Effect01.layer.isVisible = false
			Scene1Hide()
			TS1E = false			
		end		
	end	
end

v2On = 0
function Scene2Move (leftTime, rightTime, Alpha, Betha, time)
	if  leftTime <= time and time < rightTime then				
		if TS2B then
			Scene2Show()			
	--		currentMult.Effect02.Smoke1:Do("Reset")
			currentMult.Effect02.layer.isVisible = true			
			TS2B = false
--			TS2E = true
			SetIdTextScene(2, 400, 150)
	--		Sound:PlaySample("Narrator2")
			Sound:PlaySample("Sound2")

		end	
		if (leftTime+1 <= time) and (v2On == 0) then
			Sound:PlaySample("Narrator2")
			v2On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Effects02 (timeScene)
		Visual_2 (timeScene)
	elseif (time >= rightTime) then
--	else
		if TS2E then
			Scene2Hide()
			currentMult.Effect02.layer.isVisible = false
			TS2E = false			
		end		
	end	
end

local RA = true

v3On = 0
function Scene3Move (leftTime, rightTime, Alpha, Betha, time)
	if  leftTime <= time and time < rightTime then					
	
		if TS3B then			
			Scene3Show()
			currentMult.Scene3_sky.layer.isVisible = true
		--	currentMult.Effect03.layer.isVisible = true		
			
			currentMult.Effect01.layer.isVisible = true			
--			TS3E = true
			TS3B = false
			SetIdTextScene(30, 400, 165)
		--	Sound:PlaySample("Narrator3")
			Sound:PlaySample("Sound3")
		end	
		if (leftTime+1 <= time) and (v3On == 0) then
			Sound:PlaySample("Narrator3")
			v3On = 1
		end
		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		
		BeginTextShadow (Alpha, timeScene)
		
		local smena = 0.1
		
		if smena <= timeScene and timeScene <= smena+0.1   then
			local lt = (timeScene - smena)/0.1
			EndTextShadow   (lt, 0.9)			
		end
		
		if smena+0.1 < timeScene and timeScene <= smena+0.3  then
			local lt = (timeScene - smena-0.1)/0.2
			SetIdTextScene(3, 400, 165)
			BeginTextShadow (0.9, lt)	
		end	
		
		EndTextShadow   (timeScene, Betha)
		
	--	Effects03(timeScene)			
		LightningAnim03 (0.4, 0.1, timeScene)	
		Visual_3 (timeScene)
	elseif (time >= rightTime) then
--	else
		if TS3E then
			Scene3Hide()
			currentMult.Effect03.layer.isVisible = false
			currentMult.Effect03_cloud.layer.isVisible = false
			currentMult.Effect01.layer.isVisible = false
			TS3E = false			
		end		
	end	
end

v4On = 0
function Scene4Move (leftTime, rightTime, Alpha, Betha, time)
	if  leftTime <= time and time < rightTime then				
		if TS4B then
			Scene4Show()
			currentMult.Effect04.layer.isVisible = true
			TS4B = false
--			TS4E = true						
			SetIdTextScene(4, 400, 170)
--			Sound:PlaySample("Narrator4")
			Sound:PlaySample("Sound4")
		end	
		if (leftTime+1 <= time) and (v4On == 0) then
			Sound:PlaySample("Narrator4")
			v4On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 		
		
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)	
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		
		LightningAnim04 (0.5, 0.1, timeScene)	
		Effects04(timeScene)			
		Visual_4 (timeScene)
	elseif (time >= rightTime) then
--	else
		if TS4E then
			currentMult.Effect04.layer.isVisible = false
			Scene4Hide()
			TS4E = false			
		end		
	end	
end

v5On = 0
function Scene5Move (leftTime, rightTime, Alpha, Betha, time)
	if  (leftTime <= time) and (time < rightTime) then				
		if TS5B then
			currentMult.Effect05.layer.isVisible = true
			Scene5Show()
			TS5B = false
--			TS5E = true
			SetIdTextScene(5, 400, 178)
--			Sound:PlaySample("Magician5")
			Sound:PlaySample("Sound5")
		end	
		if (leftTime+1 <= time) and (v5On == 0) then
			Sound:PlaySample("Magician5")
			v5On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Visual_5 (timeScene)
	elseif (time >= rightTime) then
		if TS5E then
			currentMult.Effect05.layer.isVisible = false
			Scene5Hide()
			TS5E = false
			
		end		
	end	
end

v6On = 0
function Scene6Move (leftTime, rightTime, Alpha, Betha, Relax, Destroid, Pause, time)
	if  leftTime <= time and time < rightTime then				
		if TS6B then
			Scene6Show()
			TS6B = false
			SetIdTextScene(6, 400, 130)
	--		Sound:PlaySample("Magician6")
			Sound:PlaySample("Sound6")
		end	
		if (leftTime+1 <= time) and (v6On == 0) then
			Sound:PlaySample("Magician6")
			v6On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Visual_6 (timeScene, Relax, Destroid, Pause)
		SymbolAnim_1 (timeScene)
	elseif (time >= rightTime) then
		if TS6E then
			Scene6Hide()
			TS6E = false			
		end		
	end	
end

v7On = 0
function Scene7Move (leftTime, rightTime, Alpha, Betha, Relax, Destroid, Pause, time)
	if  leftTime <= time and time < rightTime then				
		if TS7B then
			Scene7Show()
			TS7B = false
			SetIdTextScene(7, 400, 130)
--			Sound:PlaySample("Magician7")
			Sound:PlaySample("Sound7")
		end	
		if (leftTime+1 <= time) and (v7On == 0) then
			Sound:PlaySample("Magician7")
			v7On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Visual_7 (timeScene, Relax, Destroid, Pause)
		SymbolAnim_2(timeScene)
	elseif (time >= rightTime) then
--	else
		if TS7E then
			Scene7Hide()
			TS7E = false			
		end		
	end	
end

v8On = 0
function Scene8Move (leftTime, rightTime, Alpha, Betha, Relax, Destroid, Pause, time)
	if  leftTime <= time and time < rightTime then				
		if TS8B then
			Scene8Show()
			currentMult.Effect08.layer.isVisible = true
			TS8B = false
			SetIdTextScene(8, 400, 130)
--			Sound:PlaySample("Magician9")
			Sound:PlaySample("Sound8")
		end	
		if (leftTime+1 <= time) and (v8On == 0) then
			Sound:PlaySample("Magician9")
			v8On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Visual_8 (timeScene, Relax, Destroid, Pause)
		Effects08 ( timeScene )	
		SymbolAnim_3(timeScene)
	elseif (time >= rightTime) then
--	else
		if TS8E then
			currentMult.Effect08.layer.isVisible = false
			Scene8Hide()
			TS8E = false			
		end		
	end	
end

v9On = 0
function Scene9Move (leftTime, rightTime, Alpha, Betha, Relax, Destroid, Pause, time) --
	if  leftTime <= time and time < rightTime then				
		if TS9B then
			Scene9Show()
			currentMult.Effect09.layer.isVisible = true
		--	currentMult.Effect09R.layer.isVisible = true		
			TS9B = false
--			TS9E = true
			SetIdTextScene(9, 400, 130)
--			Sound:PlaySample("Magician8")
			Sound:PlaySample("Sound9")
		end	
		if (leftTime+1 <= time) and (v9On == 0) then
			Sound:PlaySample("Magician8")
			v9On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)		
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)
		
		Visual_9 (timeScene, Relax, Destroid, Pause)
		SymbolAnim_4(timeScene)	
	elseif (time >= rightTime) then
--	else
		if TS9E then
			Scene9Hide()
			currentMult.Effect09.layer.isVisible = false
			currentMult.Effect09R.layer.isVisible = false
			TS9E = false			
		end		
	end	
end

v11On = 0
v10On = 0
function Scene10Move (leftTime, rightTime, Alpha, Betha, time)
	if  leftTime <= time and time < rightTime then				
		if TS10B then
			currentMult.Effect10.layer.isVisible = true
			Scene10Show()			
			TS10B = false
			SetIdTextScene(10, 400, 175)
--			Sound:PlaySample("Magician10")
			Sound:PlaySample("Sound10")
		end	
		if (leftTime+1 <= time) and (v10On == 0) then
			Sound:PlaySample("Magician10")
			v10On = 1
		end

		local timeScene = (time - leftTime)/(rightTime - leftTime) 
		BeginShadow (Alpha, timeScene)
		EndShadow   (timeScene, Betha)		
		
		BeginTextShadow (Alpha, timeScene)
		EndTextShadow   (timeScene, Betha)

		if ( timeScene >= 1-Betha*0.25) and (v11On == 0) then
			Sound:PlaySample("Magician11")
			v11On = 1
		end

		Visual_10 (timeScene)		
	elseif (time >= rightTime) then
--	else
		if TS10E then
			currentMult.Effect10.layer.isVisible = false
			Scene10Hide()			
			TS10E = false
			MultFunc(Message("continue", "press"))			
		end		
	end	
end

-- { BeginTime, LeftShadow, RightShadow [,Relax]}
local TimesScenes = {20.3, 9.2, 15.2, 17, 24, 4, 3.2, 3.2, 4.2, 26}

local Scene1Data = {0, 0.1, 0.1, 0.9}
local Scene2Data = {TimesScenes[1], 0.1, 0.1}
local Scene3Data = {TimesScenes[1]+TimesScenes[2], 0.1, 0.1}

local Scene4Data = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3], 0.1, 0.1}
local Scene5Data = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3]+TimesScenes[4], 0.1, 0.1} 

--{BeginTime, LeftShadow, RightShadow, Relax, Destroid, Pause}

local Scene6Data  = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3]+TimesScenes[4]+TimesScenes[5], 0.1, 0.1, 0.1, 0.4, 0.1}
local Scene7Data  = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3]+TimesScenes[4]+TimesScenes[5]+TimesScenes[6], 0.1, 0.2, 0.5, 0.4, 0.2} 
local Scene8Data  = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3]+TimesScenes[4]+TimesScenes[5]+TimesScenes[6]+TimesScenes[7], 0.1, 0.2, 0.4, 0.5, 0.1}
local Scene9Data  = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3]+TimesScenes[4]+TimesScenes[5]+TimesScenes[6]+TimesScenes[7]+TimesScenes[8], 0.1, 0.05, 0.8, 0.6, 0.1}
local Scene10Data = {TimesScenes[1]+TimesScenes[2]+TimesScenes[3]+TimesScenes[4]+TimesScenes[5]+TimesScenes[6]+TimesScenes[7]+TimesScenes[8]+TimesScenes[9], 0.1, 0.1}

local LengthFullAnimateTime = TimesScenes[1] + TimesScenes[2] + TimesScenes[3] + TimesScenes[4] + TimesScenes[5] + TimesScenes[6] + TimesScenes[7] + TimesScenes[8] + TimesScenes[9] + TimesScenes[10]

local Choise = 11

local Speed = 10

function SetChoise(c)		
	Choise = c
	AnimationReset()	
end

function UpSpeed ()
	Speed = Speed + 1	
	SetSpeed ( Speed )
	AnimationReset()	
end

function DownSpeed ()
	Speed = Speed - 1		
	SetSpeed ( Speed )
	AnimationReset()	
end

function AnimationDo(dt)
	time = time + dt					
	if (Choise == 1) then
		TimesScenes[1] = Speed
	--	Scene1Move (0, Speed, Scene1Data[2], Scene1Data[3], Scene1Data[4], time)		
		Scene1Move (Scene1Data[1], Scene2Data[1], Scene1Data[2], Scene1Data[3], Scene1Data[4], time)		
	elseif (Choise == 2) then
		TimesScenes[2] = Speed
	--	Scene2Move (0, Speed, Scene2Data[2], Scene2Data[3], time)		
		Scene2Move (0, Scene3Data[1] - Scene2Data[1], Scene2Data[2], Scene2Data[3], time)			
	elseif (Choise == 3) then
		TimesScenes[3] = Speed
	--	Scene3Move (0, Speed, Scene3Data[2], Scene3Data[3], time)		
		Scene3Move (0, Scene4Data[1] - Scene3Data[1],  Scene3Data[2], Scene3Data[3], time)
	elseif (Choise == 4) then
		TimesScenes[4] = Speed
	--	Scene4Move (0, Speed, Scene4Data[2], Scene4Data[3], time)		
		Scene4Move (0, Scene5Data[1] - Scene4Data[1], Scene4Data[2], Scene4Data[3], time)
	elseif (Choise == 5) then
		TimesScenes[5] = Speed
	--	Scene5Move (0, Speed, Scene5Data[2], Scene5Data[3], time)		
		Scene5Move (0, Scene6Data[1] - Scene5Data[1], Scene5Data[2], Scene5Data[3], time)
	elseif (Choise == 6) then
		TimesScenes[6] = Speed
	--	Scene6Move (0, Speed, Scene6Data[2], Scene6Data[3], Scene6Data[4],Scene6Data[5], Scene6Data[6], time)		
		Scene6Move (0,         Scene7Data[1] - Scene6Data[1], Scene6Data[2], Scene6Data[3], Scene6Data[4], Scene6Data[5], Scene6Data[6], time)
	elseif (Choise == 7) then		                                                                              
		TimesScenes[7] = Speed
	--	Scene7Move (0, Speed, Scene7Data[2], Scene7Data[3], Scene7Data[4], Scene7Data[5], Scene7Data[6], time)		
		Scene7Move (0,         Scene8Data[1] - Scene7Data[1], Scene7Data[2], Scene7Data[3], Scene7Data[4], Scene7Data[5], Scene7Data[6], time)
	elseif (Choise == 8) then		                                                                              
		TimesScenes[8] = Speed 
	--	Scene9Move (0, Speed, Scene8Data[2], Scene8Data[3], Scene8Data[4], Scene8Data[5], Scene8Data[6], time)		
		Scene9Move (0,         Scene9Data[1] - Scene8Data[1], Scene8Data[2], Scene8Data[3], Scene8Data[4], Scene8Data[5], Scene8Data[6], time)
	elseif (Choise == 9) then		                                                                      
		TimesScenes[9] = Speed
	--	Scene8Move (0, Speed, Scene9Data[2], Scene9Data[3], Scene9Data[4], Scene9Data[5], Scene9Data[6], time)		
		Scene8Move (0, Scene10Data[1] - Scene9Data[1], Scene9Data[2], Scene9Data[3], Scene9Data[4], Scene9Data[5], Scene9Data[6], time)
	elseif (Choise == 10) then		                                                                      
		 TimesScenes[10] = Speed
	--	Scene10Move (0, Speed, Scene10Data[2], Scene10Data[3], time)		
		Scene10Move (0, LengthFullAnimateTime - Scene10Data[1], Scene10Data[2], Scene10Data[3], time)
	else	
		Scene1Move (Scene1Data[1], Scene2Data[1],         Scene1Data[2], Scene1Data[3], Scene1Data[4], time)
		Scene2Move (Scene2Data[1], Scene3Data[1],         Scene2Data[2], Scene2Data[3], time)
		Scene3Move (Scene3Data[1], Scene4Data[1],         Scene3Data[2], Scene3Data[3], time)
		Scene4Move (Scene4Data[1], Scene5Data[1],         Scene4Data[2], Scene4Data[3], time)
		Scene5Move (Scene5Data[1], Scene6Data[1],         Scene5Data[2], Scene5Data[3], time)
		Scene6Move (Scene6Data[1], Scene7Data[1],         Scene6Data[2], Scene6Data[3], Scene6Data[4], Scene6Data[5], Scene6Data[6], time)
		Scene7Move (Scene7Data[1], Scene8Data[1],         Scene7Data[2], Scene7Data[3], Scene7Data[4], Scene7Data[5], Scene7Data[6], time) -- 
		Scene9Move (Scene8Data[1], Scene9Data[1],         Scene8Data[2], Scene8Data[3], Scene8Data[4], Scene8Data[5], Scene8Data[6], time)	
		Scene8Move (Scene9Data[1], Scene10Data[1], Scene9Data[2], Scene9Data[3], Scene9Data[4], Scene9Data[5], Scene9Data[6], time)		
		Scene10Move (Scene10Data[1], LengthFullAnimateTime, Scene10Data[2], Scene10Data[3], time)
	end                                                                                                             
end                                                                                