var QuickFinder={attachBehavior:function(){$$("input").each(function(c){var b=c.readAttribute("for");if(!b){return}if(b.indexOf(",")!=-1){c.filterTargets=[];var a=b.split(",");for(var f=0;f<a.length;++f){var e=$(a[f]);if(e){c.filterTargets.push(e)}}if(!c.filterTargets.length){return}}else{c.filterTargets=[$(b)];if(!c.filterTargets[0]){return}}filterEmpty=c.readAttribute("empty");if(filterEmpty){c.filterEmpty=$(filterEmpty)}c.observe("keyup",QuickFinder.onKeyUp);for(var f=0,d=c.filterTargets.length;f<d;f++){c.filterTargets[f].immediateDescendants().each(function(g){var h=g.filterText||g.readAttribute("filterText");if(!h){g.filterText=g.innerHTML.stripTags()}g.filterText=g.filterText.toLowerCase()})}QuickFinder.filter(c)})},onKeyUp:function(a){input=a.element();if(input.filterTargets){QuickFinder.filter(input)}},filter:function(b){var g=b.value.toLowerCase();var a=0;for(var d=0,c=b.filterTargets.length;d<c;d++){b.filterTargets[d].immediateDescendants().each(function(e){var h=e.filterText;if(h.indexOf(g)==-1){e.addClassName("QuickFinderNoMatch")}else{++a;e.removeClassName("QuickFinderNoMatch")}})}try{if(b.filterEmpty){(a==0)?b.filterEmpty.show():b.filterEmpty.hide()}}catch(f){}}};document.observe("dom:loaded",QuickFinder.attachBehavior);