/***********************************************
* Image w/ description tooltip- By Dynamic Web Coding (www.dyn-web.com)
* Copyright 2002-2007 by Sharon Paine
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/* IMPORTANT: Put script after tooltip div or
	 put tooltip div just before </BODY>. */

var dom = (document.getElementById) ? true : false;
var ns5 = (!document.all && dom || window.opera) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ie4 && !ie5 && !dom) ? true : false;

var origWidth, origHeight;

// avoid error of passing event object in older browsers
if (nodyn) { event = "nope" }

///////////////////////  CUSTOMIZE HERE   ////////////////////
// settings for tooltip 
// Do you want tip to move when mouse moves over link?
var tipFollowMouse= true;	
// Be sure to set tipWidth wide enough for widest image
var tipWidth= 250;
var offX= 20;	// how far from mouse to show tip
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "10px";
var tipLineHeight= "12px";
// set default text color and background color for tooltip here
// individual tooltips can have their own (set in messages arrays)
// but don't have to
var tipFontColor= "#06122a";
var tipBgColor= "#ffffff";
var tipBorderColor= "#7a000d";
var tipBorderWidth= 3;
var tipBorderStyle= "solid";
var tipPadding= 15;

// tooltip content goes here (image, description, optional bgColor, optional textcolor)
var messages = new Array();
// multi-dimensional arrays containing:
// image and text for tooltip
// optional: bgColor and color to be sent to tooltip
messages[0] = new Array('graphics/yamaha/royal_star_venture.jpg','<b>Royal Star Venture</b><br /><br />V-4 Powered. The serious open-road, luxury touring performer. 5-year Factory Warranty.');
messages[1] = new Array('graphics/yamaha/royal_star_tour_deluxe.jpg','<b>Royal Star Tour Deluxe</b><br /><br />V-4 Powered. A cruiser or a touring bike depending on your mood. 5-year Factory Warranty.');
messages[2] = new Array('graphics/yamaha/stratoliner_s.jpg','<b>Stratoliner S</b><br /><br />113-cubic-inch V-Twin powered. Truly the definition of traveling in chrome-clad style.');
messages[3] = new Array('graphics/yamaha/stratoliner_midnight.jpg','<b>Stratoliner Midnight</b><br /><br />113-cubic-inch V-Twin powered. The black beauty of the Star line, ready for long-range travel.');
messages[4] = new Array('graphics/yamaha/roadliner_s.jpg','<b>Roadliner S</b><br /><br />113-cubic-inch V-Twin powered. An unparalleled mix of style, power and technology wrapped in plenty of chrome.');
messages[5] = new Array('graphics/yamaha/roadliner_midnight.jpg','<b>Roadliner Midnight</b><br /><br />113-cubic-inch V-Twin powered. Classic black has never been so powerful and attractive.');
messages[6] = new Array('graphics/yamaha/raider_s.jpg','<b>Raider S</b><br /><br />113-cubic-inch V-Twin. The newest Star inspired by the custom chopper movement with chrome accents.');
messages[7] = new Array('graphics/yamaha/raider.jpg','<b>Raider</b><br /><br />113-cubic-inch V-Twin powered. The newest Star inspired by the custom chopper movement.');
messages[8] = new Array('graphics/yamaha/road_star_silverado_s.jpg','<b>Road Star Silverado S</b><br /><br />102-cubic-inch FI V-Twin powered. Ready for the open road and adorned with chrome accents.');
messages[9] = new Array('graphics/yamaha/road_star_silverado.jpg','<b>Road Star Silverado</b><br /><br />102-cubic-inch FI V-Twin powered. Loaded with soul and ready for the open road.');
messages[10] = new Array('graphics/yamaha/road_star_s.jpg','<b>Road Star S</b><br /><br />102-cubic-inch FI V-Twin powered. The perfect platform for creating your masterpiece with ample chrome accents.');
messages[11] = new Array('graphics/yamaha/road_star.jpg','<b>Road Star</b><br /><br />102-cubic-inch FI V-Twin powered. The perfect platform for creating your masterpiece with an honest reputation.');
messages[12] = new Array('graphics/yamaha/v_star_1300_tourer.jpg','<b>V Star 1300 Tourer</b><br /><br />80-cubic-inch V-Twin powered. Midsize Star brings modern, classic styling to the open road.');
messages[13] = new Array('graphics/yamaha/v_star_1300.jpg','<b>V Star 1300</b><br /><br />80-cubic-inch V-Twin powered. Modern, classic styling along for a lighter, sportier, hot-rod-inspired ride.');
messages[14] = new Array('graphics/yamaha/v_star_1100_silverado.jpg','<b>V Star 1100 Silverado</b><br /><br />With all that chrome and studded leather, it&#39;s hard to believe this is not a custom job.');
messages[15] = new Array('graphics/yamaha/v_star_1100_classic.jpg','<b>V Star 1100 Classic</b><br /><br />The popular, classic V-twin that balances dependability and the cruiser spirit.');
messages[16] = new Array('graphics/yamaha/v_star_1100_custom.jpg','<b>V Star 1100 Custom</b><br /><br />Authentic cruiser styling and the lowest seat height of any Star Motorcycle.');
messages[17] = new Array('graphics/yamaha/v_star_silverado.jpg','<b>V Star Silverado</b><br /><br />The dressed-out V-twin that&#39;s easy on the eyes and wallet.');
messages[18] = new Array('graphics/yamaha/v_star_classic.jpg','<b>V Star Classic</b><br /><br />The value Classic packed with all Star quality and performance.');
messages[19] = new Array('graphics/yamaha/v_star_custom.jpg','<b>V Star Custom</b><br /><br />Plenty of attitude in a low, long, lean package. The best value Star model.');
messages[20] = new Array('graphics/yamaha/v_star_250.jpg','<b>V Star 250</b><br /><br />A nimble, confidence-inspiring, affordable cruiser. Low, low 27-inch seat height.');
messages[21] = new Array('graphics/yamaha/midnight_warrior.jpg','<b>Midnight Warrior</b><br /><br />102-cubic-inch V-Twin powered. The all-black version of the four-time AMA Prostar drag racing champion.');
messages[22] = new Array('graphics/yamaha/warrior.jpg','<b>Warrior</b><br /><br />102-cubic-inch V-Twin powered. Stunning style and performance that redefines the meaning of Cruiser.');
messages[23] = new Array('graphics/yamaha/vmax.jpg','<b>VMAX</b><br /><br />The ultimate power cruiser returns delivering an unmatched level of performance and style.');
messages[24] = new Array('graphics/yamaha/raptor_700r.jpg','<b>Raptor 700R</b><br /><br />America&#39;s best-selling sport ATV with aluminum&#47;steel hybrid chassis and fuel injection.');
messages[25] = new Array('graphics/yamaha/raptor_700r_se.jpg','<b>Raptor 700R SE</b><br /><br /> A radical appearance package, wave-style rear brake disc, GYTR&#174; front grab bar and heel guards.');
messages[26] = new Array('graphics/yamaha/yfz450.jpg','<b>YFZ450</b><br /><br />The ATV that revolutionized racing dominates in every performance feature - GNCC Champ &#39;04&#47;&#39;07.');
messages[27] = new Array('graphics/yamaha/wolverine_450_auto_4x4.jpg','<b>Wolverine 450 Auto. 4x4</b><br /><br />The sportiest 4x4 ever. The ultimate fun, trail ATV in the industry.');
messages[28] = new Array('graphics/yamaha/raptor_350.jpg','<b>Raptor 350</b><br /><br />Styled after its big brother, this is a fully-featured, performance-focused, sport ATV.');
messages[29] = new Array('graphics/yamaha/wolverine_350.jpg','<b>Wolverine 350</b><br /><br />Great automatic sport value in a fully-featured ATV with great mud protection and full floorboards.');
messages[30] = new Array('graphics/yamaha/raptor_250.jpg','<b>Raptor 250</b><br /><br />Lightest production sport ATV ever, for amazingly nimble handling and a great power-to-weight ratio.');
messages[31] = new Array('graphics/yamaha/raptor_90.jpg','<b>Raptor 90</b><br /><br />All-new Raptor 90 has the features to deliver more fun than ever before.');
messages[32] = new Array('graphics/yamaha/yzf-r1.jpg','<b>YZF-R1</b><br /><br />The MotoGP-inspired R1 is the most advanced Open-class production motorcycle.');
messages[33] = new Array('graphics/yamaha/fz1.jpg','<b>FZ1</b><br /><br />Real-world performance that will make your everyday ride extraordinary.');
messages[34] = new Array('graphics/yamaha/yzf-r6.jpg','<b>YZF-R6</b><br /><br />Full of innovations and technology you won’t find on any other middleweight Supersport.');
messages[35] = new Array('graphics/yamaha/yzf-r6s.jpg','<b>YZF-R6S</b><br /><br />The power, performance and price that make the R6 an outstanding do-it-all sportbike.');
messages[36] = new Array('graphics/yamaha/fz6.jpg','<b>FZ6</b><br /><br />This do-it-all street fighter is built for exhilarating performance and easy-living functionality.');
messages[37] = new Array('graphics/yamaha/fjr1300a.jpg','<b>FJR1300A</b><br /><br />The perfect combination of touring comfort and sport performance in one beautiful package.');
messages[38] = new Array('graphics/yamaha/fjr1300ae.jpg','<b>FJR1300AE</b><br /><br />Yamaha&#39;s electronically controlled clutch-less shifting makes this model the definition of smooth.');
messages[39] = new Array('graphics/yamaha/wr250x.jpg','<b>WR250X</b><br /><br />Supermoto influenced, the all-new WR250X is here to make Yamaha’s off-road prowess street accessible.');
messages[40] = new Array('graphics/yamaha/wr250r.jpg','<b>WR250R</b><br /><br />Descended from YZ and WR, the all-new WR250R offers trail or street performance.');
messages[41] = new Array('graphics/yamaha/xt250.jpg','<b>XT250</b><br /><br />A bigger engine and extensive upgrades take the XT to the next level of fun and all-around function.');
messages[42] = new Array('graphics/yamaha/tw200.jpg','<b>TW200</b><br /><br />Versatility and comfort for a smooth ride, wherever you go.');
messages[43] = new Array('graphics/yamaha/yz450f.jpg','<b>YZ450F</b><br /><br />The revolutionary four-stroke that&#39;s continually taking MX performance to a whole new level.');
messages[44] = new Array('graphics/yamaha/yz250.jpg','<b>YZ250</b><br /><br />Our legendary two-stroke Supercross winner is more potent than ever.');
messages[45] = new Array('graphics/yamaha/yz250f.jpg','<b>YZ250F</b><br /><br />The epitome of quarter liter, free-revving four-stroke performance.');
messages[46] = new Array('graphics/yamaha/yz125.jpg','<b>YZ125</b><br /><br />The award-winning, light, nimble two-stroke that&#39;s ready to race right out of the crate.');
messages[47] = new Array('graphics/yamaha/yz85.jpg','<b>YZ85</b><br /><br />The ideal choice for the next generation of champions.');
messages[48] = new Array('graphics/yamaha/wr450f.jpg','<b>WR450F</b><br /><br />The most powerful, sharp handling, nimble WR ever.');
messages[49] = new Array('graphics/yamaha/wr250f.jpg','<b>WR250F</b><br /><br />Amazing nimbleness and maneuverability make it the choice of riders of all levels.');
messages[50] = new Array('graphics/yamaha/tt-r230.jpg','<b>TT-R230</b><br /><br />Predictable power and reliability make the TT-R230 great for beginner and intermediate riders.');
messages[51] = new Array('graphics/yamaha/tt-r125le.jpg','<b>TT-R125LE</b><br /><br />An award-winning playbike that&#39;s perfect for discovering the fun and freedom of off-road riding.');
messages[52] = new Array('graphics/yamaha/tt-r125e.jpg','<b>TT-R125E</b><br /><br />All the TT-R performance with smaller wheels and lower seat height than its bigger brother.');
messages[53] = new Array('graphics/yamaha/tt-r110e.jpg','<b>TT-R110E</b><br /><br />Big fun for the whole family, the all-new TT-R110 begs to be ridden by everyone from bigger kids to adults.');
messages[54] = new Array('graphics/yamaha/tt-r50e.jpg','<b>TT-R50E</b><br /><br />Great for learning and playing, complete with 49cc of automatic, four-stroke fun.');
messages[55] = new Array('graphics/yamaha/pw50.jpg','<b>PW50</b><br /><br />Thousands of riders can tell you, it really is a great way to start out.');
messages[56] = new Array('graphics/yamaha/majesty.jpg','<b>Majesty</b><br /><br />Ready to go beyond city streets with punchy performance and practical features galore.');
messages[57] = new Array('graphics/yamaha/tmax.jpg','<b>TMAX</b><br /><br />The all-new Super Sport scooter blurs the boundries between scooter and motorcycle.');
messages[58] = new Array('graphics/yamaha/zuma.jpg','<b>Zuma 125</b><br /><br />The all-new 125cc 4-stroke Zuma - at home on unpaved roads with the attitude you want for the street.');
messages[59] = new Array('graphics/yamaha/vino_125.jpg','<b>Vino 125</b><br /><br />The comfort and convenience of a Vino with more power and performance.');
messages[60] = new Array('graphics/yamaha/zuma_125.jpg','<b>Zuma</b><br /><br />The sporty Zuma is a fantastic combination of fun and practicality.');
messages[61] = new Array('graphics/yamaha/c3.jpg','<b>C3</b><br /><br />A cool-looking, functional transport tool with serious fuel economy - good for your wallet and the environment.');
messages[62] = new Array('graphics/yamaha/vino_classic.jpg','<b>Vino Classic</b><br /><br />The Euro-styled four-stroke for economical, practical, fun transportation.');
messages[63] = new Array('graphics/yamaha/grizzly_700_eps_due.jpg','<b>Grizzly 700 FI Auto. 4x4 EPS Ducks Unlimited</b><br /><br />The Ducks Unlimited Edition gets Realtree AP HD&#174; Camouflage and industry-first Electric Power Steering.');
messages[64] = new Array('graphics/yamaha/grizzly_700_eps_se.jpg','<b>Grizzly 700 FI Auto. 4x4 EPS Special Edition</b><br /><br />The Grizzly 700 SE comes with cast aluminum wheels, water dipped body panels and special graphics.');
messages[65] = new Array('graphics/yamaha/grizzly_700_eps.jpg','<b>Grizzly 700 FI Auto. 4x4 EPS</b><br /><br />The most powerful Grizzly ever - excellent terrainabilty, comfort and industry-first Electric Power Steering.');
messages[66] = new Array('graphics/yamaha/grizzly_700.jpg','<b>Grizzly 700 FI Auto. 4x4</b><br /><br />Powerful 686cc liquid-cooled, four-stroke and light weight for best power-to-weight for a utility model in the industry.');
messages[67] = new Array('graphics/yamaha/grizzly_550_eps_se.jpg','<b>Grizzly 550 FI Auto. 4x4 EPS Special Edition</b><br /><br />The all-new Grizzly 550 SE with cast aluminum wheels, water dipped body panels and special graphics.');
messages[68] = new Array('graphics/yamaha/grizzly_550_eps.jpg','<b>Grizzly 550 FI Auto. 4x4 EPS</b><br /><br />The new 500cc class leader with a fully featured package, EPS and excellent value.');
messages[69] = new Array('graphics/yamaha/grizzly_550.jpg','<b>Grizzly 550 FI Auto. 4x4</b><br /><br />The 500cc class new leader with a fully featured package with a new 558cc powerplant and excellent value.');
messages[70] = new Array('graphics/yamaha/grizzly_450_irs.jpg','<b>Grizzly 450 Auto. 4x4 IRS</b><br /><br />A perfect blend of comfort, capability, ruggedness, now with rear sealed wet brake and 2 inch receiver hitch.');
messages[71] = new Array('graphics/yamaha/big_bear_400_irs.jpg','<b>Big Bear 400 4x4 IRS</b><br /><br />Reliable and rugged for riders who prefer shifting, now with ITP MudLite tires, IRS and sealed wet brake.');
messages[72] = new Array('graphics/yamaha/grizzly_350_irs.jpg','<b>Grizzly 350 Auto. 4x4 IRS</b><br /><br />Full-featured ATV boasting IRS for superb terrainability, all-day comfort, and a sealed rear wet brake.');
messages[73] = new Array('graphics/yamaha/grizzly_350_4x4.jpg','<b>Grizzly 350 Auto. 4x4</b><br /><br />This high-value, solid rear axle Grizzly 350 offers up reliability and function at a great price.');
messages[74] = new Array('graphics/yamaha/grizzly_350.jpg','<b>Grizzly 350 Auto.</b><br /><br />An ATV with a proven engine and rugged chassis, providing great performance in an affordable package.');
messages[75] = new Array('graphics/yamaha/big_bear_250.jpg','<b>Big Bear 250</b><br /><br />A full-sized shifter ATV that&#39;s light on its feet and even lighter on the pocketbook.');
messages[76] = new Array('graphics/yamaha/grizzly_125.jpg','<b>Grizzly 125 Auto.</b><br /><br />Big Grizzly styling and tough engineering make getting there easy.');
messages[77] = new Array('graphics/yamaha/rhino_700_due.jpg','<b>Rhino 700 FI Auto. 4x4 Duck Unlimited Edition</b><br /><br />The Ducks Unlimited Edition gets Realtree&#174; AP HD&#174; Camo, over fenders and sun top.');
messages[78] = new Array('graphics/yamaha/rhino_700_sport.jpg','<b>Rhino 700 FI Auto. 4x4 Sport Edition</b><br /><br />Rhino 700 FI Sport Edition comes with adjustable piggyback shocks, cast aluminum wheels.');
messages[79] = new Array('graphics/yamaha/rhino_700_se.jpg','<b>Rhino 700 FI Auto. 4x4 Special Edition</b><br /><br />This Rhino 700FI SE comes with cast aluminum wheels, silver seats, suntop and special graphics.');
messages[80] = new Array('graphics/yamaha/rhino_700.jpg','<b>Rhino 700 FI Auto. 4x4</b><br /><br />The new Rhino 700 FI 4x4 - hard-working, comfortable and packed with features that make it just plain fun to drive.');
messages[81] = new Array('graphics/yamaha/rhino_450.jpg','<b>Rhino 450 Auto. 4x4</b><br /><br />All the big Rhino features in a value-packed, heavy-duty side-by-side package.');
messages[82] = new Array('graphics/yamaha/noimage.jpg','<b>Inverter EF1000iS</b><br /><br />1,000 watts&#47;8.3 amps. The ultimate in lightweight, portable electricity - quiet, durable and convenient.');
messages[83] = new Array('graphics/yamaha/noimage.jpg','<b>Inverter EF2400iS</b><br /><br />2,400 watts&#47;16.7 amps. Light weight and uses the latest technology to produce the highest output in its class.');
messages[84] = new Array('graphics/yamaha/noimage.jpg','<b>Inverter EF2800i</b><br /><br />2,800 watts&#47;23.3 amps. This quiet model with Smart Throttle adjusts engine speed to match current draw.');
messages[85] = new Array('graphics/yamaha/noimage.jpg','<b>Inverter EF3000iSE&#47;B</b><br /><br />3,000 watts&#47;25.0 amps. Clean power, quiet, plus power boost make this the ultimate portable generator on wheels.');
messages[86] = new Array('graphics/yamaha/noimage.jpg','<b>Inverter EF4500iSE</b><br /><br />4,500 watts&#47;37.5 amps. Power, efficiency, and quiet operation make this an RV owners ultimate accessory.');
messages[87] = new Array('graphics/yamaha/noimage.jpg','<b>Premium EF2600</b><br /><br />2,600 watts&#47;21.6 amps. Plenty of power, quiet, nine hours of run time, and GFCI receptacle.');
messages[88] = new Array('graphics/yamaha/noimage.jpg','<b>Premium EF4000DE</b><br /><br />4,000 watts&#47;33.0 amps &#64; 120 volts 120&#47;240 volt. Great power for home back-up or construction sites.');
messages[89] = new Array('graphics/yamaha/noimage.jpg','<b>Premium EF5200DE</b><br /><br />5,200 watts&#47;43.3 amps &#64; 120 volts 120&#47;240 volt. Power and performance in a quiet, compact package.');
messages[90] = new Array('graphics/yamaha/noimage.jpg','<b>Premium EF6600DE</b><br /><br />6,600 watts&#47;55.0 amps &#64; 120 volts 120&#47;240 volt. Convenient, powerful, efficient for home or contractor use.');
messages[91] = new Array('graphics/yamaha/noimage.jpg','<b>Premium EF12000DE</b><br /><br />12,000 watts&#47;50.0 amps &#64; 120 volts 120&#47;240 volt. This unit can power most homes in emergency situations.');
messages[92] = new Array('graphics/yamaha/noimage.jpg','<b>Water Pumps YP20G</b><br /><br />Rugged, reliable and powerful. Pumps 160 gallons per minute.');
messages[93] = new Array('graphics/yamaha/noimage.jpg','<b>Water Pumps YP30G</b><br /><br />Rugged, reliable and powerful. Pumps 260 gallons per minute.');
messages[94] = new Array('graphics/yamaha/noimage.jpg','<b>Inverter YG2800i</b><br /><br />2,800 watts&#47;23.3 amps. Amazingly quiet, remarkably light and it&#39;s got all the latest features.');
messages[95] = new Array('graphics/yamaha/noimage.jpg','<b>Premium YG4000D</b><br /><br />4,000 watts&#47;33.0 amps &#64; 120 volts 120&#47;240 volt. Quiet, compact, GFCI and reliable.');
messages[96] = new Array('graphics/yamaha/noimage.jpg','<b>Premium YG5200D</b><br /><br />5,200 watts&#47;43.3 amps &#64; 120 volts 120&#47;240 volt. Quiet, efficient 5kvA-class generator comes with GFCI.');
messages[97] = new Array('graphics/yamaha/noimage.jpg','<b>Premium YG6600D</b><br /><br />6,600 watts&#47;55.0 amps &#64; 120 volts 120&#47;240 volt. Biggest model - 357cc OHV four-stroke engine.');
messages[98] = new Array('graphics/yamaha/noimage.jpg','<b>Premium YG6600DE</b><br /><br />6,600 watts&#47;55.0 amps &#64; 120 volts 120&#47;240 volt. Our most popular industrial generator.');

