function ExecuteScript(strId)
{
  switch (strId)
  {
      case "6oCjZllfUOW":
        Script1();
        break;
      case "6JgRF9xO9p6":
        Script2();
        break;
      case "6heEsjFK6ac":
        Script3();
        break;
      case "6lMTaZCBW0t":
        Script4();
        break;
      case "6B2Ge8G6lcf":
        Script5();
        break;
      case "6dTOFRNwiMx":
        Script6();
        break;
      case "6GNv3x3ey3q":
        Script7();
        break;
      case "5xM99zt3dIP":
        Script8();
        break;
      case "6GZ61ZKp8NP":
        Script9();
        break;
  }
}

function Script1()
{
  const player = GetPlayer();
let currentPage = player.SetVar("currentPage", 0);
let slideNumbers = player.SetVar("slideNumbers", "[]");
}

function Script2()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId)){
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script3()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script4()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script5()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script6()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script7()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script8()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

function Script9()
{
  const player = GetPlayer();
let currentPage = player.GetVar("currentPage");
let slideNumbers = player.GetVar("slideNumbers");
slideNumbers = JSON.parse(slideNumbers);

const classes = document.querySelector('.slide').classList;
const slideId = classes[1];
if(slideNumbers.includes(slideId))
{
  player.SetVar("QuestionNumbervar", slideNumbers.indexOf(slideId) + 1);
}else{
  currentPage++;
  player.SetVar("currentPage", currentPage);
  slideNumbers.push(slideId);
  player.SetVar("slideNumbers", JSON.stringify(slideNumbers))
  player.SetVar("QuestionNumbervar", currentPage);
}
console.log(slideNumbers);
console.log(currentPage);

}

