function makeUpdater(el, event, target_id)
{
    el.updateTarget = $(target_id);
    el[event] = function(){new Ajax.Updater(el.updateTarget,
                                            el.updateTarget.partialSource + "id=" + el.value,
                                            {
                                                evalScripts:true,
                                                onLoading:function(){
                                                    if(el.indicator) Element.show(el.indicator);
                                                },
                                                onComplete:function(){
                                                    if(el.indicator) Element.hide(el.indicator);
                                                    new Effect.Highlight(el.updateTarget);
                                                },
                                                onFailure:function(){
                                                    if(el.indicator) Element.hide(el.indicator);
                                                }
                                            }
                                           )
                          }
}

function setPartialSource(el, source)
{
  if(source.indexOf('?') != -1) source += '&';
  if(source.substr(-1,1)!='/') source += '/?';
  el.partialSource = source;
}

function updateWithFade(target, url, id) {
    if(!url.substr(-1,1) == '/') url += '/';
    new Ajax.Updater(target,
                     url + "?id=" + id,
                     {
                         evalScripts:true
                     }
                    )
}