function TextInputPrefill(a){this.args=a;this.init(a)}TextInputPrefill.prototype={pfRE:/\s?\bprefilled\b/gi,hasPrefill:function(a){this.pfRE.test("");return(a.className&&this.pfRE.test(a.className))},init:function(b){var c=$(b.id);if(!c.value||(c.value==b.prefill)){c.value=b.prefill;c.className+=" prefilled";var a=this;Event.observe(c,"focus",function(d){return a.unfill(b)})}},unfill:function(a){var b=$(a.id);if(this.hasPrefill(b)){b.value="";b.className=b.className.replace(this.pfRE,"")}return false}};if(Tapestry.Initializer&&!Tapestry.Initializer.newTextInputPrefill){Tapestry.Initializer.newTextInputPrefill=function(a){return new TextInputPrefill(a)}}else{alert("TextInputPrefill is already initialized on T5 or now T5 Initializer can be found (perhaps you're using an incompatible version of T5?)")}Event.observe(window,"load",function(a){(document.documentElement||document.body).className+=" TextInputPrefill_INITIALISED"});
