
var dom = (document.getElementById) ? true : false;
var ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
var ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
var ns4 = (document.layers && !dom) ? true : false;
var ie4 = (document.all && !dom) ? true : false;
var nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix for ns4
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// 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= 160;
var offX= 20;	// how far from mouse to show tip
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "8pt";
// 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= "#000000";
var tipBgColor= "#DDECFF"; 
var tipBorderColor= "#000080";
var tipBorderWidth= 3;
var tipBorderStyle= "ridge";
var tipPadding= 4;

// 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('Images/Hockey/Hockey01(A).jpg','<b>Hosie Street Hockey 2003 - Frank & Liam.</b>',"#FFFFFF");
messages[1] = new Array('Images/Hockey/Hockey02(A).jpg','<b>Hosie Street Hockey 2003 - Rodd, Frank, & Unknown.</b>',"#FFFFFF");
messages[2] = new Array('Images/Hockey/Hockey03(A).jpg','<b>Hosie Street Hockey 2003 - Mom & Daughters.</b>',"#FFFFFF");
messages[3] = new Array('Images/Hockey/Hockey04(A).jpg','<b>Hosie Street Hockey 2003 - The Whole Gang.</b>',"#FFFFFF");
messages[4] = new Array('Images/Hockey/Hockey05(A).jpg','<b>Hosie Street Hockey 2003 - What Its About.</b>',"#FFFFFF");
messages[5] = new Array('Images/Hockey/Hockey06(A).jpg','<b>Hosie Street Hockey 2003 - Kids At Rest (for a minute).</b>',"#FFFFFF");
messages[6] = new Array('Images/Hockey/Hockey07(A).jpg','<b>Hosie Street Hockey 2003 - Dale and the Guest Of Honor.</b>',"#FFFFFF");
messages[7] = new Array('Images/Hockey/Hockey08(A).jpg','<b>Hosie Street Hockey 2003 - Group Photo Action.</b>',"#FFFFFF");
messages[8] = new Array('Images/Hockey/Hockey09(A).jpg','<b>Hosie Street Hockey 2003 - Its The Liam Team.</b>',"#FFFFFF");
messages[9] = new Array('Images/Hockey/Hockey10(A).jpg','<b>Hosie Street Hockey 2003 - Guarding The Boards.</b>',"#FFFFFF");

messages[10] = new Array('Images/Halloween/Halloween07-A.jpg','<b>Hosie Street Hockey 2003 - Even SpartaCat Showed Up.</b>',"#FFFFFF");
messages[11] = new Array('Images/Halloween/Halloween08-A.jpg','<b>Hosie Street Hockey 2003 - Did You Know We Sell Body Parts.</b>',"#FFFFFF");
messages[12] = new Array('Images/Halloween/Halloween09-A.jpg','<b>Hosie Street Hockey 2003 - Off With His Head...No Wait...Too Late.</b>',"#FFFFFF");

messages[21] = new Array('Images/Halloween/Halloween01-A.jpg','<b>Halloween Kids Party 2002 - Everybodys Clowning Around.</b>',"#FFFFFF");
messages[22] = new Array('Images/Halloween/Halloween02-A.jpg','<b>Halloween Kids Party 2002 - The GrueSome FiveSome.</b>',"#FFFFFF");
messages[23] = new Array('Images/Halloween/Halloween03-A.jpg','<b>Halloween Kids Party 2002 - Beware Clowns with Ballons.</b>',"#FFFFFF");
messages[24] = new Array('Images/Halloween/Halloween04-A.jpg','<b>Halloween Kids Party 2002 - The Party is a Huge Success.</b>',"#FFFFFF");
messages[25] = new Array('Images/Halloween/Halloween05-A.jpg','<b>Halloween Kids Party 2002 - Anybody Need A Skeleton In Their Closet.</b>',"#FFFFFF");
messages[26] = new Array('Images/Halloween/Halloween06-A.jpg','<b>Halloween Kids Party 2002 - Whats A Party Without Injuries.</b>',"#FFFFFF");
messages[27] = new Array('Images/Halloween/Halloween10-A.jpg','<b>Halloween Kids Party 2002 - Clowns and Kids Make The Party.</b>',"#FFFFFF");

