
accToolTips = {
  
  tooltipAjax: null,
  tipTitle: 'Λεπτομέριες',
  
  showTrader: function(traderId) {
    this.tipTitle = 'Ποιος είναι';
    url = ajaxTraderViewURL;
    params= "id="+traderId;
    this.tooltipAjax = new Ajax.Request( url, { method: 'get', parameters: params, onComplete: this.showStickyTip.bind(this)} );
    Element.show('indicator');
  },

  showTraderTip: function(traderId) {
    this.tipTitle = 'Κάντε κλικ στην επωνυμία για προβολή';
    url = ajaxTraderDetailsURL;
    params= "id="+traderId;
    this.tooltipAjax = new Ajax.Request( url, { method: 'get', parameters: params, onComplete: this.showToolTip.bind(this)} );
    Element.show('indicator');
  },
  
  showStickyTip: function(response) {
      Tip(response.responseText, TITLE, this.tipTitle, STICKY, true, CLICKCLOSE, true, CLOSEBTN, true);
      this.tooltipAjax = null;
      Element.hide('indicator');
  },
  
  showToolTip: function(response) {
      Tip(response.responseText, TITLE, this.tipTitle);
      this.tooltipAjax = null;
      Element.hide('indicator');
  },
  
  closeToolTip: function() {
    if( this.tooltipAjax!=null ) {
        try { 
            this.tooltipAjax.transport.abort(); 
            this.tooltipAjax=null;
        } 
        catch(e) {}
    }
    UnTip();
  }
  
}