////////////////////  END OF CUSTOMIZATION AREA  ///////////////////

// preload images that are to appear in tooltip
// from arrays above
if (document.images) {
	var theImgs = new Array();
	for (var i=0; i<messages.length; i++) {
  	theImgs[i] = new Image();
		theImgs[i].src = messages[i][0];
  }
}

// to layout image and text, 2-row table, image centered in top cell
// these go in var tip in doTooltip function
// startStr goes before image, midStr goes between image and text
var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
var midStr = '" border="0"></td></tr><tr><td valign="top">';
var endStr = '</td></tr></table>';

////////////////////////////////////////////////////////////
//  initTip	- initialization for tooltip.
//		Global variables for tooltip. 
//		Set styles
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.lineHeight = tipLineHeight;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		document.onmousemove = trackMouse;
	}
}

window.onload = initTip;

/////////////////////////////////////////////////
//  doTooltip function
//			Assembles content for tooltip and writes 
//			it to tipDiv
/////////////////////////////////////////////////
var t1,t2;	// for setTimeouts
var tipOn = false;	// check if over tooltip link
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	// set colors if included in messages array
	if (messages[num][2])	var curBgColor = messages[num][2];
	else curBgColor = tipBgColor;
	if (messages[num][3])	var curFontColor = messages[num][3];
	else curFontColor = tipFontColor;
	if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; line-height:' + tipLineHeight + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr;
		tipcss.backgroundColor = curBgColor;
	 	tooltip.innerHTML = tip;
	}
	if (!tipFollowMouse) positionTip(evt);
	else t1=setTimeout("tipcss.visibility='visible'",100);
}

var mouseX, mouseY;
function trackMouse(evt) {
	standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
	mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
	mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	if (tipOn) positionTip(evt);
}

/////////////////////////////////////////////////////////////
//  positionTip function
//		If tipFollowMouse set false, so trackMouse function
//		not being used, get position of mouseover event.
//		Calculations use mouseover event position, 
//		offset amounts and tooltip width to position
//		tooltip within window.
/////////////////////////////////////////////////////////////
function positionTip(evt) {
	if (!tipFollowMouse) {
		standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
		mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
		mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = mouseX-(tpWd+offX)+"px";
	else tipcss.left = mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = winHt-(tpHt+offY)+"px";
	else tipcss.top = mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

document.write('<div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>')

