function updatePage(aSelect,aParameter,anUrl)
{
   var url = anUrl;
   url += '&'+aParameter+"=";
   url += aSelect.options[aSelect.selectedIndex].value;
   window.location.href=url;
}

function setOptions(select,optionArray)
{
   if(optionArray!=null)
   {
      select.options.length = optionArray.length;
      for(var i=0; i<optionArray.length; i++)
      {
         select.options[i] = optionArray[i];
      }
   }else
   {
      select.options.length = 0;
   }
}

function updateOptions(select, selectArray, optionsArray)
{
   if(select.selectedIndex!=-1 && optionsArray[select.options[select.selectedIndex].id]!=null)
   {
      if(selectArray.length > 0)
      {
         setOptions(selectArray[0], optionsArray[select.options[select.selectedIndex].id]);

         for(var i=0; i<selectArray.length-1; i++)
         {
            if(selectArray[i].selectedIndex>-1 && optionsArray[selectArray[i].options[selectArray[i].selectedIndex].id]!=null)
            {
               setOptions(selectArray[i+1], optionsArray[selectArray[i].options[selectArray[i].selectedIndex].id]);
            }else
            {
               setOptions(selectArray[i+1], null);
            }
         }
      }
   }else if(selectArray.length > 0)
   {
      setOptions(selectArray[0], null);
   }
}

<!-- Create an option with a given text, value and id -->
function createOption(text, value, id)
{
   var option = new Option(text,value);
   option.id = id;
   return option;
}
