
/***********************************************
* 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= 200;
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= "#FFFFFF"; 
var tipBorderColor= "#000000";
var tipBorderWidth= 3;
var tipBorderStyle= "solid";
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/catalog/TA.jpg','Medium Duty Slider Bed w/ Box Frame  TA',"#FFFFFF");
messages[1] = new Array('images/catalog/TL.jpg','Heavy Duty Slider Bed w/ Box Frame  TL',"#FFFFFF");
messages[2] = new Array('images/catalog/SB.jpg','Medium Duty Slider Bed w/ Channel Frame  SB',"#FFFFFF");
messages[3] = new Array('images/catalog/RB.jpg','Medium Duty Roller Bed w/ Channel Frame  RB',"#FFFFFF");
messages[4] = new Array('images/catalog/TS-1500-100-PM.jpg','Power Belt Curve  TS-1500-100-PM',"#FFFFFF");
messages[5] = new Array('images/catalog/PCA.jpg','Light Duty Low Profile  PCA',"#FFFFFF");
messages[6] = new Array('images/catalog/TR.jpg','Medium Duty Troughed Conveyor  TR',"#FFFFFF");
messages[7] = new Array('images/catalog/CRB.jpg','Troughed Conveyor for Scrap & Recycling  CRB',"#FFFFFF");
messages[8] = new Array('images/catalog/PC.jpg','Cleated Belt Incline w/ Troughed Sides  PC',"#FFFFFF");
messages[9] = new Array('images/catalog/TH.jpg','Troughed Trash Handling Conveyor  TH',"#FFFFFF");
messages[10] = new Array('images/catalog/PSB.jpg','Medium Duty Plastic Belt Conveyor  PSB',"#FFFFFF");
messages[11] = new Array('images/catalog/CCEZ.jpg','M12 & 24 Pack Accumulating Beverage  CCEZ',"#FFFFFF");
messages[12] = new Array('images/catalog/PLEZD.jpg','Heavy Duty Plastic Chain Accumulating  PLEZD',"#FFFFFF");
messages[13] = new Array('images/catalog/SL.jpg','Heavy Duty Horizontal Steel Slat Conveyor  SL',"#FFFFFF");
messages[14] = new Array('images/catalog/PCH.jpg','Medium Duty Piano Hinge Conveyor  PCH',"#FFFFFF");
messages[15] = new Array('images/catalog/TW.jpg','Wire Mesh Belt  TW',"#FFFFFF");
messages[16] = new Array('images/catalog/SBI.jpg','Slider Bed In Channel Frame  SBI',"#FFFFFF");
messages[17] = new Array('images/catalog/RBI.jpg','Roller Bed In Channel Frame  RBI',"#FFFFFF");
messages[18] = new Array('images/catalog/A.jpg','Portable Aluminum Narrow Belt Incline  A',"#FFFFFF");
messages[19] = new Array('images/catalog/R.jpg','Portable Aluminum Folding Belt Incline  R',"#FFFFFF");
messages[20] = new Array('images/catalog/BA.jpg','Portable Folding Booster  BA',"#FFFFFF");
messages[21] = new Array('images/catalog/B.jpg','Portable Folding Booster w/ Cleated Belt  B',"#FFFFFF");
messages[22] = new Array('images/catalog/C.jpg','Cleated Belt Incline  C',"#FFFFFF");
messages[23] = new Array('images/catalog/PC.jpg','Cleated Belt Incline w/ Troughed Sides  PC',"#FFFFFF");
messages[24] = new Array('images/catalog/PCX.jpg','Low Profile Infeed w/ Cleated Belt Incline  PCX',"#FFFFFF");
messages[25] = new Array('images/catalog/PCH.jpg','Medium Duty Piano Hinge Conveyor  PCH',"#FFFFFF");
messages[26] = new Array('images/catalog/PCA.jpg','Light Duty Low Profile Conveyor  PCA',"#FFFFFF");
messages[27] = new Array('images/catalog/blank.jpg','ProLogix&reg; Sorter Control System',"#FFFFFF");
messages[28] = new Array('images/catalog/blank.jpg','GapLogix&reg; Gap Control System',"#FFFFFF");
messages[29] = new Array('images/catalog/blank.jpg','ZipLogix&reg; Merge Control System',"#FFFFFF");
messages[30] = new Array('images/catalog/blank.jpg','Plug-N-Go&reg; Cabling',"#FFFFFF");
messages[31] = new Array('images/catalog/blank.jpg','Small Item - High Speed Sliding Shoe Sorter  Prosort 131',"#FFFFFF");
messages[32] = new Array('images/catalog/blank.jpg','High Speed Sliding Shoe Sorter  Prosort 421',"#FFFFFF");
messages[33] = new Array('images/catalog/SC1.jpg','Belt Conveyor w/ Integrated Diverters  Prosort SC1',"#FFFFFF");
messages[34] = new Array('images/catalog/SRT-MRT.jpg','Right Angle Pop-up Diverter  SRT/MRT',"#FFFFFF");
messages[35] = new Array('images/catalog/VIPERSORT.jpg','Low Profile Item Sweep Sorter  Vipersort',"#FFFFFF");
messages[36] = new Array('images/catalog/blank.jpg','Medium Duty Pneumatic Pusher  Prosort 50/50',"#FFFFFF");
messages[37] = new Array('images/catalog/GAPPER.jpg','Gapper',"#FFFFFF");
messages[38] = new Array('images/catalog/blank.jpg','2 to 1 Combiner',"#FFFFFF");
messages[39] = new Array('images/catalog/blank.jpg','3 to 1 Combiner',"#FFFFFF");
messages[40] = new Array('images/catalog/blank.jpg','Sawtooth Merge',"#FFFFFF");
messages[41] = new Array('images/catalog/blank.jpg','Fixed Plow',"#FFFFFF");
messages[42] = new Array('images/catalog/blank.jpg','Powered Plow',"#FFFFFF");
messages[43] = new Array('images/catalog/190-LR.jpg','Flat Belt Driven Roller  190-LR',"#FFFFFF");
messages[44] = new Array('images/catalog/138-NSP.jpg','Light Duty Line Shaft Driven Roller  138-NSP',"#FFFFFF");
messages[45] = new Array('images/catalog/190-NSP.jpg','Medium Duty Line Shaft Driven Roller  190-NSP',"#FFFFFF");
messages[46] = new Array('images/catalog/199-CRR.jpg','Small Diameter Chain Driven Roll-to-Roll  199-CRR',"#FFFFFF");
messages[47] = new Array('images/catalog/25-CRR.jpg','Heavy Duty Chain Driven Roll-to-Roll  25-CRR',"#FFFFFF");
messages[48] = new Array('images/catalog/36-CRRH.jpg','Extreme Duty Chain Driven Roll-to-Roll  36-CRRH',"#FFFFFF");
messages[49] = new Array('images/catalog/190-ACZ.jpg','Flat Belt Driven w/ Adjustable Back Pressure  190-ACZ',"#FFFFFF");
messages[50] = new Array('images/catalog/190-ACC.jpg','V-Belt Driven w/ Adjustable Back Pressure  190-ACC',"#FFFFFF");
messages[51] = new Array('images/catalog/138-ACC.jpg','Light Duty V-Belt w/ Adjustable Back Pressure  138-ACC',"#FFFFFF");
messages[52] = new Array('images/catalog/ABEZ.jpg','Flat Belt Driven Zero Pressure Accumulation  ABEZ',"#FFFFFF");
messages[53] = new Array('images/catalog/25-LREZ.jpg','Heavy Duty Flat Belt Driven Zero Pressure  25-LREZ',"#FFFFFF");
messages[54] = new Array('images/catalog/138-NSPEZ.jpg','Light Duty Line Shaft Driven Zero Pressure  138-NSPEZ',"#FFFFFF");
messages[55] = new Array('images/catalog/190-NSPEZ.jpg','Medium Duty Line Shaft Driven Zero Pressure  190-NSPEZ',"#FFFFFF");
messages[56] = new Array('images/catalog/199-CREZD.jpg','Small Diameter Accumulating Chain Driven Roll-to-Roll  199-CREZD',"#FFFFFF");
messages[57] = new Array('images/catalog/25-CREZD.jpg','Heavy Duty Accumulating Chain Driven Roll-to-Roll  25/26-CREZD',"#FFFFFF");
messages[58] = new Array('images/catalog/36-CREZD.jpg','Extreme Duty Accumulating Chain Driven Roll-to-Roll  36-CREZD',"#FFFFFF");
messages[59] = new Array('images/catalog/blank.jpg','24 Volt Accumulating Chain Driven Roller  190-E24CDEZ',"#FFFFFF");
messages[60] = new Array('images/catalog/DCEZ-60.jpg','Accumulating Multi-Strand Roller Chain  DCEZ-60',"#FFFFFF");
messages[61] = new Array('images/catalog/199-CRR.jpg','Small Diameter Chain Driven Roll-to-Roll  199-CRR',"#FFFFFF");
messages[62] = new Array('images/catalog/199-CREZD.jpg','Small Diameter Accumulating Chain Driven Roll-to-Roll  199-CREZD',"#FFFFFF");
messages[63] = new Array('images/catalog/25-CRR.jpg','Heavy Duty Chain Driven Roll-to-Roll  25-CRR',"#FFFFFF");
messages[64] = new Array('images/catalog/25-CREZD.jpg','Heavy Duty Accumulating Chain Driven Roll-to-Roll  25/26 CREZD',"#FFFFFF");
messages[65] = new Array('images/catalog/36-CRRH.jpg','Extreme Duty Chain Driven Roll-to-Roll  36-CRRH',"#FFFFFF");
messages[66] = new Array('images/catalog/36-CREZD.jpg','Extreme Duty Accumulating Chain Driven Roll-to-Roll  36-CREZD',"#FFFFFF");
messages[67] = new Array('images/catalog/blank.jpg','24 Volt Chain Driven Roller  190-E24CD',"#FFFFFF");
messages[68] = new Array('images/catalog/blank.jpg','24 Volt Accumulating Chain Driven Roller  190-E24CDEZ',"#FFFFFF");
messages[69] = new Array('images/catalog/190-E24.jpg','24 Volt Direct Drive Roller  190-E24',"#FFFFFF");
messages[70] = new Array('images/catalog/190-E24-EZ.jpg','24 Volt Accumulating Direct Drive Roller  190-E24-EZ',"#FFFFFF");
messages[71] = new Array('images/catalog/blank.jpg','24 Volt Chain Driven Roller  190-E24CD',"#FFFFFF");
messages[72] = new Array('images/catalog/blank.jpg','24 Volt Accumulating Chain Driven Roller  E24CDEZ',"#FFFFFF");
messages[73] = new Array('images/catalog/blank.jpg','24 Volt Motor Driven Roller  190-PR',"#FFFFFF");
messages[74] = new Array('images/catalog/blank.jpg','24 Volt Accumulating Motor Driven Roller  190-PREZ',"#FFFFFF");
messages[75] = new Array('images/catalog/DC-60.jpg','Multi-Strand Roller Chain  DC-60',"#FFFFFF");
messages[76] = new Array('images/catalog/DCEZ-60.jpg','Accumulating Multi-Strand Roller Chain  DCEZ-60',"#FFFFFF");
messages[77] = new Array('images/catalog/SSR-SAR.jpg','1-3/8" Diameter Gravity Roller  SSR/SAR',"#FFFFFF");
messages[78] = new Array('images/catalog/19-SR.jpg','1.9 / 2.0" Diameter Gravity Roller  19-SR',"#FFFFFF");
messages[79] = new Array('images/catalog/25-26-SR.jpg','2.5 / 2.6" Diameter Gravity Roller  2-1/2-SR',"#FFFFFF");
messages[80] = new Array('images/catalog/35-36-SR.jpg','3.5" Diameter Gravity Roller  3-1/2-SR',"#FFFFFF");
messages[81] = new Array('images/catalog/SKATEWHEEL.jpg','Skatewheel Conveyor',"#FFFFFF");
messages[82] = new Array('images/catalog/blank.jpg','Flexable / Extendable Skatewheel Roller  FX-200',"#FFFFFF");
messages[83] = new Array('images/catalog/RAILS.jpg','Skatewheel Flow Rails',"#FFFFFF");
messages[84] = new Array('images/catalog/BTT-25.jpg','Light Duty Frame - Ball Transfer Table  BTT-25',"#FFFFFF");
messages[85] = new Array('images/catalog/BTT-35.jpg','Medium Duty Frame - Ball Transfer Table  BTT-35',"#FFFFFF");
messages[86] = new Array('../images/paint-example-green.jpg','<div style="text-align: center;"><strong>Standard Green</strong><br>Powder Paint Coating<br>(24-Hour Shipping)</div>');
messages[87] = new Array('../images/paint-example-blue.jpg','<div style="text-align: center;"><strong>Standard Blue</strong><br>Powder Paint Coating<br>(1-Week Shipping)</div>');
messages[88] = new Array('../images/paint-example-black.jpg','<div style="text-align: center;"><strong>Standard Black</strong><br>Powder Paint Coating<br>(1-Week Shipping)</div>');
messages[89] = new Array('../images/paint-example-gray.jpg','<div style="text-align: center;"><strong>Standard Gray</strong><br>Powder Paint Coating<br>(1-Week Shipping)</div>');
messages[90] = new Array('../images/paint-example-beige.jpg','<div style="text-align: center;"><strong>Standard Beige</strong><br>Powder Paint Coating<br>(1-Week Shipping)</div>');
messages[91] = new Array('../images/paint-example-white.jpg','<div style="text-align: center;"><strong>Standard White</strong><br>Powder Paint Coating<br>(1-Week Shipping)</div>');
////////////////////  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.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 + '; 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>')
