/*
    {**************************************************************}
    {                                                              }
    {     SiteFestResults - Funções utilitárias                    }
    {     JS - Java Script                                         }
    {                                                              }
    {    Copyright (C) 2006-2010 Escola Portátil de Música         }
    {                                                              }
    {**************************************************************}
*/	
<!--

function FillFestCursosList() {
var objCities = document.getElementById("FESTIVAL_CIDADES");
var City = parseInt(objCities[objCities.selectedIndex].value);
   SetFestListCourses(City);
   FillFestList(City);
}
//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
function FillFestList(City) {
var objCursos = document.getElementById("FESTIVAL_OFICINAS");
   FlushFestCursosList(false);
   for (var i=0;i<ListFestCourses.length;i++) {
        oOption = document.createElement("OPTION");
        oOption.text = "• " + ListFestCourses[i];
        oOption.value = ListFestCourses[i];
        oOption.style.color = "#666666";
        objCursos.options.add(oOption);
   }
   objCursos.focus();
}
//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
function FlushFestCursosList(DisableList) {
var objCursos = document.getElementById("FESTIVAL_OFICINAS");
   while (objCursos.options.length!=0) { objCursos.remove(0); }
   oOption = document.createElement("OPTION");
   oOption.text = "----------- Todas as oficinas -----------";
   oOption.value = "-1";
   objCursos.options.add(oOption);
   objCursos.disabled = DisableList;
}
//-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
function SetFocus(City, Course) {
var objCities = document.getElementById("FESTIVAL_CIDADES");
var objCursos = document.getElementById("FESTIVAL_OFICINAS");
   for (var i=0;i<objCities.length;i++) {
        if (objCities[i].value == City) {
            objCities.selectedIndex = i;
            SetFestListCourses(City);
            FillFestList(City);
            break;		
		}
   }
   for (var i=0;i<objCursos.length;i++) {
        if (objCursos[i].value == Course) {
            objCursos.selectedIndex = i;
            break;
        }		   
   }
}

-->
