-- Team_Entrance Season 2020/21
-- RGF28_Mods

local fileroot = ".\\content\\Team_Entrance"
local tid

function set_tournament_id(ctx, tournament_id)
    tid = tournament_id or nil
    return tournament_id
end

local function fixdemo(ctx, options)
  tournament_id = ctx.tournament_id
  home_id = ctx.home_team
  away_id = ctx.away_team
----Premier League (ENGLAND)
    if tournament_id == 39 and home_id == 101 then
              Data = "PremierLeague\\Arsenal"
	elseif tournament_id == 39 and home_id == 107 then
              Data = "PremierLeague\\Aston Villa"	
    elseif tournament_id == 39 and home_id == 377 then
              Data = "PremierLeague\\Brighton & Hove Albion"	  			  
	elseif tournament_id == 39 and home_id == 377 then
              Data = "PremierLeague\\Burnley"
	elseif tournament_id == 39 and home_id == 377 then
              Data = "PremierLeague\\Chelsea"	
	elseif tournament_id == 39 and home_id == 377 then
              Data = "PremierLeague\\Crystal Palace"	
	elseif tournament_id == 39 and home_id == 377 then
              Data = "PremierLeague\\Everton"			
	elseif tournament_id == 39 and home_id == 178 then
              Data = "PremierLeague\\Fulham"
	elseif tournament_id == 39 and home_id == 104 then
              Data = "PremierLeague\\Leeds United"
	elseif tournament_id == 39 and home_id == 204 then
              Data = "PremierLeague\\Leicester City"		  
	elseif tournament_id == 39 and home_id == 103 then
              Data = "PremierLeague\\Liverpool"
	elseif tournament_id == 39 and home_id == 173 then
              Data = "PremierLeague\\Manchester City"
	elseif tournament_id == 39 and home_id == 100 then
              Data = "PremierLeague\\Manchester United"
	elseif tournament_id == 39 and home_id == 106 then
              Data = "PremierLeague\\Newcastle United"
	elseif tournament_id == 39 and home_id == 4194 then
              Data = "PremierLeague\\Sheffield United"
	elseif tournament_id == 39 and home_id == 207 then
              Data = "PremierLeague\\Southampton"
	elseif tournament_id == 39 and home_id == 179 then
              Data = "PremierLeague\\Tottenham Hotspur"
	elseif tournament_id == 39 and home_id == 399 then
              Data = "PremierLeague\\West Bromwich Albion"
	elseif tournament_id == 39 and home_id == 105 then
              Data = "PremierLeague\\West Ham United"	
	elseif tournament_id == 39 and home_id == 208 then
              Data = "PremierLeague\\Wolverhampton"		  
			  
----LaLiga Santander (SPAIN)
    elseif tournament_id == 43 and home_id == 258 then
              Data = "LaLiga\\Athletic_Bilbao"
	elseif tournament_id == 43 and home_id == 172 then
              Data = "LaLiga\\Atletico_Madrid"
	elseif tournament_id == 43 and home_id == 108 then
              Data = "LaLiga\\Barcelona"
	elseif tournament_id == 43 and home_id == 195 then
              Data = "LaLiga\\Celta_Vigo"
	elseif tournament_id == 43 and home_id == 4308 then
              Data = "LaLiga\\Cádiz"
	elseif tournament_id == 43 and home_id == 4145 then
              Data = "LaLiga\\Devortivo_Alavés"
	elseif tournament_id == 43 and home_id == 361 then
              Data = "LaLiga\\Elche"
	elseif tournament_id == 43 and home_id == 4146 then
              Data = "LaLiga\\Eibar"
	elseif tournament_id == 43 and home_id == 1765 then
              Data = "LaLiga\\Granada"
	elseif tournament_id == 43 and home_id == 362 then
              Data = "LaLiga\\Getafe"
	elseif tournament_id == 43 and home_id == 2188 then
              Data = "LaLiga\\Huesca"
	elseif tournament_id == 43 and home_id == 366 then
              Data = "LaLiga\\Levante"
	elseif tournament_id == 43 and home_id == 263 then
              Data = "LaLiga\\Osasuna"
	elseif tournament_id == 43 and home_id == 194 then
              Data = "LaLiga\\Real_Betis"
	elseif tournament_id == 43 and home_id == 109 then
              Data = "LaLiga\\Real_Madrid"
	elseif tournament_id == 43 and home_id == 196 then
              Data = "LaLiga\\Real_Sociedad"
	elseif tournament_id == 43 and home_id == 265 then
              Data = "LaLiga\\Sevilla"
	elseif tournament_id == 43 and home_id == 110 then
              Data = "LaLiga\\Valencia"
	elseif tournament_id == 43 and home_id == 266 then
              Data = "LaLiga\\Real_Valladolid"
	elseif tournament_id == 43 and home_id == 267 then
              Data = "LaLiga\\Villarreal" 

