function MMHelperText( oElement, sText ) {
    if ( arguments.length < 2 )
        return false;
    this.oElement = oElement;
    this.oElement.helperText = this;
    this.oElement.getValue = function() {
        if ( this.helperText.hasHelperText() )
            return '';
        return this.value;
    }
    this.sText = sText;
    this.init();
}

MMHelperText.prototype.init = function() {
    var me = this;
    function fnBlur() {
        if ( me.oElement.value == '' ) {
            me.oElement.value = me.sText;
            me.oElement.style.color = '#666';
        }
    }
    function fnFocus() {
        if ( me.hasHelperText() )
            me.oElement.value = '';
        me.oElement.style.color = '';
    }
    this.oElement.onfocus =  fnFocus;
    this.oElement.onblur = fnBlur;
    fnBlur();
}
MMHelperText.prototype.hasHelperText = function() {
    return this.oElement.value == this.sText;
}

function initBoxes() {
    var oLocation = document.getElementById( 'qs' );
    var oDealerName = document.getElementById( 'dealername' );
    if ( oDealerName )
        new MMHelperText( oDealerName, Strings.dealer_example );
    if ( oLocation )
        new MMHelperText( oLocation, Strings.address_example );
}
