// Form behaviour: Sets and removes example text from text fields where necessary function setExampleText(fieldId, exampleText) { if ( document.getElementById(fieldId) ) { fieldObj = document.getElementById(fieldId); fieldObj.value = exampleText; fieldObj.onfocus = new Function("this.value=''; this.onfocus = ''"); //fieldObj.onblur = new Function("if (this.value=='') { this.value='"+exampleText+"'; }"); } }