//Lipka, v. 1.1
function hint(){
 var obj = this;

 var elem = document.createElement("DIV");
 document.body.appendChild(elem);
 var attr = document.createAttribute('id'); attr.value = 'hint'; elem.setAttributeNode(attr);
 obj.hint_container = elem;

 this.show = function(message) {

  obj.hint_container.innerHTML=message;

  document.onmousemove = function (e){

   var ie = document.all ? true : false;
   var x = ie ? document.body.scrollLeft + window.event.clientX : e.pageX;
   var y = ie ? document.body.scrollTop + window.event.clientY : e.pageY;

   obj.hint_container.style.left = document.body.clientWidth - x >= obj.hint_container.clientWidth ? x : x-obj.hint_container.clientWidth + 16 ;
   obj.hint_container.style.top = y+20; //document.body.clientHeight - y >= obj.hint_container.clientHeight ? y+20 : y-obj.hint_container.clientHeight - 16;
  }

  obj.hint_container.style.display='block';
 }

 this.hide = function() {
  obj.hint_container.innerHTML='';
  obj.hint_container.style.display='none';
 }

};

var hint = new hint();

