var WREvent = {
  e: null,
  page : null,
  link: null,
  otherOptions: null,
  
  observe: function (event){    
    options = $A(arguments);
    e = options[0];
    page = options[1];
    link = options[2];    
    otherOptions = options[3];
    
      WREvent.timeout();
    
  },
  timeout: function(){
      clearTimeout(Event.element(e).timer);
      Event.element(e).timer = setTimeout('WREvent.doEvent()' ,400);     
  },
                
  doEvent: function (){
    ajaxRequest(page + 'FormBean', $H({'sourcePage': page, 'isForm': true, 'pressedLink' : 'button#' + link}).merge(otherOptions))
  }
  
  }

function RadioRequest(page,link,field,lastValue,otherOptions){
	ajaxRequest(page + 'FormBean', $H({'sourcePage': page, 'isForm': true, 'pressedLink' : 'button#' + link}).merge(otherOptions))
}

function CheckboxRequest(page,link,field,lastValue,otherOptions){
    ajaxRequest(page + 'FormBean', $H({'sourcePage': page, 'isForm': true, 'pressedLink' : 'button#' + link}).merge(otherOptions))
}