----Premier League (ENGLAND) in Exhibition match
    elseif tournament_id == 0 and (home_id == 101) and (away_id == 101 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Arsenal"			      --Arsenal
    elseif tournament_id == 0 and (home_id == 107) and (away_id == 107 or away_id == 101 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Aston Villa"			  --Aston Villa
	elseif tournament_id == 0 and (home_id == 377) and (away_id == 377 or away_id == 107 or away_id == 101 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Brighton & Hove Albion" --Brighton & Hove Albion			   
	elseif tournament_id == 0 and (home_id == 378) and (away_id == 378 or away_id == 107 or away_id == 377 or away_id == 101 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Burnley"				  --Burnley	
	elseif tournament_id == 0 and (home_id == 102) and (away_id == 102 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 101 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Chelsea"				  --Chelsea
 	elseif tournament_id == 0 and (home_id == 382) and (away_id == 382 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 101 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Crystal Palace"		  --Crystal Palace
	elseif tournament_id == 0 and (home_id == 177) and (away_id == 177 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 101 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Everton"				  --Everton		
	elseif tournament_id == 0 and (home_id == 178) and (away_id == 178 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 101 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Fulham"				  --Fulham
    elseif tournament_id == 0 and (home_id == 104) and (away_id == 104 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 101 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Leeds United"			  --Leeds United
	elseif tournament_id == 0 and (home_id == 204) and (away_id == 204 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 101 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Leicester City"         --Leicester City
	elseif tournament_id == 0 and (home_id == 103) and (away_id == 103 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 101 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Liverpool"			  --Liverpool
	elseif tournament_id == 0 and (home_id == 173) and (away_id == 173 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 101 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Manchester City"		  --Manchester City
	elseif tournament_id == 0 and (home_id == 100) and (away_id == 100 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 101 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Manchester United"	  --Manchester United			  
	elseif tournament_id == 0 and (home_id == 106) and (away_id == 106 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 101 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Newcastle United"		  --Newcastle United
	elseif tournament_id == 0 and (home_id == 4194) and (away_id == 4194 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 101 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Sheffield United"	      --Sheffield United
	elseif tournament_id == 0 and (home_id == 207) and (away_id == 207 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 101 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Southampton"			  --Southampton
	elseif tournament_id == 0 and (home_id == 179) and (away_id == 179 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 101 or away_id == 399 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\Tottenham Hotspur"	  --Tottenham Hotspur
	elseif tournament_id == 0 and (home_id == 399) and (away_id == 399 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 101 or away_id == 105 or away_id == 208) then
               Data = "PremierLeague\\West Bromwich Albion"	  --West Bromwich Albion
	elseif tournament_id == 0 and (home_id == 105) and (away_id == 105 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 101 or away_id == 208) then
               Data = "PremierLeague\\West Ham United"		  --West Ham United
	elseif tournament_id == 0 and (home_id == 208) and (away_id == 208 or away_id == 107 or away_id == 377 or away_id == 378 or away_id == 102 or away_id == 382 or away_id == 177 or away_id == 178 or away_id == 104 or away_id == 204 or away_id == 103 or away_id == 173 or away_id == 100 or away_id == 106 or away_id == 4194 or away_id == 207 or away_id == 179 or away_id == 399 or away_id == 105 or away_id == 101) then
               Data = "PremierLeague\\Wolverhampton"		  --Wolverhampton
			   
----LaLiga Santander (SPAIN) in Exhibition match
    elseif tournament_id == 0 and (home_id == 258) and (away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Athletic_Bilbao"				--Atletic_Bilbao
	elseif tournament_id == 0 and (home_id == 172) and (away_id == 172 or away_id == 258 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Atletico_Madrid"				--Atletico_Madrid
	elseif tournament_id == 0 and (home_id == 108) and (away_id == 108 or away_id == 258 or away_id == 172 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Barcelona" 					--Barcelona
	elseif tournament_id == 0 and (home_id == 195) and (away_id == 195 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Celta_Vigo" 					--Celta_Vigo
	elseif tournament_id == 0 and (home_id == 4308) and (away_id == 4308 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Cádiz"						--Cádiz
	elseif tournament_id == 0 and (home_id == 4145) and (away_id == 4145 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Devortivo_Alavés"			--Devortivo_Alavés
	elseif tournament_id == 0 and (home_id == 361) and (away_id == 361 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Elche"						--Elche
	elseif tournament_id == 0 and (home_id == 4146) and (away_id == 4146 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Eibar"						--Eibar
	elseif tournament_id == 0 and (home_id == 1765) and (away_id == 1765 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Granada"						--Granada
	elseif tournament_id == 0 and (home_id == 362) and (away_id == 362 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Getafe"						--Getafe
	elseif tournament_id == 0 and (home_id == 2188) and (away_id == 2188 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Huesca"						--Huesca
	elseif tournament_id == 0 and (home_id == 366) and (away_id == 366 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Levante"						--Levante
	elseif tournament_id == 0 and (home_id == 263) and (away_id == 263 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Osasuna"						--Osasuna
	elseif tournament_id == 0 and (home_id == 194) and (away_id == 194 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Real_Betis"					--Real_Betis
	elseif tournament_id == 0 and (home_id == 109) and (away_id == 109 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Real_Madrid"					--Real_Madrid
	elseif tournament_id == 0 and (home_id == 196) and (away_id == 196 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 265 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Real_Sociedad"				--Real_Sociedad
	elseif tournament_id == 0 and (home_id == 265) and (away_id == 265 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 110 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Sevilla"						--Sevilla
	elseif tournament_id == 0 and (home_id == 110) and (away_id == 110 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 266 or away_id == 267) then
               Data = "LaLiga\\Valencia"					--Valencia
	elseif tournament_id == 0 and (home_id == 266) and (away_id == 266 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 267) then
               Data = "LaLiga\\Real_Valladolid"				--Real_Valladolid
	elseif tournament_id == 0 and (home_id == 267) and (away_id == 267 or away_id == 258 or away_id == 172 or away_id == 108 or away_id == 195 or away_id == 4308 or away_id == 4145 or away_id == 361 or away_id == 4146 or away_id == 1765 or away_id == 362 or away_id == 2188 or away_id == 366 or away_id == 263 or away_id == 194 or away_id == 109 or away_id == 196 or away_id == 265 or away_id == 110 or away_id == 266) then
               Data = "LaLiga\\Villarreal"					--Villarreal

else
     Data = nil
  end
end

local function make_key(ctx, filename)
	fixdemo(ctx)
    if tid and Data ~= nil then
       return string.format("%s:%s", Data, filename)
    end
  end

local function get_filepath(ctx, filename, key)
    if tid and Data ~= nil then
        return string.format("%s\\%s\\%s", fileroot, Data, filename)
    end
end

local function printlog(ctx)
    if Data ~= nil then
       log("fixdemo switching to: " .. Data)
	end
end

local function init(ctx)
    if fileroot:sub(1,1)=='.' then
        fileroot = ctx.sider_dir .. fileroot
    end
    ctx.register("set_tournament_id", set_tournament_id)
    ctx.register("livecpk_make_key", make_key)
    ctx.register("livecpk_get_filepath", get_filepath)
	 ctx.register("tournament_check_for_trophy", printlog)
end

return { init = init }