Ext.override(Ext.form.Field, {
    afterRender: function(){
        if (this.helpText) {
            this.helpIcon	=	this.helpIcon?this.helpIcon:'help';
			this.iconPath	=	this.iconPath?this.iconPath:'/lib/icons'
			
			
            var helpIconSrc = Ext.BLANK_IMAGE_URL;
            if (this.helpIcon == 'warning') {helpIconSrc = this.iconPath+'/warning.png'};
            if (this.helpIcon == 'help') {helpIconSrc = this.iconPath+'/help.png'};
            
            var label = findLabel(this);
            
            if (label) {
                var helpImage = label.createChild({
                    tag: 'img',
                    src: helpIconSrc,
                    style: 'margin-bottom: -2px; margin-left: 5px; padding: -2px;' //,
                    //width: 10,
                    //height: 11
                });
				this.helpDisplay	=	this.helpDisplay?this.helpDisplay:'image';
                
                if (this.helpDisplay == 'image' || this.helpDisplay == 'both'){
                
                    Ext.QuickTips.register({
                        target: helpImage,
                        title: this.helpTitle,
                        text: this.helpText,
                        enabled: true
                    });
                }
                
                if (this.helpDisplay == 'field' || this.helpDisplay == 'both'){
                
                    Ext.QuickTips.register({
                        target: this,
                        title: this.helpTitle,
                        text: this.helpText,
                        enabled: true
                    });
                    
                }
            }
        }
        Ext.form.Field.superclass.afterRender.call(this);
        this.initEvents();
    }
    });

Ext.QuickTips.init();
var findLabel = function(field){

    var wrapDiv = null;
    var label = null
    
    //find form-item and label
    wrapDiv = field.getEl().up('div.x-form-item');
    if (wrapDiv) {
        label = wrapDiv.child('label');
    }
    if (label) {
        return label;
    }
} 

