var ajax = new Array();function getList(sel,name){  var   Code=sel.options[sel.selectedIndex].value;  //var Code=sel.selectedIndex;  document.getElementById(name).options.length = 0;  // Empty city select box   var index = ajax.length;      ajax[index] = new sack();      ajax[index].requestFile = 'getListAjax.php?'+name+'='+Code;  // Specifying which file to get      //alert(ajax[index].requestFile);       ajax[index].onCompletion = function(){ createList(index, name);};  // Specify function that will be executed after file has been found      ajax[index].runAJAX();}function createList(index,name){      var obj = document.getElementById(name);      eval(ajax[index].response);   // Executing the response from Ajax as Javascript code   }function getMonthList(sel){   var monthCode = sel.options[sel.selectedIndex].value;   monthCode = sel.selectedIndex;   document.getElementById('dhtmlceil_month').options.length = 0;  // Empty city select box   var index = ajax.length;      ajax[index] = new sack();      ajax[index].requestFile = 'getmoths.php?monthcode='+monthCode;  // Specifying which file to get      ajax[index].onCompletion = function(){createMonths(index); };  // Specify function that will be executed after file has been found      ajax[index].runAJAX();     // Execute AJAX function}function createMonths(index){      var obj = document.getElementById('dhtmlceil_month');      eval(ajax[index].response);   // Executing the response from Ajax as Javascript code   }function getQuestList(sel){   var monthCeil = sel.options[sel.selectedIndex].value;   monthCeil = sel.selectedIndex;   document.getElementById('dhtmlceil_quest').options.length = 0;  // Empty city select box   var index = ajax.length;       ajax[index] = new sack();       ajax[index].requestFile = 'getquests.php?ceilcode='+monthCeil;  // Specifying which file to get       ajax[index].onCompletion = function(){ createQuests(index); };  // Specify function that will be executed after file has been found       ajax[index].runAJAX();     // Execute AJAX function      }function createQuests(index){      var obj = document.getElementById('dhtmlceil_quest');      eval(ajax[index].response);   // Executing the response from Ajax as Javascript code   }function getTimeList(sel){   var monthCeil = sel.options[sel.selectedIndex].value;   monthCeil=sel.options[sel.selectedIndex] .text   //monthCeil = sel.selectedIndex;   document.getElementById('dhtml_time').options.length = 0;  // Empty city select box   var index = ajax.length;              ajax[index] = new sack();	   ajax[index].requestFile = 'gettimelist.php?time='+monthCeil;  // Specifying which file to get       ajax[index].onCompletion = function(){ createTimeList(index); };  // Specify function that will be executed after file has been nd       ajax[index].runAJAX();     // Execute AJAX function      }function createTimeList(index){      var obj = document.getElementById('dhtml_time');      eval(ajax[index].response);   // Executing the response from Ajax as Javascript code   }/*function getTownList(sel){  var monthCeil = sel.options[sel.selectedIndex].value;   monthCeil = sel.selectedIndex;   document.getElementById('dhtmlfilial_offices').options.length = 0;  // Empty city select box   var index = ajax.length;       ajax[index] = new sack();       ajax[index].requestFile = 'getoffices.php?filial='+monthCeil;  // Specifying which file to get       ajax[index].onCompletion = function(){ createOffices(index); };  // Specify function that will be executed after file has been found       ajax[index].runAJAX();     // Execute AJAX function}/*function getOfficeList(sel){   var monthCeil = sel.options[sel.selectedIndex].value;   monthCeil = sel.selectedIndex;   document.getElementById('dhtmlfilial_offices').options.length = 0;  // Empty city select box   var index = ajax.length;       ajax[index] = new sack();       ajax[index].requestFile = 'getoffices.php?filial='+monthCeil;  // Specifying which file to get       ajax[index].onCompletion = function(){ createOffices(index); };  // Specify function that will be executed after file has been found       ajax[index].runAJAX();     // Execute AJAX function}function createOffices(index) {   var obj = document.getElementById('dhtmlfilial_offices');   eval(ajax[index].response);   // Executing the response from Ajax as Javascript code   }*/
