if (dwr.engine._allowGetForSafariButMakeForgeryEasier == "true") { var version = navigator.userAgent.substring(indexSafari + 7); if (parseInt(version, 10) < 400) batch.httpMethod = "GET"; } else { dwr.engine._handleWarning(batch, { name:"dwr.engine.oldSafari", message:"Safari GET support disabled. See http: 
var version = navigator.userAgent.substring(indexSafari + 7); if (parseInt(version, 10) < 400) { if (dwr.engine._allowGetForSafariButMakeForgeryEasier == "true") batch.httpMethod = "GET"; else dwr.engine._handleWarning(batch, { name:"dwr.engine.oldSafari", message:"Safari GET support disabled. See getahead.org/dwr/server/servlet and allowGetForSafariButMakeForgeryEasier." }); 
dwr.engine._sendData = function(batch) {  batch.map.batchId = dwr.engine._nextBatchId++;  dwr.engine._batches[batch.map.batchId] = batch;  dwr.engine._batchesLength++;  batch.completed = false;  for (var i = 0; i < batch.preHooks.length; i++) {    batch.preHooks[i]();  }  batch.preHooks = null;  // Set a timeout  if (batch.timeout && batch.timeout != 0) {    batch.interval = setInterval(function() { dwr.engine._abortRequest(batch); }, batch.timeout);  }  // Get setup for XMLHttpRequest if possible  if (batch.rpcType == dwr.engine.XMLHttpRequest) {    if (window.XMLHttpRequest) {      batch.req = new XMLHttpRequest();    }    // IE5 for the mac claims to support window.ActiveXObject, but throws an error when it's used    else if (window.ActiveXObject && !(navigator.userAgent.indexOf("Mac") >= 0 && navigator.userAgent.indexOf("MSIE") >= 0)) {      batch.req = dwr.engine._newActiveXObject(dwr.engine._XMLHTTP);    }  }  var prop, request;  if (batch.req) {    // Proceed using XMLHttpRequest    if (batch.async) {      batch.req.onreadystatechange = function() { dwr.engine._stateChange(batch); };    }    // If we're polling, record this for monitoring    if (batch.isPoll) {      dwr.engine._pollReq = batch.req;      // In IE XHR is an ActiveX control so you can't augment it like this      // however batch.isPoll uses IFrame on IE so were safe here      batch.req.batch = batch;    }    // Workaround for Safari 1.x POST bug    var indexSafari = navigator.userAgent.indexOf("Safari/");    if (indexSafari >= 0) {      if (dwr.engine._allowGetForSafariButMakeForgeryEasier == "true") {        var version = navigator.userAgent.substring(indexSafari + 7);        if (parseInt(version, 10) < 400) batch.httpMethod = "GET";      }      else {        dwr.engine._handleWarning(batch, { name:"dwr.engine.oldSafari", message:"Safari GET support disabled. See http://getahead.ltd.uk/dwr/server/servlet and allowGetForSafariButMakeForgeryEasier." });      }    }    batch.mode = batch.isPoll ? dwr.engine._ModePlainPoll : dwr.engine._ModePlainCall;    request = dwr.engine._constructRequest(batch);    try {      batch.req.open(batch.httpMethod, request.url, batch.async);      try {        for (prop in batch.headers) {          var value = batch.headers[prop];          if (typeof value == "string") batch.req.setRequestHeader(prop, value);        }        if (!batch.headers["Content-Type"]) batch.req.setRequestHeader("Content-Type", "text/plain");      }      catch (ex) {        dwr.engine._handleWarning(batch, ex);      }      batch.req.send(request.body);      if (!batch.async) dwr.engine._stateChange(batch);    }    catch (ex) {      dwr.engine._handleError(batch, ex);    }  }  else if (batch.rpcType != dwr.engine.ScriptTag) {    // Proceed using iframe    var idname = batch.isPoll ? "dwr-if-poll-" + batch.map.batchId : "dwr-if-" + batch.map["c0-id"];    batch.div = document.createElement("div");    batch.div.innerHTML = "<iframe src='javascript:void(0)' frameborder='0' style='width:0px;height:0px;border:0;' id='" + idname + "' name='" + idname + "'></iframe>";    document.body.appendChild(batch.div);    batch.iframe = document.getElementById(idname);    batch.iframe.batch = batch;    batch.mode = batch.isPoll ? dwr.engine._ModeHtmlPoll : dwr.engine._ModeHtmlCall;    if (batch.isPoll) dwr.engine._outstandingIFrames.push(batch.iframe);    request = dwr.engine._constructRequest(batch);    if (batch.httpMethod == "GET") {      batch.iframe.setAttribute("src", request.url);      // document.body.appendChild(batch.iframe);    }    else {      batch.form = document.createElement("form");      batch.form.setAttribute("id", "dwr-form");      batch.form.setAttribute("action", request.url);      batch.form.setAttribute("target", idname);      batch.form.target = idname;      batch.form.setAttribute("method", batch.httpMethod);      for (prop in batch.map) {        var value = batch.map[prop];        if (typeof value != "function") {          var formInput = document.createElement("input");          formInput.setAttribute("type", "hidden");          formInput.setAttribute("name", prop);          formInput.setAttribute("value", value);          batch.form.appendChild(formInput);        }      }      document.body.appendChild(batch.form);      batch.form.submit();    }  }  else {    batch.httpMethod = "GET"; // There's no such thing as ScriptTag using POST    batch.mode = batch.isPoll ? dwr.engine._ModePlainPoll : dwr.engine._ModePlainCall;    request = dwr.engine._constructRequest(batch);    batch.script = document.createElement("script");    batch.script.id = "dwr-st-" + batch.map["c0-id"];    batch.script.src = request.url;    document.body.appendChild(batch.script);  }};
266	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/266/f3929116321fa33d34a2afdcd23322d83ebe0cce/engine.js/clean/java/org/directwebremoting/engine.js