function MMHelperText( oElement, sDefault, sFocusedState, sBlurredState ) {
    if ( !oElement )
        return false;
    if ( oElement.MMHelperText && oElement.MMHelperText.sDefault != sDefault ) {
        oElement.MMHelperText.sDefault = sDefault;
        return true;
    }
    oElement.MMHelperText = this;
    this.sFocusedState = sFocusedState || '#666';
    this.sBlurredState = sBlurredState || '';
    this.oElement = oElement;
    this.sDefault = sDefault;
    this.init();
    this.onElementBlur();
    this.setElementStyle( true );
}

MMHelperText.prototype.init = function() {
    var me = this;
}
MMHelperText.prototype.onElementFocus = function() {
    if ( this.oElement.value && this.oElement.value == this.sDefault )
        this.oElement.value = '';
    this.setElementStyle( false );
}
MMHelperText.prototype.onElementBlur = function() {
    if ( !this.oElement.value || this.oElement.value == '' ) {
        this.oElement.value = this.sDefault;
        this.setElementStyle( true );
    }
}
MMHelperText.prototype.validateElement = function( oElement ) {
    oElement = oElement || this.oElement;
    if ( oElement && oElement.MMHelperText ) {
        if ( oElement.value == oElement.MMHelperText.sDefault )
            return '';
    }
    return oElement.value;
}
MMHelperText.prototype.setElementStyle = function( bState ) {
    if ( bState )
        this.oElement.style.color = this.sFocusedState;
    else
        this.oElement.style.color = this.sBlurredState;
}
