rem: if ( i in Object.prototype ) { 
add: if ( i in Object.prototype || i in Array.prototype ) { 
context: function search_criteria_changed(id_row, counter, value2, value3){  var d = document;  var row = d.getElementById(id_row);  var dropdown = d.getElementById("select_search_field1_criteria"+counter);  var container =  d.getElementById("span_search_container"+counter);    if (row && dropdown && container) {    /*  New container */    var container_new = construct_element("span", "search_container", "span_search_container"+counter);        /* Misc */    if(criteria[dropdown.selectedIndex]["type"] == "text") {      var field1 = construct_element("span", "search_element", "span_search_container_dropdown1_"+counter);      var container_second = construct_element("span", "search_container_second", "span_search_container_second"+counter);                      /* Dropdown */      var dropdown = d.createElement("select");      dropdown.setAttribute("size", "1");      dropdown.setAttribute("id", "select_search_dropdown"+counter);      dropdown.setAttribute("name", "search["+counter+"][logic]");      dropdown.setAttribute("onchange", "javascript:search_criteria2_changed(\""+row.getAttribute("id")+"\", "+ counter+");");             for (var i=0; i<attribute["text"].length; i++) {        var option_text = d.createTextNode(attribute["text"][i]);        var option = d.createElement("option");        option.setAttribute("id", "option_search_dropdown"+counter);        option.setAttribute("name", "option_search_dropdown"+counter);        if (value2 == attribute["text"][i]) option.setAttribute("selected", "selected");        option.setAttribute("value", attribute["text"][i]);        option.appendChild(option_text);        dropdown.appendChild(option);      }    } else if(criteria[dropdown.selectedIndex]["type"] == "keyword") {      var field1 = d.createElement("span");      field1.setAttribute("id", "span_search_container_dropdown1_"+counter);      field1.setAttribute("class", "search_element");            var container_second = d.createElement("span");      container_second.setAttribute("id", "span_search_container_second"+counter);      container_second.setAttribute("class", "search_container_second");                      /* Dropdown */      var dropdown = d.createElement("select");      dropdown.setAttribute("size", "1");      dropdown.setAttribute("id", "select_search_dropdown"+counter);      dropdown.setAttribute("name", "search["+counter+"][logic]");      dropdown.setAttribute("onchange", "javascript:search_criteria2_changed(\""+row.getAttribute("id")+"\","+counter+");");             for (var i in attribute["keyword"]) {        if ( i in Object.prototype ) {          continue;        }        var option_text = d.createTextNode(attribute["keyword"][i]);        var option = d.createElement("option");        option.setAttribute("value", attribute["keyword"][i]);        if (value2 == attribute["keyword"][i]) option.setAttribute("selected", "selected");        option.appendChild(option_text);        dropdown.appendChild(option);      }    }        if(field1 && container_second) {      field1.appendChild(dropdown);      container_new.appendChild(field1);      container_new.appendChild(container_second);    }                   if(container_new && container && row)        /* replace old Container with new one */      row.replaceChild(container_new, container);    /* Virtual Call again */    search_criteria2_changed(row.getAttribute("id"), counter, value3);  }}
meta: 2782	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2782/a539800237b1036118c7180cfc1ae2ae655ac24e/search.js/buggy/pentabarf/public/javascripts/search.js