var tip = Class.create();
tip.prototype ={
    initialize: function(element, p){
        this.p = p || {};
        this.element  = $(element);
        this.text = this.element.readAttribute('title');
        this.element.writeAttribute('title','');
        this.className = p.className || '';
        this.factorV = p.factorV || 0;
        this.factorH = p.factorH || 0;
        this.isFixed = p.isFixed || false;
        this.defaultClass = p.defaultClass || 'tip-basic';
        Event.observe(this.element, "mouseover", this.show.bindAsEventListener(this));
        Event.observe(this.element, "mouseout", this.hide.bindAsEventListener(this));
    }, show: function(){
        $('dvTip').className = '';
        $('dvTip').addClassName(this.defaultClass).addClassName(this.className);
        $('dvTip').show();
        $('dvTip').innerHTML = this.text;
        setPos(this.element, $('dvTip'),{ h: this.p.h, v:this.p.v, factorV : this.factorV, factorH : this.factorH, isFixed : this.isFixed} );
    }, hide: function(tip){
        $('dvTip').hide();
    }
};