function clearText(oElem, oEvent) { if ( oElem && typeof oElem.value != "undefined" && oElem.defaultValue && oEvent && oEvent.type ) { if ( oEvent.type == "focus" && oElem.value == oElem.defaultValue ) { oElem.value = ""; } else if ( oEvent.type == "blur" && oElem.value == "" ) { oElem.value = oElem.defaultValue; } } }