function ExecuteScript(strId)
{
  switch (strId)
  {
      case "6W8RROmWFRg":
        Script1();
        break;
      case "6Ubfe3FPzoc":
        Script2();
        break;
      case "6ItE0jFRuph":
        Script3();
        break;
      case "6OVuWuTq3AM":
        Script4();
        break;
  }
}

function Script1()
{
  const filename = "Αεροδρόμιο";

var player = GetPlayer();
const textEntry = player.GetVar("TextEntry");
  var element = document.createElement('a');
  element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(textEntry));
  element.setAttribute('download', filename);

  element.style.display = 'none';
  document.body.appendChild(element);

  element.click();

  document.body.removeChild(element);

}

function Script2()
{
  const filename = "Εγνατία οδός";

var player = GetPlayer();
const textEntry = player.GetVar("TextEntry2");
  var element = document.createElement('a');
  element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(textEntry));
  element.setAttribute('download', filename);

  element.style.display = 'none';
  document.body.appendChild(element);

  element.click();

  document.body.removeChild(element);

}

function Script3()
{
  const filename = "Γέφυρα Ρίο-Αντίρριο";

var player = GetPlayer();
const textEntry = player.GetVar("TextEntry3");
  var element = document.createElement('a');
  element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(textEntry));
  element.setAttribute('download', filename);

  element.style.display = 'none';
  document.body.appendChild(element);

  element.click();

  document.body.removeChild(element);

}

function Script4()
{
  const filename = "Μετρό Αθήνας";

var player = GetPlayer();
const textEntry = player.GetVar("TextEntry4");
  var element = document.createElement('a');
  element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(textEntry));
  element.setAttribute('download', filename);

  element.style.display = 'none';
  document.body.appendChild(element);

  element.click();

  document.body.removeChild(element);

}