messages[13] = new Array('Images/GolfTour/GolfTour01-A.jpg','<b>Hosie Golf Tournament 2003 - Rodd, Chess and Friend.</b>',"#FFFFFF");
messages[14] = new Array('Images/GolfTour/GolfTour02-A.jpg','<b>Hosie Golf Tournament 2003 - Bets On Favorite Anyone.</b>',"#FFFFFF");
messages[15] = new Array('Images/GolfTour/GolfTour03-A.jpg','<b>Hosie Golf Tournament 2003 - Lucky Dog.... I Mean Cat.</b>',"#FFFFFF");
messages[16] = new Array('Images/GolfTour/GolfTour04-A.jpg','<b>Hosie Golf Tournament 2003 - The Dinner and Auction That Night.</b>',"#FFFFFF");
messages[17] = new Array('Images/GolfTour/GolfTour05-A.jpg','<b>Hosie Golf Tournament 2003 - Just A Couple Of The Boys...</b>',"#FFFFFF");
messages[35] = new Array('Images/GolfTour/GolfTour06-A.jpg','<b>Hosie Golf Tournament 2003 - Hosie Sales In Action.. OR ACCIDENT.</b>',"#FFFFFF");
messages[36] = new Array('Images/GolfTour/GolfTour07-A.jpg','<b>Hosie Golf Tournament 2003 - Just A Couple More Of The Boys...</b>',"#FFFFFF");
messages[37] = new Array('Images/GolfTour/GolfTour08-A.jpg','<b>Hosie Golf Tournament 2003 - PC, Rodd, and Max At Dinner.</b>',"#FFFFFF");
messages[38] = new Array('Images/GolfTour/GolfTour09-A.jpg','<b>Hosie Golf Tournament 2003 - Hooters Girls Registration Table... Yaaaa.</b>',"#FFFFFF");
messages[39] = new Array('Images/GolfTour/GolfTour10-A.jpg','<b>Hosie Golf Tournament 2003 - Lynx Mascot and Hosie Car.</b>',"#FFFFFF");
messages[40] = new Array('Images/GolfTour/GolfTour11-A.jpg','<b>Hosie Golf Tournament 2003 - Where are The Hooters Girls!!!.</b>',"#FFFFFF");
messages[41] = new Array('Images/GolfTour/GolfTour12-A.jpg','<b>Hosie Golf Tournament 2003 - Frank Mixing It Up with The Opposition.</b>',"#FFFFFF");
messages[42] = new Array('Images/GolfTour/GolfTour13-A.jpg','<b>Hosie Golf Tournament 2003 - Mark Making Himself Comfortable.</b>',"#FFFFFF");
messages[43] = new Array('Images/GolfTour/GolfTour14-A.jpg','<b>Hosie Golf Tournament 2003 - Its The Form That Makes The Master.</b>',"#FFFFFF");
messages[44] = new Array('Images/GolfTour/GolfTour15-A.jpg','<b>Hosie Golf Tournament 2003 - Aaaahhh.. The Pause That Refreshes.. Just Kidding.</b>',"#FFFFFF");
messages[45] = new Array('Images/GolfTour/GolfTour16-A.jpg','<b>Hosie Golf Tournament 2003 - Like I Said.. Form Makes The Master.</b>',"#FFFFFF");
messages[46] = new Array('Images/GolfTour/GolfTour17-A.jpg','<b>Hosie Golf Tournament 2003 - The Final Hole.. 18 Of The Best.</b>',"#FFFFFF");
messages[47] = new Array('Images/GolfTour/GolfTour18-A.jpg','<b>Hosie Golf Tournament 2003 - Frank Makes A New Friend.. Max Keeping.</b>',"#FFFFFF");
messages[48] = new Array('Images/GolfTour/GolfTour19-A.jpg','<b>Hosie Golf Tournament 2003 - The Day Begins with Hosie & Brown.</b>',"#FFFFFF");
messages[49] = new Array('Images/GolfTour/GolfTour20-A.jpg','<b>Hosie Golf Tournament 2003 - Mark Can Really Hit That Ball.</b>',"#FFFFFF");
messages[50] = new Array('Images/GolfTour/GolfTour21-A.jpg','<b>Hosie Golf Tournament 2003 - Hit The Ball.. Do Not Kill It.</b>',"#FFFFFF");
messages[51] = new Array('Images/GolfTour/GolfTour22-A.jpg','<b>Hosie Golf Tournament 2003 - Where Do You Think Your Going.</b>',"#FFFFFF");
messages[52] = new Array('Images/GolfTour/GolfTour23-A.jpg','<b>Hosie Golf Tournament 2003 - What Are You Going To Do Now.</b>',"#FFFFFF");
messages[53] = new Array('Images/GolfTour/GolfTour24-A.jpg','<b>Hosie Golf Tournament 2003 - Every Great Golf Game Begins With A Single Swing.</b>',"#FFFFFF");
messages[54] = new Array('Images/GolfTour/GolfTour25-A.jpg','<b>Hosie Golf Tournament 2003 - Rodd, Maxx, and Friend.</b>',"#FFFFFF");

