/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function $RF(el, radioGroup) {
    if($(el).type && $(el).type.toLowerCase() == 'radio')
	{
        var radioGroup = $(el).name;
        var el = $(el).form;
    } else if ($(el).tagName.toLowerCase() != 'form') {
        return false;
    }

    var checked = $(el).getInputs('radio', radioGroup).find(
        function(re) {return re.checked;}
    );
    return (checked) ? $F(checked) : null;
}

Effect.BlindLeft = function(element) {
  element = $(element);
  element.makeClipping();
  return new Effect.Scale(element, 0,
    Object.extend({ scaleContent: false,
      scaleY: false,
      scaleMode: 'box',
      scaleContent: false,
      restoreAfterFinish: true,
      afterSetup: function(effect) {
        effect.element.makeClipping().setStyle({
          height: effect.dims[0] + 'px'
        }).show();
      },
      afterFinishInternal: function(effect) {
        effect.element.hide().undoClipping();
      }
    }, arguments[1] || { })
  );
};

Ajax.Request.prototype.abort = function()
    {

        // prevent and state change callbacks from being issued
        this.transport.onreadystatechange = Prototype.emptyFunction;
        // abort the XHR
        this.transport.abort();
        // update the request counter
        Ajax.activeRequestCount--;
    };
