/***********************************************
* 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= 500;
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('../gallery/AeroClave-747-2.jpg','AeroClave decontaminating a 747','black','white');
messages[1] = new Array('../gallery/Aeroclave-Unit-015.jpg','AeroClave aircraft decontamination','black','white');
messages[2] = new Array('../gallery/Aeroclave-Unit-021.jpg','AeroClave aircraft decontamination','black','white');
messages[3] = new Array('../gallery/Aeroclave-Unit-028.jpg','AeroClave aircraft decontamination','black','white');
messages[4] = new Array('../gallery/Aeroclave-Unit-029.jpg','AeroClave aircraft decontamination','black','white');
messages[5] = new Array('../gallery/Aeroclave-Unit-034.jpg','AeroClave aircraft decontamination','black','white');
messages[6] = new Array('../gallery/Aeroclave-Unit-054.jpg','AeroClave aircraft decontamination','black','white');
messages[7] = new Array('../gallery/Aeroclave-Unit-056.jpg','AeroClave aircraft decontamination','black','white');
messages[8] = new Array('../gallery/DSC05215.jpg','Model of AeroClave aircraft decontamination','black','white');
messages[9] = new Array('../gallery/DSC05221.jpg','Model of AeroClave aircraft decontamination','black','white');
messages[10] = new Array('../gallery/P3090085.jpg','AeroClave aircraft decontamination','black','white');

messages[11] = new Array('../gallery/Drive-thru-1.jpg','AeroClave drive-thru vehicle decontamination facilty in Orlando, Florida','black','white');
messages[12] = new Array('../gallery/P1230014.jpg','AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[13] = new Array('../gallery/Drive-thru-2.jpg','School bus inside the AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[14] = new Array('../gallery/P2190029.jpg','Interior of a school bus inside the AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[15] = new Array('../gallery/P2190027.jpg','Interior of an ambulance inside the AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[16] = new Array('../gallery/drive_through.jpg','Illustration of an AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[17] = new Array('../gallery/Drive-thru-3.jpg','Ambulance inside the AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[18] = new Array('../gallery/DriveThru2.jpg','Illustration of an AeroClave drive-thru vehicle decontamination facilty','black','white');
messages[19] = new Array('../gallery/Drive-thru-2-2.jpg','Illustration of an AeroClave drive-thru vehicle decontamination facilty','black','white');

messages[20] = new Array('../gallery/Rail-2.jpg','AeroClave railcar decontamination','black','white');
messages[21] = new Array('../gallery/Rail-3.jpg','AeroClave unit connected to railcar for decontamination','black','white');
messages[22] = new Array('../gallery/Rail-4.jpg','Interior of decontaminated railcar','black','white');
messages[23] = new Array('../gallery/Rail-1.jpg','AeroClave unit alongside railcar','black','white');

messages[24] = new Array('../gallery/DSC_0085.jpg','The mobile AeroClave unit','black','white');
messages[25] = new Array('../gallery/DSC_0104.jpg','AeroClave building decontamination','black','white');
messages[26] = new Array('../gallery/DSC_0107.jpg','AeroClave building decontamination','black','white');
messages[27] = new Array('../gallery/P3100063.jpg','AeroClave connected to building for decontamination','black','white');
messages[28] = new Array('../gallery/Building2-1.jpg','Illustration of AeroClave building decontamination','black','white');

messages[29] = new Array('../gallery/DSC_0111.jpg','AeroClave emergency shelter','black','white');
messages[30] = new Array('../gallery/DSC_0124.jpg','AeroClave emergency shelter','black','white');
messages[31] = new Array('../gallery/Aeroclave-Unit-002.jpg','AeroClave satellite uplink for emergency communications','black','white');
messages[32] = new Array('../gallery/emergency1.jpg','Illustration of AeroClave emergency shelter and decon','black','white');
messages[33] = new Array('../gallery/emergency2.jpg','Illustration of AeroClave emergency shelter support','black','white');

messages[34] = new Array('../gallery/StLukes2.jpg','AeroClave unit in position for building restoration','black','white');
messages[35] = new Array('../gallery/DSC_0130.jpg','AeroClave unit in position for building restoration','black','white');
messages[36] = new Array('../gallery/DSC_0131.jpg','AeroClave unit coonecting to building to provide heat and air','black','white');

messages[37] = new Array('../gallery/DSC_0091.jpg','AeroClave unit','black','white');
messages[38] = new Array('../gallery/DSC_0095.jpg','AeroClave unit','black','white');
messages[39] = new Array('../gallery/newsRelease2.jpg','Dr. Ron Brown discusses AeroClave with former Florida Governor Bush','black','white');
messages[40] = new Array('../gallery/Aeroclave-Unit-043.jpg','AeroClave controls','black','white');
messages[41] = new Array('../gallery/BUS-2-closeup.jpg','Dispensing VHP','black','white');
messages[42] = new Array('../gallery/capabilities3.jpg','AeroClave emergency power','black','white');
messages[43] = new Array('../gallery/DSC01810.jpg','AeroClave emergency power','black','white');
messages[44] = new Array('../gallery/Photo_110205_008.jpg','AeroClave unit lifted onto truck bed for transportation','black','white');
messages[45] = new Array('../gallery/Photo_110205_009.jpg','AeroClave unit lifted onto truck bed for transportation','black','white');
messages[46] = new Array('../gallery/setup1.jpg','AeroClave unit','black','white');

messages[47] = new Array('../gallery/military1.jpg','Military Applications','black','white');
messages[48] = new Array('../gallery/military2.jpg','Military Applications','black','white');
messages[49] = new Array('../gallery/military3.jpg','Military Applications','black','white');

messages[50] = new Array('../gallery/DSC_0141.jpg','AeroClave proviing climate control for hospital surge capacity','black','white');
messages[51] = new Array('../gallery/DSC_0143.jpg','AeroClave proviing climate control for hospital surge capacity','black','white');

messages[52] = new Array('../gallery/ACfacility-9.jpg','The WPPD Mobile Command Center arrives to be decontaminated at the AeroClave P.A.D.S. facility','black','white');
messages[53] = new Array('../gallery/ACfacility-18.jpg','AeroClave P.A.D.S. decontaminating the WPPD Mobile Command Center','black','white');
messages[54] = new Array('../gallery/ACfacility-35.jpg','Special tactical vehicle to be decontaminated','black','white');
messages[55] = new Array('../gallery/ACfacility-47.jpg','AeroClave P.A.D.S. treatment area is over 56 feet in length','black','white');
messages[56] = new Array('../gallery/Engine.jpg','Winter Park Fire Department engine after being AeroClaved','black','white');
messages[57] = new Array('../gallery/IMG_1665.jpg','Winter Park Fire Department Fire-Rescue 64 pulls in for routine decontamination','black','white');
messages[58] = new Array('../gallery/IMG_1688.jpg','AeroClave P.A.D.S. treatment area is a 12,000 cubic foot chamber','black','white');
messages[59] = new Array('../gallery/IMG_1717.jpg','All doors and outside compartments are opened before procedure  begins','black','white');
messages[60] = new Array('../gallery/IMG_1777.jpg','Sensors are hung in the vehicle to ensure treatment specifications are met','black','white');
messages[61] = new Array('../gallery/IMG_1784.jpg','Two WPFD Fire-Rescue units fit easily in the treatment bay','black','white');
messages[62] = new Array('../gallery/IMG_1866.jpg','This Rescue unit is back in action in less than 90 minutes','black','white');

messages[63] = new Array('../gallery/ACRosie-1.jpg','Technician monitoring AeroClave RDS with tablet PC','black','white');
messages[64] = new Array('../gallery/ACRosie-8.jpg','AeroClave RDS treats a 6,00 cubic foot room','black','white');
messages[65] = new Array('../gallery/ACRosie-9.jpg','The AeroClave RDS is mounted on a motorized cart for ease of movement','black','white');
messages[66] = new Array('../gallery/ACRosie-10.jpg','Technician positioning the AeroClave RDS with the touch of a button','black','white');
messages[67] = new Array('../gallery/ACRosie-11.jpg','Technician configuring the AeroClave RDS on-board computer','black','white');
messages[68] = new Array('../gallery/ACRosie-12.jpg','Configuring the AeroClave RDS on-board computer','black','white');
messages[69] = new Array('../gallery/ACRosie-13.jpg','AeroClave RDS stainless steel construction and components','black','white');


////////////////////  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) {
		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>')






