Here would be my quick solution to your problem :
<input type="text" name="userField" id="Username" value="Username" onclick="toggleField(this)" onblur="toggleField(this,1)" />
For the html, and then for the javascript :
function toggleField(el,isBlur){
origValue = el.value;
if(el.id == el.value){
el.value = '';
} else {
el.value = origValue;
}
if(el.value == '' && isBlur){
el.value = el.id;
}
}
Only trick to it is making the id of the field the same as the default value, in this case Username, or EMail, or whatever else you may need. Might not the most efficient way to do it depending on how many other fields you have to work with, but this is a quick dirty one that works.