// javascript library
// Brett Lischalk
// brett@brettlischalk.com



// Set onload functions
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent( function() { clearTextarea()} ) // Set onload function here


// Clear Textareas onfocus
function clearTextarea() {
textAreas = document.getElementsByTagName("textarea");
for (var i = 0; i < textAreas.length; i++) {
	clearFields = textAreas[i];
	clearFields.onfocus = function() {
	this.value = '';
	this.onfocus = null;
	}
}
}