}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.send.bind(this,arguments));return false;}return false;},send:function(D){if(!this.check(D)){return this; }this.running=true;var E=$type(D);if(E=="string"||E=="element"){D={data:D};}var A=this.options;D=$extend({data:A.data,url:A.url,method:A.method},D);var G=D.data,C=D.url,H=D.method; switch($type(G)){case"element":G=$(G).toQueryString();break;case"object":case"hash":G=Hash.toQueryString(G);}if(this.options.emulation&&["put","delete"].contains(H)){var B="_method="+H; G=(G)?B+"&"+G:B;H="post";}if(this.options.urlEncoded&&H=="post"){var F=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+F); }if(G&&H=="get"){C=C+(C.contains("?")?"&":"?")+G;G=null;}this.xhr.open(H.toUpperCase(),C,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this); this.headers.each(function(J,I){try{this.xhr.setRequestHeader(I,J);}catch(K){this.fireEvent("onException",[K,I,J]);}},this);this.fireEvent("onRequest"); this.xhr.send(G);if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.xhr.abort(); 
send: function(options){ if (!this.check(options)) return this; this.running = true;  var type = $type(options); if (type == 'string' || type == 'element') options = {data: options};  var old = this.options; options = $extend({data: old.data, url: old.url, method: old.method}, options); var data = options.data, url = options.url, method = options.method;  switch($type(data)){ case 'element': data = $(data).toQueryString(); break; case 'object': case 'hash': data = Hash.toQueryString(data); }  if (this.options.emulation && ['put', 'delete'].contains(method)){ var _method = '_method=' + method; data = (data) ? _method + '&' + data : _method; method = 'post'; }  if (this.options.urlEncoded && method == 'post'){ var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : ''; this.headers.set('Content-type', 'application/x-www-form-urlencoded' + encoding); }  if (data && method == 'get'){ url = url + (url.contains('?') ? '&' : '?') + data; data = null; }  this.xhr.open(method.toUpperCase(), url, this.options.async);  this.xhr.onreadystatechange = this.onStateChange.bind(this);  this.headers.each(function(value, key){ try{ this.xhr.setRequestHeader(key, value); } catch(e){ this.fireEvent('onException', [e, key, value]); } }, this);  this.fireEvent('onRequest'); this.xhr.send(data); if (!this.options.async) this.onStateChange(); return this; }, 
}switch(this.options.link){case"cancel":this.cancel();return true;case"chain":this.chain(this.send.bind(this,arguments));return false;}return false;},send:function(D){if(!this.check(D)){return this;}this.running=true;var E=$type(D);if(E=="string"||E=="element"){D={data:D};}var A=this.options;D=$extend({data:A.data,url:A.url,method:A.method},D);var G=D.data,C=D.url,H=D.method;switch($type(G)){case"element":G=$(G).toQueryString();break;case"object":case"hash":G=Hash.toQueryString(G);}if(this.options.emulation&&["put","delete"].contains(H)){var B="_method="+H;G=(G)?B+"&"+G:B;H="post";}if(this.options.urlEncoded&&H=="post"){var F=(this.options.encoding)?"; charset="+this.options.encoding:"";this.headers.set("Content-type","application/x-www-form-urlencoded"+F);}if(G&&H=="get"){C=C+(C.contains("?")?"&":"?")+G;G=null;}this.xhr.open(H.toUpperCase(),C,this.options.async);this.xhr.onreadystatechange=this.onStateChange.bind(this);this.headers.each(function(J,I){try{this.xhr.setRequestHeader(I,J);}catch(K){this.fireEvent("onException",[K,I,J]);}},this);this.fireEvent("onRequest");this.xhr.send(G);if(!this.options.async){this.onStateChange();}return this;},cancel:function(){if(!this.running){return this;}this.running=false;this.xhr.abort();
5086	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5086/7e4a07fc6f307ea369a4f7e7ce36e6336bcef4f7/mootools.js/clean/mootools.js