function quick_info(config)
{
  this.hideTime=config.hideTime;
  this.defCN=config.defCN;
  this.aVer=(typeof(config.aVer)!='undefined'?config.aVer:0);
  this.aHor=(typeof(config.aHor)!='undefined'?config.aHor:0);
  this.vLeft=(typeof(config.vLeft)!='undefined'?config.vLeft:0);
  this.vTop=(typeof(config.vTop)!='undefined'?config.vTop:0);
  this.vWidth=(typeof(config.vWidth)!='undefined'?config.vWidth:0);
  this.aLoader;
  
  if (!window.getHTML) {alert('Do poprawnego działania wymagany jest obiekt getHTML'); return false;}
  var is_ie = ( /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) );
  var is_ie5 = ( is_ie && /msie 5\.0/i.test(navigator.userAgent) );
  
  this.ie=is_ie||is_ie5;
  this.main_div;
  this.start=false;
  this.over_field=false;
  this.timer=null;
  this.currEl=null;

  this.startDelay=false;
  this.timerDelay=null;
  this.setOutSeted=false;

  this.ajx_obj=new getHTML();

  var self=this;
  this.xobj;
  var win = window;

  if(typeof(win.pageXOffset) != 'undefined')
    var xobj = win.document.getElementsByTagName('body').item(0);
  else
  {
    var xobj = (win.document.compatMode && win.document.compatMode == "CSS1Compat")?win.document.documentElement.getElementsByTagName('body').item(0):win.document.body || null;
    this.xobj = (win.document.compatMode && win.document.compatMode == "CSS1Compat")?win.document.documentElement:win.document.body || null;
  }
  this.main_div=document.createElement('div');
  this.main_div.style.cssText='position: absolute; display: none; ';
  this.main_div.onmouseout = function ()
  {
    self.over_field=false;
    if (self.hideTime>0)
      self.timer=setTimeout(function () {self.off()}, self.hideTime);
  }

  this.main_div.onmouseover = function ()
  {
    self.over_field=true;
  }
  
  xobj.appendChild(this.main_div);

  this.sDelay= function (el, el_id, config)
  {
    if ((typeof(config.txt)=='undefined'||config.txt.length==0)&&typeof(config.xslt)=='undefined'&&typeof(config.xml)=='undefined') return false;
    if (typeof(config.hideTime)=='undefined') config.hideTime=self.hideTime;
    if (self.currEl!==el)
    {
      clearTimeout(self.timer);
      self.timer=null;

      clearTimeout(self.timerDelay);
      self.timerDelay=setTimeout(function () {self.show(el, el_id, config); }, 200);
      self.setOut(el, config.hideTime);
    }
  }

  
  this.show = function (el, el_id, config)
  {
    if ((typeof(config.txt)=='undefined'||config.txt.length==0)&&typeof(config.xslt)=='undefined'&&typeof(config.xml)=='undefined') return false;
    if (typeof(config.aHor)=='undefined') config.aHor=self.aHor;
    if (typeof(config.aVer)=='undefined') config.aVer=self.aVer;
    if (typeof(config.vLeft)=='undefined') config.vLeft=self.vLeft;
    if (typeof(config.vTop)=='undefined') config.vTop=self.vTop;
    if (typeof(config.vWidth)=='undefined') config.vWidth=self.vWidth;
    if (typeof(config.defCN)=='undefined') config.defCN=self.defCN;
    if (typeof(config.hideTime)=='undefined') config.hideTime=self.hideTime;
    if (typeof(config.showAL)=='undefined') config.showAL=false;
    if (typeof(config.fallow) == 'undefined'||typeof(config.ev)=='undefined') config.fallow=false;
//    self.setOutSeted=false;
//    self.setOut(el, config.hideTime);

//    self.currEl=el;
    self.over_field=false;

    if (typeof(el_id)=='object') var el_x=el_id;
    else var el_x = document.getElementById(el_id);

    if (typeof(config.xslt)!='undefined') 
    {
      if (config.showAL)
      {
        if (typeof(self.aLoader)=='undefined'||self.aLoader.exist==false)
          self.aLoader=new ajaxLoader();

        self.aLoader.showOnElement(el_x);
      }
      self.ajx_obj.run = function(data, scpt) 
      {
        if (config.showAL)
          self.aLoader.hide();

        self.main_div.className=config.defCN;

        if (config.vWidth=='auto')
          self.main_div.style.width=el_x.offsetWidth+'px';
        else if (parseInt(config.vWidth)>0)
          self.main_div.style.width=parseInt(config.vWidth)+'px';

//        self.main_div.style.zIndex=1000;
        self.showXY(el, data, config);
      }


      if (typeof(config.xml)!='undefined')
        self.ajx_obj.getData(config.xml, config.xslt+'&'+ntt_obj.tmpl_rand);
      else
        self.ajx_obj.getDataXSLT(config.xslt);

      return false;
    }

    self.main_div.className=config.defCN;

    if (config.vWidth=='auto')
      self.main_div.style.width=el_x.offsetWidth+'px';
    else if (parseInt(config.vWidth)>0)
      self.main_div.style.width=parseInt(config.vWidth)+'px';
    else
      self.main_div.style.width='auto';

    self.main_div.style.zIndex=1000;
//    $('top').innerHTML=self.main_div.offsetWidth;
//    self.main_div.display='none';
    self.showXY(el_x, config.txt, config);
  }

  this.get_pos = function(el_x, config)
  {
    var a_top = 0;
    var a_left = 0;

    ee=el_x;
    
    while(ee.offsetParent)
    {
      a_left+=ee.offsetLeft;
      a_top+=ee.offsetTop;
      ee=ee.offsetParent;
    }
    var siz=self.get_size();

    if (config.aVer=='b')      a_top+=el_x.offsetHeight;
    else if (config.aVer=='m') a_top+=Math.round(el_x.offsetHeight/2);
    
    if (config.aHor=='r')      a_left+=el_x.offsetWidth;
    else if (config.aHor=='c') a_left+=Math.round(el_x.offsetWidth/2);
    else if (config.aHor=='l') ;
    else if (config.aHor=='R') a_left+=el_x.offsetWidth-siz.w;
    else if (config.aHor=='C') a_left+=Math.round(el_x.offsetWidth/2)-Math.round(siz.w/2);
    else if (config.aHor=='L') a_left-=siz.w;

    
    a_top += config.vTop;
    a_left += config.vLeft;
    return {t:a_top, l:a_left};
  
  }

  this.get_size = function()
  {
     self.main_div.style.display = "block";
     var wx = self.main_div.offsetWidth;
     var hx = self.main_div.offsetHeight;
     self.main_div.style.display = "none";
     return {w:wx,h:hx};
  }

  this.follow_mouse = function (ev, vLeft, vTop)
  {
    var a_left=0;
    var a_top=0;

    if (self.ie) 
    { 
       if (typeof(ev)=='undefined') ev=window.event;
       a_left = ev.clientX + self.xobj.scrollLeft;
       a_top = ev.clientY + self.xobj.scrollTop;
    } 
    else 
    {  
       a_left = ev.pageX;
       a_top = ev.pageY;
    }  
    a_top += vTop;
    a_left += vLeft;
    self.main_div.style.left=a_left+'px';
    self.main_div.style.top=a_top+'px';
  }

  this.showXY = function (el, txt, config)
  {
    if (typeof(txt)=='undefined') txt='';

    var win = window;
    if (self.start==false&&self.over_field==false)
    {
      self.main_div.innerHTML='';
      if (typeof(txt)=='string')
        self.main_div.innerHTML=txt;
      else
        self.main_div.appendChild(txt);

      if (config.fallow)
      {
        el.onmousemove=function (evx) {self.follow_mouse(evx, config.vLeft, config.vTop );}
        self.follow_mouse(config.ev, config.vLeft, config.vTop );
      }
      else
      {
        var pos =self.get_pos(el, config);
        self.main_div.style.left=pos.l+'px';
        self.main_div.style.top=pos.t+'px';
      }
      self.main_div.style.display='';
      self.setOut(el, config.hideTime);
    }
    
  }

  this.setOut= function (el, ht)
  {
    if (self.currEl!==el&&self.setOutSeted==false&&(ht>0))
    {
      self.currEl=el;

      var xxx=el.onmouseout;
      if (typeof(ht)=='undefined') ht = parseInt(self.hideTime)

      if (typeof(xxx)!=='function') xxx=function (){};
      self.setOutSeted=true;


      el.onmouseout=function(e) 
      {
        clearTimeout(self.timerDelay);
        clearTimeout(self.timer);
        self.timerDelay=null;
        self.setOutSeted=false;
        self.start=false;
        self.currEl=null;
        xxx(e);
        self.timer=setTimeout(function () {self.off()}, ht);
        this.onmouseout=xxx;
      }
    }
//    self.main_div.style.display='';
  }

  this.off=function (force)
  {
    if (typeof(force)=='undefined') force=false;

    if (force||(self.start==false&&self.over_field==false))
    {
      self.currEl=null;
      self.main_div.innerHTML='';
      self.main_div.style.display='none';
    }
  }

}
