// Created by ARDORA www.webardora.net
//ardoraTimeLine.js
var tl;var isFull=false;
function onLoad() {
$("#ButFull").click(function (){toggleFullScreen()})
Timeline.strings["gz"] = {wikiLinkLabel:  "Ligazón"};
   var eventSource = new Timeline.DefaultEventSource();
   var themeC = Timeline.ClassicTheme.create();
   themeC.event.bubble.width = 400;
   var d = Timeline.DateTime.parseIso8601DateTime("0950-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(475,1,1));
   tl.timeline_stop = new Date(Date.UTC(1500,1,1));
   Timeline.loadXML("ardoraWorkFiles/lineaTempo/lineaTempo.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();}}}
