This is better for what you want to do:
// Copy into head
<SCRIPT type=text/javascript><!--
var docTips = new TipObj('docTips');
with (docTips)
{
template = '<table bgcolor="#003366" cellpadding="1" cellspacing="0" width="200" 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>';
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...');
// This next tip uses a formula to position the tip 110 pixels from the right edge of the screen.
tips.formulae = new Array(5, 50, 150,
'The Grand Total for the entire journey including basic fare price, taxes and booking fees');
tips.formulae2 = new Array(-550, 10, 150,
'The details of your entire journey including your departure/arrival dates and times for all flights, departure airports (with XXX codes), arrival airports (with XXX codes), any stops (if applicable), the class of the passengers seat and the cabin on-board');
tips.formulae3 = new Array(-550, 10, 150,
'The Fare price broken down to detail out all the Fare Basis, Fare Rules, Fare Price before Tax, Fare Price after Tax, the number of passengers and booking fees (if applicable)');
tips.formulae4 = new Array(-550, 10, 150,
'The Fare markups for Adult Fares, Child Fares and Infant Fares');
tips.formulae5 = new Array(-20, 70, 150,
'Enter Title (e.g. Mr, Mrs, Miss, Ms etc)');
tips.formulae6 = new Array(-20, 70, 150,
'Enter Passengers forename');
tips.formulae7 = new Array(-20, 70, 150,
'Enter Passengers surname');
tips.formulae8 = new Array(-20, 70, 150,
'Select the requested seat on-board');
tips.formulae9 = new Array(-20, 70, 150,
'Select required in-flight meal (if applicable)');
tips.formulae10 = new Array(-20, 70, 150,
'Enter any special requests');
tips.format = new Array(5, 5, 150, 'That means <i>italics</i>...<br />...etc');
}
var staticTip = new TipObj('staticTip');
with (staticTip)
{
// I'm using tables here for legacy NS4 support, but feel free to use styled DIVs.
template = '<table bgcolor="#000000" cellpadding="0" cellspacing="0" width="200" 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>';
// HIERARCHIAL TIPS: To call one tip object from within another tip object, make sure you
// pass the a reference to the current object as the second parameter to the show() function.
tips.links = new Array(5, 5, 100, 'Extra Links',
'- <a href="javascript:alert(\'Useful indeed...\')">Section 1</a> -<br />' +
'- <a href="#" name="nest1trig" onmouseover="nestTip.show(\'nest1\', staticTip)" ' +
'onmouseout="nestTip.hide()">NESTED TIP 1 ></a> -<br />' +
'- <a href="#" name="nest2trig" onmouseover="nestTip.show(\'nest2\', staticTip)" ' +
'onmouseout="nestTip.hide()">NESTED TIP 2 ></a> -<br />');
tipStick = 0;
}
// Here's the other tip object called by the one above, for hierarchial tips.
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>');
// This tip is positioned via formulae based on its parent tip's position...
tips.nest2 = new Array('staticTip.xPos + 95', 'staticTip.yPos + 50', 80,
'<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;
}
//--></SCRIPT>
---------------------------------------------------------
// Copy below opening <body> tag
<DIV id=docTipsLayer
style="Z-INDEX: 10000; LEFT: 0px; VISIBILITY: hidden; WIDTH: 10px; POSITION: absolute; TOP: 0px"></DIV>
<DIV id=staticTipLayer
style="Z-INDEX: 10000; LEFT: 0px; VISIBILITY: hidden; WIDTH: 10px; POSITION: absolute; TOP: 0px"></DIV>
<DIV id=nestTipLayer
style="Z-INDEX: 10000; LEFT: 0px; VISIBILITY: hidden; WIDTH: 10px; POSITION: absolute; TOP: 0px"></DIV>
<DIV id=stickyTipLayer
style="Z-INDEX: 10000; LEFT: 0px; VISIBILITY: hidden; WIDTH: 10px; POSITION: absolute; TOP: 0px"></DIV>
__________________________________________________ ________
// Copy to mouseover
onmouseover="docTips.show('formulae2');style.curso r='hand'" onmouseout="docTips.hide()"
|