
/* store all textareas which had focus once in an array */
var noFocus = new Array();

/* delete the text of a certain textarea when getting the focus only the first time */
function onFirstFocus(textarea)
{
	//alert(textarea.id);
	if (noFocus[textarea.id] != 1)
	{
		noFocus[textarea.id] = 1;
		textarea.value = "";
	}
}

/**
	Allow only one whitespace within a textarea
*/
function deleteWhitespaces()
{
	textAreas = document.getElementsByTagName("textarea")
	for (i = 0;i < textAreas.length;i++) 
	{
		text = textAreas[i].value;
		textAreas[i].value = text.superTrim();
	}
}
