            if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){ dojo.raise("Attempted to encode a non-form element."); } if(!formFilter) { formFilter = dojo.io.formFilter; } var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; var values = []; 
            if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){ dojo.raise("Attempted to encode a non-form element."); } if(!formFilter) { formFilter = dojo.io.formFilter; } var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii; var values = []; 
dojo.io.encodeForm = function(/*DOMNode*/formNode, /*String?*/encoding, /*Function?*/formFilter){  //summary: Converts the names and values of form elements into an URL-encoded  //string (name=value&name=value...).  //formNode: DOMNode  //encoding: String?  //    The encoding to use for the values. Specify a string that starts with  //    "utf" (for instance, "utf8"), to use encodeURIComponent() as the encoding  //    function. Otherwise, dojo.string.encodeAscii will be used.  //formFilter: Function?  //  A function used to filter out form elements. The element node will be passed  //  to the formFilter function, and a boolean result is expected (true indicating  //  indicating that the element should have its name/value included in the output).  //  If no formFilter is specified, then dojo.io.formFilter() will be used.  if((!formNode)||(!formNode.tagName)||(!formNode.tagName.toLowerCase() == "form")){    dojo.raise("Attempted to encode a non-form element.");  }  if(!formFilter) { formFilter = dojo.io.formFilter; }  var enc = /utf/i.test(encoding||"") ? encodeURIComponent : dojo.string.encodeAscii;  var values = [];  for(var i = 0; i < formNode.elements.length; i++){    var elm = formNode.elements[i];    if(!elm || elm.tagName.toLowerCase() == "fieldset" || !formFilter(elm)) { continue; }    var name = enc(elm.name);    var type = elm.type.toLowerCase();    if(type == "select-multiple"){      for(var j = 0; j < elm.options.length; j++){        if(elm.options[j].selected) {          values.push(name + "=" + enc(elm.options[j].value));        }      }    }else if(dojo.lang.inArray(["radio", "checkbox"], type)){      if(elm.checked){        values.push(name + "=" + enc(elm.value));      }    }else{      values.push(name + "=" + enc(elm.value));    }  }  // now collect input type="image", which doesn't show up in the elements array  var inputs = formNode.getElementsByTagName("input");  for(var i = 0; i < inputs.length; i++) {    var input = inputs[i];    if(input.type.toLowerCase() == "image" && input.form == formNode      && formFilter(input)) {      var name = enc(input.name);      values.push(name + "=" + enc(input.value));      values.push(name + ".x=0");      values.push(name + ".y=0");    }  }  return values.join("&") + "&"; //String}
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/65ae7e8768a77997b7894e274bc242069a1cb027/struts_dojo.js.uncompressed.js/clean/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js.uncompressed.js