function doTooltip(e, ar) {
    if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
    var cntnt = wrapTipContent(ar);
    var tip = document.getElementById( Tooltip.tipID );
    Tooltip.show(e, cntnt);
}

function hideTip() {
    if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
    Tooltip.hide();
}

function wrapTipContent(ar) {
    var cntnt = "";
    if ( ar[0] ) cntnt += '<div class="img"><img src="' + ar[0] + '"></div>';
    if ( ar[1] ) cntnt += '<div class="txt">' + ar[1] + '</div>';
    return cntnt;
}

// tooltip content here
var messages = new Array();
// array elements: image file name, optional text
messages[0] = ['images/popout1.jpg'];
messages[1] = ['images/popout2.jpg'];
// an example with no text
messages[2] = ['images/popout3.jpg'];
messages[3] = ['images/popout4.jpg'];
messages[20] = ['images/popout5.jpg'];

function loadIt(){
Tooltip.init();
}


if ( typeof window.addEventListener != "undefined" )
      window.addEventListener( "load", loadIt, false );
else if ( typeof window.attachEvent != "undefined" )
      window.attachEvent( "onload", loadIt );
else {
      if ( window.onload != null ) {
          var oldOnload = window.onload;
          window.onload = function ( e ) {
              oldOnload( e );
              loadIt();
          };
      }
      else
          window.onload = loadIt;
}

