rem: self.field.onfocus = function() { if (self.hasDefaultText) { self.toggleDefaultText(false); }  self.hasFocus = true; self.updateQuery(); };  self.field.onblur = function() { self.hasFocus = false; self.updateQuery();  if (self.field.value == "") { self.toggleDefaultText(true); } };  attachOnTextareaChanged(self.field, function() { /* The new value won't be valid until the event finishes propagating */ setTimeout(function() { self.updateQuery() }, 0); }); 
add: var Event = YAHOO.util.Event; Event.on(this.field, "focus", this.onFocus, this, true); Event.on(this.field, "blur", this.onBlur, this, true); Event.on(this.field, "change", this.onChange, this, true); Event.on(this.field, "keypress", this.onKeyPress, this, true); 
context: CIASearch.init = function(url, fieldId, defaultText){    var self = this;    self.url = url;    this.fieldId = fieldId;    self.field = document.getElementById(fieldId);    self.defaultText = defaultText;    self.toggleDefaultText(true);    self.field.onfocus = function()    {	if (self.hasDefaultText) {	    self.toggleDefaultText(false);	}	self.hasFocus = true;	self.updateQuery();    };    self.field.onblur = function()    {	self.hasFocus = false;	self.updateQuery();	if (self.field.value == "") {	    self.toggleDefaultText(true);	}    };    attachOnTextareaChanged(self.field, function() {	/* The new value won't be valid until the event finishes propagating */	setTimeout(function() { self.updateQuery() }, 0);    });}
meta: 4793	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4793/aa829f401a9c6bbe4aa18637ad3b786a113fc495/search.js/buggy/cia/media-src/js/local/search.js