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 = "⛶";
    }
  };
})();

}

};
