var TTIPS = [  ];
function ieCoordinates(event) {
   return [ event.clientX + document.body.scrollLeft, event.clientY + document.body.scrollTop ]
}

function notIeCoordinates(event) {
   return [ event.pageX, event.pageY ]
}
function operaCoordinates(event) {
   if (event.pageX) 
         return [ event.pageX, event.pageY ];
   else
         return [ event.clientX, event.clientY ];
}
function getWindowSize() {
   if (window.innerHeight != null) 
         return [ innerWidth, innerHeight ];
   else
         return [ document.body.clientWidth, document.body.clientHeight ];
}
function getWindowScroll() {
   if (window.innerHeight != null) 
         return [ pageXOffset, pageYOffset ];
   else
         return [ document.body.scrollLeft, document.body.scrollTop ];
}
function getElemSize(elem) {
   if (elem.offsetWidth) 
         return [ elem.offsetWidth, elem.offsetHeight ];
   else
         return [ elem.style.pixelWidth, elem.style.pixelHeight ];
}
var getCoordinates;
function showNote(ttipId, event) {
	var ttip = document.getElementById(ttipId)
   if (event) {
      var wX = getWindowScroll()[0];
      var wY = getWindowScroll()[1];
      var wWidth = getWindowSize()[0];
      var wHeight = getWindowSize()[1];
      var width = getElemSize(ttip)[0];
      var height = getElemSize(ttip)[1];
      var eX = getCoordinates(event)[0];
      var eY = getCoordinates(event)[1];
      var right = Math.min((wX + wWidth) - 10, width + eX);
      var bottom = Math.min((wY + wHeight) - 10, height + eY);
      var left = Math.max(wX, right - width);
      var top = Math.max(wY, bottom - height);
      ttip.style.top = 10 + top +"px";
      ttip.style.left = 10 + left +"px";
      ttip.style.visibility = "visible";
   }
}
function hideNote(ttipId) {
var ttip = document.getElementById(ttipId)
   ttip.style.visibility = "hidden";
}

if (window.opera) 
   {getCoordinates = operaCoordinates;}
else {
	
	if (navigator.userAgent.indexOf("MSIE")!=-1) 

     { getCoordinates = ieCoordinates;}
else
     {getCoordinates = notIeCoordinates;}
}