#endif 
function AddKeywordForSearchField(){  var node = document.popupNode;  var docURI = makeURI(node.ownerDocument.URL,                       node.ownerDocument.characterSet);  var formURI = makeURI(node.form.getAttribute("action"),                        node.ownerDocument.characterSet,                        docURI);  var spec = formURI.spec;  var isURLEncoded =                (node.form.method.toUpperCase() == "POST"                && (node.form.enctype == "application/x-www-form-urlencoded" ||                    node.form.enctype == ""));  var el, type;  var formData = [];  for (var i=0; i < node.form.elements.length; i++) {    el = node.form.elements[i];    if (!el.type) // happens with fieldsets      continue;    if (el == node) {      formData.push((isURLEncoded) ? escapeNameValuePair(el.name, "%s", true) :                                     // Don't escape "%s", just append                                     escapeNameValuePair(el.name, "", false) + "%s");      continue;    }    type = el.type.toLowerCase();        if ((type == "text" || type == "hidden" || type == "textarea") ||        ((type == "checkbox" || type == "radio") && el.checked)) {      formData.push(escapeNameValuePair(el.name, el.value, isURLEncoded));    } else if (el instanceof HTMLSelectElement && el.selectedIndex >= 0) {      for (var j=0; j < el.options.length; j++) {        if (el.options[j].selected)          formData.push(escapeNameValuePair(el.name, el.options[j].value,                                            isURLEncoded));      }    }  }  var postData;  if (isURLEncoded)    postData = formData.join("&");  else    spec += "?" + formData.join("&");#ifndef MOZ_PLACES_BOOKMARKS  var dialogArgs = {    name: "",    url: spec,    charset: node.ownerDocument.characterSet,    bWebPanel: false,    keyword: "",    bNeedKeyword: true,    postData: postData,    description: BookmarksUtils.getDescriptionFromDocument(node.ownerDocument)  }  openDialog("chrome://browser/content/bookmarks/addBookmark2.xul", "",             BROWSER_ADD_BM_FEATURES, dialogArgs);#else  var description = PlacesUtils.getDescriptionFromDocument(node.ownerDocument);  PlacesUtils.showMinimalAddBookmarkUI(makeURI(spec), "", description, null,                                       null, null, "", postData);#endif}
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/8854db12e8b678dbe0bcac27fd9d1d2099820a39/browser.js/buggy/browser/base/content/browser.js