// Created by ARDORA www.webardora.net
//ardoraTimeLine.js
var tl;var isFull=false;
function onLoad() {
$("#ButFull").click(function (){toggleFullScreen()})
Timeline.strings["es"] = {wikiLinkLabel:  "Enlace"};
   var eventSource = new Timeline.DefaultEventSource();
   var themeC = Timeline.ClassicTheme.create();
   themeC.event.bubble.width = 400;
   var d = Timeline.DateTime.parseIso8601DateTime("2020-01-01T00:00:00+01:00");
   var bandInfos = [
      Timeline.createBandInfo({
         eventSource:    eventSource,
         theme:	  themeC,
         date:           d,
         width:          "90%",
         layout:         "original",
         highlight:      true,
         intervalUnit:   Timeline.DateTime.YEAR,
         intervalPixels: 100
      }),
      Timeline.createBandInfo({
         eventSource:    eventSource,
         theme:	  themeC,
         date:           d,
         width:          "10%",
         layout:         "original",
         highlight:      true,
         intervalUnit:   Timeline.DateTime.DECADE,
         intervalPixels: 50
      })
   ];
   bandInfos[1].syncWith = 0;
   bandInfos[1].highlight = true;
   tl = Timeline.create(document.getElementById("tl"), bandInfos);
   tl.timeline_start = new Date(Date.UTC(1930,1,1));
   tl.timeline_stop = new Date(Date.UTC(2050,1,1));
   Timeline.loadXML("ardoraWorkFiles/lt_ueV2/lt_ueV2.xml", function(xml, url) { eventSource.loadXML(xml, url); });
}
var resizeTimerID = null;
function onResize() {
   if (resizeTimerID == null) {
      resizeTimerID = window.setTimeout(function() {
         resizeTimerID = null;
         tl.layout();
      }, 500);
   }
}
function toggleFullScreen() {if (!document.fullscreenElement && !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement) {if (document.documentElement.requestFullscreen) {document.documentElement.requestFullscreen();} else if (document.documentElement.msRequestFullscreen) {document.documentElement.msRequestFullscreen();} else if (document.documentElement.mozRequestFullScreen) {document.documentElement.mozRequestFullScreen();} else if (document.documentElement.webkitRequestFullscreen) {document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);}
}else{if (document.exitFullscreen) {document.exitFullscreen();} else if (document.msExitFullscreen) {document.msExitFullscreen();} else if (document.mozCancelFullScreen) {document.mozCancelFullScreen();} else if (document.webkitExitFullscreen) {document.webkitExitFullscreen();}}}
