var docTips = new TipObj('docTips');
with (docTips)
{
 template = '<table bgcolor="#003366" cellpadding="1" cellspacing="0" width="%2%" border="0">' +
  '<tr><td><table bgcolor="#6699CC" cellpadding="3" cellspacing="0" width="100%" border="0">' +
  '<tr><td class="tipClass">%3%</td></tr></table></td></tr></table>';

/*MIE*/
 tips.premiowww = new Array(-75, 15, 150, 'vota il nostro sito, e vinci fantastici premi ogni settimana!!!!');

 tips.mysite = new Array(-75, 15, 150, 'Visit this for updates, help and more info');
 tips.welcome = new Array(5, 5, 100, 'Hope you like it...');
 tips.useful = new Array(5, 5, 150, 'This can add important context information to any link...');
 tips.formulae = new Array('page.scrollX() + page.winW() - 110', -20, 100,
  'This tip is always on the right edge...');
 tips.format = new Array(5, 5, 150, 'That means <i>italics</i>...<br /><hr />...etc');
}

var staticTip = new TipObj('staticTip');
with (staticTip)
{
 template = '<table bgcolor="#000000" cellpadding="0" cellspacing="0" width="%2%" border="0">' +
  '<tr><td><table cellpadding="3" cellspacing="1" width="100%" border="0">' +
  '<tr><td bgcolor="#336666" align="center" height="18" class="tipClass">%3%</td></tr>' +
  '<tr><td bgcolor="#009999" align="center" height="*" class="tipClass">%4%</td></tr>' +
  '</table></td></tr></table>';

 tips.links = new Array(5, 5, 100, 'Scrivici!',
  '- <a href="javascript:alert(\'Scrivici le tue impressioni, critiche, ...\')">Section 1</a> -<br />' +
  '- <a href="#" name="nest1trig" onmouseover="nestTip.show(\'nest1\', staticTip)" ' +
   'onmouseout="nestTip.hide()">NESTED TIP 1 &gt;</a> -<br />' +
  '- <a href="#" name="nest2trig" onmouseover="nestTip.show(\'nest2\', staticTip)" ' +
   'onmouseout="nestTip.hide()">NESTED TIP 2 &gt;</a> -<br />');

 tipStick = 0;
}

var nestTip = new TipObj('nestTip');
with (nestTip)
{
 template = '<table bgcolor="#000000" cellpadding="1" cellspacing="0" width="%2%" border="0">' +
  '<tr><td><table bgcolor="#009999" cellpadding="3" cellspacing="0" width="100%" border="0">' +
  '<tr><td class="tipClass">%3%</td></tr></table></td></tr></table>';

 tips.nest1 = new Array(10, 0, 90,
  '<a href="javascript:alert(\'A regular popup menu...\')">Relative Position</a>');

 tips.nest2 = new Array('staticTip.xPos + 95', 'staticTip.yPos + 50', 120,
  '<a href="javascript:alert(\'Nested tip 2\')">Absolutely positioned static tip...</a>');

 tipStick = 0;
}


var stickyTip = new TipObj('stickyTip');
with (stickyTip)
{
 template = '<table bgcolor="#000000" cellpadding="1" cellspacing="0" width="%2%" border="0">' +
  '<tr><td><table bgcolor="#339966" cellpadding="4" cellspacing="0" width="100%" border="0">' +
  '<tr><td align="center" class="tipClass">%3%</td></tr></table></td></tr></table>';

 tips.floating = new Array(5, 5, 100, 'Floating tips can have extra effect!');

 tipStick = 0.2;
}

function titlesToTips()
{
 var tags = isDOM ? document.getElementsByTagName('*') : [];
 for (var i = 0; i < tags.length; i++)
 {
  if (tags[i].title)
  {
   tags[i].onmouseover = new Function('docTips.newTip("tagTip' + i + '", 8, 17, 80, "' +
    tags[i].title + '")');
   tags[i].onmouseout = new Function('docTips.hide()');
   tags[i].title = '';
  }
 }
};
var tttOL = window.onload;
window.onload = function()
{
 if (tttOL) tttOL();
 titlesToTips();
 }

