function addInputEvents(element, value) {
	if ( typeof (value) != "undefined" && value != "" ) element.value = value;
	else value = "";
	element.onfocus = function() {
		this.parentNode.parentNode.parentNode.parentNode.className = "form-text active";
		this.style.cursor = "text";
		if (this.value == value )
			this.value = "";
	}
	element.onblur = function() {
		this.parentNode.parentNode.parentNode.parentNode.className = "form-text";
		if (this.value == "" )
			this.value = value;
	}
	element.onmouseover = function() {
		if (this.parentNode.parentNode.parentNode.parentNode.className != "form-text active") {
			this.parentNode.parentNode.parentNode.parentNode.className = "form-text hover";
			this.style.cursor = "default";
		}
	}
	element.onmouseout = function() {
		if (this.parentNode.parentNode.parentNode.parentNode.className != "form-text active") {
			this.parentNode.parentNode.parentNode.parentNode.className = "form-text";
		}
	}
}