
var arrItemsProCine = new Array(); 
var arrItemsProIdCine = new Array(); 
var arrItemsGrpoCine = new Array();

function selectChangeCine(control, controlToPopulate, ItemArray, ItemArray2, GroupArray) {
  var myEle2 ;
  var x2 ;
  // Empty the second drop down box of any choices
  for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
    // ADD Default Choice - in case there are no values
  myEle2=document.createElement("option");
  theText=document.createTextNode("--Todos--");
  myEle2.appendChild(theText);
  myEle2.setAttribute("value","0");
  controlToPopulate.appendChild(myEle2);
  // Now loop through the array of individual items
  // Any containing the same child id are added to
  // the second dropdown box
  for ( x2 = 0 ; x2 < ItemArray.length  ; x2++ ) {
    if ( GroupArray[x2] == control.value ) {
      myEle2 = document.createElement("option") ;
      myEle2.setAttribute("value",ItemArray2[x2]);
      var txt = document.createTextNode(ItemArray[x2]);
      myEle2.appendChild(txt)
      controlToPopulate.appendChild(myEle2)
    }
  }
}