title: Win Pivot App. Need to access some data from a section. Any ideas?
body: <p>I have a JavaScript Win Pivot Application</p>
  
  <p>Into the Hub I am retrieving some information:</p>
  
  <pre><code>function initPages(options) {
  for (var i = 0; i &lt; options.length ; i++) {
      var menuItem = options[i];
      menuItem.showBanner = (i == 0);
  
      definePages(options);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>and in a .Js file I have the definePages function created:</p>
  
  <p>functions.js:</p>
  
  <pre><code>function definePages(item) {
  var action = item[0];
  var animation = item[1];
  var scyfy = item[2];
  var localmovies = item[3];
  var clasic = item[4];
  var comedy = item[5];
  var biography = item[6];
  var drama = item[7];
  var kids = item[8];
  var musical = item[9];
  var romantic = item[10];
  var suspense = item[11];
  var horror = item[12];
  var art = item[13];
  var personalities = item[14];
  var history = item[15];
  var society = item[16];
  </code></pre>
  
  <p>}</p>
  
  <p>Now, in my section 1 I initialize the page by calling another function there:</p>
  
  <pre><code>ready: function (element, options) {
          // TODO: Inicializar la página aquí.
          options = options || {};
  
  
          initMovies();
      },
  
  function initMovies() {
      var element = document.getElementById("movieContainer");
      //var movies = ??????????????????????????
      //console.log(movies);
      //it keeps going
  }
  </code></pre>
  
  <p>I need to be able to retrive, in that var movies, the var action, from the functions.Js or, which is the same, the items[0]...</p>
  
  <p>However, if I call a function in functions.Js, which is defined in section1Page, it won´t work...</p>
  
  <p>I can call functions and pass data from anywhere to functions.Js, but not the other way around...</p>
  
  <p>Any ideas on what should I do?  Thanks!!!</p>