window.InitUserScripts = function()
{
var player = GetPlayer();
var object = player.object;
var once = player.once;
var addToTimeline = player.addToTimeline;
var setVar = player.SetVar;
var getVar = player.GetVar;
var update = player.update;
var pointerX = player.pointerX;
var pointerY = player.pointerY;
var showPointer = player.showPointer;
var hidePointer = player.hidePointer;
var slideWidth = player.slideWidth;
var slideHeight = player.slideHeight;
window.Script1 = function()
{
  (function(){
  var fsBtn = document.createElement("button");
  fsBtn.id = "fullscreenToggle";
  fsBtn.innerHTML = "⛶"; // Μπορεί να μπει και 'Fullscreen'
  fsBtn.style.position = "fixed";
  fsBtn.style.top = "10px";
  fsBtn.style.right = "10px";
  fsBtn.style.zIndex = "9999";
  fsBtn.style.padding = "10px 14px";
  fsBtn.style.background = "white";
  fsBtn.style.border = "1px solid #ccc";
  fsBtn.style.borderRadius = "5px";
  fsBtn.style.cursor = "pointer";
  fsBtn.style.fontSize = "18px";
  fsBtn.style.boxShadow = "0 2px 6px rgba(0,0,0,0.2)";
  fsBtn.style.opacity = "0.9";

  // Αποφυγή διπλού κουμπιού αν αλλάξει slide
  if (!document.getElementById("fullscreenToggle")) {
    document.body.appendChild(fsBtn);
  }

  fsBtn.onclick = function() {
    if (!document.fullscreenElement &&
        !document.webkitFullscreenElement &&
        !document.mozFullScreenElement &&
        !document.msFullscreenElement) {
      // Fullscreen On
      var docElm = document.documentElement;
      if (docElm.requestFullscreen) {
        docElm.requestFullscreen();
      } else if (docElm.mozRequestFullScreen) {
        docElm.mozRequestFullScreen();
      } else if (docElm.webkitRequestFullscreen) {
        docElm.webkitRequestFullscreen();
      } else if (docElm.msRequestFullscreen) {
        docElm.msRequestFullscreen();
      }
      fsBtn.innerHTML = "⨉"; // Exit icon
    } else {
      // Fullscreen Off
      if (document.exitFullscreen) {
        document.exitFullscreen();
      } else if (document.mozCancelFullScreen) {
        document.mozCancelFullScreen();
      } else if (document.webkitExitFullscreen) {
        document.webkitExitFullscreen();
      } else if (document.msExitFullscreen) {
        document.msExitFullscreen();
      }
      fsBtn.innerHTML = "⛶";
    }
  };
})();

}

window.Script2 = function()
{
  var player = GetPlayer();

var plaisio1 = player.GetVar("Enwsi");
var plaisio2 = player.GetVar("Typos");
var plaisio3 = player.GetVar("Maza");
var plaisio4 = player.GetVar("Mol");
var plaisio5 = player.GetVar("Moria");
var plaisio6 = player.GetVar("Atoma_H");
var plaisio7 = player.GetVar("Atoma_O");

var correct1 = player.GetVar("js_Enwsi");
var correct2 = player.GetVar("js_Typos");
var correct3 = player.GetVar("js_Maza");
var correct4 = player.GetVar("js_Mol");
var correct5 = player.GetVar("js_Moria");
var correct6 = player.GetVar("js_Atoma_H");
var correct7 = player.GetVar("js_Atoma_O");

if(plaisio6 == "") {
plaisio6 = "0";
}
if(plaisio7 == "") {
plaisio7 = "0";
}

const plaisio3b = plaisio3.toString().replace('.', ',');
const plaisio4b = plaisio4.toString().replace('.', ',');
const plaisio5b = plaisio5.toString().replace('.', ',');
const plaisio6b = plaisio6.toString().replace('.', ',');
const plaisio7b = plaisio7.toString().replace('.', ',');


if(plaisio1 == correct1 && plaisio2 == correct2 && plaisio3b == correct3 && plaisio4b == correct4 && plaisio5b == correct5 && plaisio6b == correct6 && plaisio7b == correct7){
	setVar("epityxia", 1);
}else{
	setVar("epityxia", 0);
}
}

window.Script3 = function()
{
  let vEnwsi = new Array(14);
vEnwsi[1] = "ΥΔΡΟΓΟΝΟ";
vEnwsi[2] = "ΟΞΥΓΟΝΟ";
vEnwsi[3] = "ΜΕΘΑΝΙΟ";
vEnwsi[4] = "ΑΙΘΑΝΟΛΗ";
vEnwsi[5] = "ΑΙΘΑΝΙΚΟ ΟΞΥ";
vEnwsi[6] = "ΘΕΙΙΚΟ ΟΞΥ";
vEnwsi[7] = "ΦΩΣΦΟΡΙΚΟ ΟΞΥ";
vEnwsi[8] = "ΒΡΩΜΙΔΙΟ ΤΟΥ ΑΣΒΕΣΤΙΟΥ";
vEnwsi[9] = "ΝΙΤΡΙΚΟ ΝΑΤΡΙΟ";
vEnwsi[10] = "ΑΝΘΡΑΚΙΚΟ ΚΑΛΙΟ";
vEnwsi[11] = "ΑΝΘΡΑΚΙΚΟ ΑΣΒΕΣΤΙΟ";
vEnwsi[12] = "ΥΔΡΟΞΕΙΔΙΟ ΤΟΥ ΚΑΛΙΟΥ";
vEnwsi[13] = "ΤΕΤΡΟΞΕΙΔΙΟ ΤΟΥ ΑΖΩΤΟΥ";
vEnwsi[14] = "ΔΙΟΞΕΙΔΙΟ ΤΟΥ ΑΝΘΡΑΚΑ";

let vTypos = new Array(14);
vTypos[1] = "Η₂";
vTypos[2] = "Ο₂";
vTypos[3] = "CH₄";
vTypos[4] = "CH₃CH₂OH";
vTypos[5] = "CH₃COOH";
vTypos[6] = "H₂SO₄";
vTypos[7] = "H₃PO₄";
vTypos[8] = "CaBr₂";
vTypos[9] = "NaNO₃";
vTypos[10] = "K₂CO₃";
vTypos[11] = "CaCO₃";
vTypos[12] = "KOH";
vTypos[13] = "N₂O₄";
vTypos[14] = "CO₂";

let vMaza = new Array(14);
vMaza[1] = "4";
vMaza[2] = "16";
vMaza[3] = "1,6";
vMaza[4] = "9,2";
vMaza[5] = "18";
vMaza[6] = "0,98";
vMaza[7] = "49";
vMaza[8] = "40";
vMaza[9] = "85";
vMaza[10] = "13,8";
vMaza[11] = "30";
vMaza[12] = "11,2";
vMaza[13] = "9,2";
vMaza[14] = "88";

let vMol = new Array(14);
vMol[1] = "2";
vMol[2] = "0,5";
vMol[3] = "0,1";
vMol[4] = "0,2";
vMol[5] = "0,3";
vMol[6] = "0,01";
vMol[7] = "0,5";
vMol[8] = "0,2";
vMol[9] = "1";
vMol[10] = "0,1";
vMol[11] = "0,3";
vMol[12] = "0,2";
vMol[13] = "0,1";
vMol[14] = "2";

let vMoria = new Array(14);
vMoria[1] = "2";
vMoria[2] = "0,5";
vMoria[3] = "0,1";
vMoria[4] = "0,2";
vMoria[5] = "0,3";
vMoria[6] = "0,01";
vMoria[7] = "0,5";
vMoria[8] = "0,2";
vMoria[9] = "1";
vMoria[10] = "0,1";
vMoria[11] = "0,3";
vMoria[12] = "0,2";
vMoria[13] = "0,1";
vMoria[14] = "2";

let vAtomaH = new Array(14);
vAtomaH[1] = "4";
vAtomaH[2] = "0";
vAtomaH[3] = "0,4";
vAtomaH[4] = "1,2";
vAtomaH[5] = "1,2";
vAtomaH[6] = "0,02";
vAtomaH[7] = "1,5";
vAtomaH[8] = "0";
vAtomaH[9] = "0";
vAtomaH[10] = "0";
vAtomaH[11] = "0";
vAtomaH[12] = "0,2";
vAtomaH[13] = "0";
vAtomaH[14] = "0";

let vAtomaO = new Array(14);
vAtomaO[1] = "0";
vAtomaO[2] = "1";
vAtomaO[3] = "0";
vAtomaO[4] = "0,2";
vAtomaO[5] = "0,6";
vAtomaO[6] = "0,04";
vAtomaO[7] = "2";
vAtomaO[8] = "0";
vAtomaO[9] = "3";
vAtomaO[10] = "0,3";
vAtomaO[11] = "0,9";
vAtomaO[12] = "0,2";
vAtomaO[13] = "0,4";
vAtomaO[14] = "4";



var player = GetPlayer();

var myCase = player.GetVar("Case");

if (myCase != 0){
    player.SetVar("js_Enwsi", vEnwsi[myCase]);
	player.SetVar("js_Typos", vTypos[myCase]);
	player.SetVar("js_Maza", vMaza[myCase]);
	player.SetVar("js_Mol", vMol[myCase]);
	player.SetVar("js_Moria", vMoria[myCase]);
	player.SetVar("js_Atoma_H", vAtomaH[myCase]);
	player.SetVar("js_Atoma_O", vAtomaO[myCase]);
}

}

};
