
var remove_spaces = function(){
    var textareas = document.getElementsByTagName('textarea');
    for (i = 0; i < textareas.length; i++) {
        var t = textareas[i];
        var realval = t.value.split(' ').join('');
        if (realval == '') {
            t.value = '';
        }
    }
}

var site_rules = {
    'input.emailadres' : function(element){
        element.onfocus = function(){
            if (this.value == 'emailadres') {
                this.value = '';
            }
            
        };
        element.onblur = function(){
            if (this.value == '') {
                this.value = 'emailadres';
            }
        }
    }

};

Behaviour.register(site_rules);

var oldonload = window.onload;
if (typeof window.onload != 'function') {
	window.onload = remove_spaces;
} else {
	window.onload = function() {
		oldonload();
		remove_spaces();
	}
}