messages[18] = new Array('Images/Esso/EssoParty01-A.jpg','<b>Esso Express Party 2002 - The Gangs All Here.</b>',"#FFFFFF");
messages[19] = new Array('Images/Esso/EssoParty02-A.jpg','<b>Esso Express Party 2002 - Detroit Gasket Car (Front).</b>',"#FFFFFF");
messages[20] = new Array('Images/Esso/EssoParty03-A.jpg','<b>Esso Express Party 2002 - Full Service Esso Tent Complete With BBQ.</b>',"#FFFFFF");
messages[28] = new Array('Images/Esso/EssoParty04-A.jpg','<b>Esso Express Party 2002 - Esso Mascot Blowin Kisses ?!?.</b>',"#FFFFFF");
messages[29] = new Array('Images/Esso/EssoParty05-A.jpg','<b>Esso Express Party 2002 - Rodd In The Hosie And Brown Pick Up.</b>',"#FFFFFF");
messages[30] = new Array('Images/Esso/EssoParty06-A.jpg','<b>Esso Express Party 2002 - Detroit Gasket Car (Side).</b>',"#FFFFFF");
messages[31] = new Array('Images/Esso/EssoParty07-A.jpg','<b>Esso Express Party 2002 - Detroit Gasket Car (Rear).</b>',"#FFFFFF");
messages[32] = new Array('Images/Esso/EssoParty08-A.jpg','<b>Esso Express Party 2002 - Detroit Gasket - Truck And Trailer.</b>',"#FFFFFF");
messages[33] = new Array('Images/Esso/EssoParty09-A.jpg','<b>Esso Express Party 2002 - The Turpin Cascar (Front).</b>',"#FFFFFF");
messages[34] = new Array('Images/Esso/EssoParty10-A.jpg','<b>Esso Express Party 2002 - The Turpin Cascar (Rear).</b>',"#FFFFFF");

////////////////////  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 for all but ns4. 
//		Set up mousemove capture if tipFollowMouse set true.
////////////////////////////////////////////////////////////
var tooltip, tipcss;
function initTip() {
	if (nodyn) return;
	tooltip = (ns4)? document.tipDiv.document: (ie4)? document.all['tipDiv']: (ie5||ns5)? document.getElementById('tipDiv'): null;
	tipcss = (ns4)? document.tipDiv: tooltip.style;
	if (ie4||ie5||ns5) {	// ns4 would lose all this on rewrites
		tipcss.width = tipWidth+"px";
		tipcss.fontFamily = tipFontFamily;
		tipcss.fontSize = tipFontSize;
		tipcss.color = tipFontColor;
		tipcss.backgroundColor = tipBgColor;
		tipcss.borderColor = tipBorderColor;
		tipcss.borderWidth = tipBorderWidth+"px";
		tipcss.padding = tipPadding+"px";
		tipcss.borderStyle = tipBorderStyle;
	}
	if (tooltip&&tipFollowMouse) {
		if (ns4) document.captureEvents(Event.MOUSEMOVE);
		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 (ns4) {
		var tip = '<table bgcolor="' + tipBorderColor + '" width="' + tipWidth + '" cellspacing="0" cellpadding="' + tipBorderWidth + '" border="0"><tr><td><table bgcolor="' + curBgColor + '" width="100%" cellspacing="0" cellpadding="' + tipPadding + '" border="0"><tr><td>'+ startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; color:' + curFontColor + ';">' + messages[num][1] + '</span>' + endStr + '</td></tr></table></td></tr></table>';
		tooltip.write(tip);
		tooltip.close();
	} else if (ie4||ie5||ns5) {
		var tip = startStr + messages[num][0] + midStr + '<span style="font-family:' + tipFontFamily + '; font-size:' + tipFontSize + '; 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) {
	mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.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) {
		mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
		mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	}
	// tooltip width and height
	var tpWd = (ns4)? tooltip.width: (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ns4)? tooltip.height: (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	// document area in view (subtract scrollbar width for ns)
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	// check mouse position against tip and window dimensions
	// and position the tooltip 
	if ((mouseX+offX+tpWd)>winWd) 
		tipcss.left = (ns4)? mouseX-(tpWd+offX): mouseX-(tpWd+offX)+"px";
	else tipcss.left = (ns4)? mouseX+offX: mouseX+offX+"px";
	if ((mouseY+offY+tpHt)>winHt) 
		tipcss.top = (ns4)? winHt-(tpHt+offY): winHt-(tpHt+offY)+"px";
	else tipcss.top = (ns4)? mouseY+offY: mouseY+offY+"px";
	if (!tipFollowMouse) t1=setTimeout("tipcss.visibility='visible'",100);
}

function hideTip() {
	if (!tooltip) return;
	t2=setTimeout("tipcss.visibility='hidden'",100);
	tipOn = false;
}

//-->
