window.addEvent('domready',function(){var fld=document.getElementById('srch_fld');fld.value="Buscar";fld.style.color="#999999";});if(!SearchField)var SearchField={};SearchField.init=function(){if(document.getElementById){this.clearBtn=false;}}
SearchField.onChange=function(fldID,btnID){var fld=document.getElementById(fldID);var btn=document.getElementById(btnID);if(fld.value.length>0&&!this.clearBtn){btn.fldID=fldID;btn.onclick=this.clearBtnClick;this.clearBtn=true;fld.style.color="#444444";}else if(fld.value.length==0&&this.clearBtn){btn.style.background="white url('site/images/srch_r.gif') no-repeat top left";btn.onclick=null;this.clearBtn=false;}}
SearchField.clearFld=function(fldID,btnID){var fld=document.getElementById(fldID);fld.value="Buscar";fld.style.color="#999999";this.onChange(fldID,btnID);}
SearchField.onClick=function(fldID){var fld=document.getElementById(fldID);if(fld.value=="Buscar"){fld.value="";fld.style.color="#444444";}}
SearchField.onBlur=function(fldID){var fld=document.getElementById(fldID);if(fld.value.length==0){fld.value="Buscar";fld.style.color="#999999";}}
SearchField.clearBtnClick=function(){SearchField.clearFld(this.fldID,this.id);}
