// JavaScript Document
/*===CONTENTS OF pop.js START==========*/
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;
if (nodyn) { event = "nope" }
var tipFollowMouse= true;	
var tipWidth= 560;
var offX= 20;
var offY= 12; 
var tipFontFamily= "Verdana, arial, helvetica, sans-serif";
var tipFontSize= "10pt";
var tipFontColor= "#000000";
var tipBgColor= "#ffffff"; 
var tipBorderColor= "#cc3333";
var tipBorderWidth= 2;
var tipBorderStyle= "ridge";
var tipPadding= 10;
var messages = new Array();
messages[0] = new Array('ac/multifunction.jpg','MC-1200 Multifunction Calibrator',"#ffffff");
messages[1] = new Array('ac/documenting-multifunction-calibrators.png','DMC-1400 Documenting Multifunction Calibrator',"#ffffff");
messages[2] = new Array('ac/communicators.png','MasterCal 990 HART Communicator',"#ffffff");
messages[3] = new Array('ac/process-calibrators.png','MC-1000 Process Calibrator',"#ffffff");
messages[4] = new Array('ac/rtd-calibrators.png','RTD Thermocouple Calibrator',"#ffffff");
messages[5] = new Array('ac/test.png','TC-100 Thermocouple Calibrator',"#ffffff");
messages[6] = new Array('ac/current-loop-calibrators.png','LC-100 Current Loop Calibrator',"#ffffff");
messages[7] = new Array('ac/loop-calibrators.png','MS-420 Loop Calibrator',"#ffffff");
messages[8] = new Array('ac/hydraulics.png','MECP10000 Hydraulic Pump',"#ffffff");
messages[9] = new Array('ac/pneumatics.png','MECP100 Pneumatic Pumps',"#ffffff");
messages[10] = new Array('ac/pressure-pumps.png','MECP500 Pressure Pump',"#ffffff");
messages[11] = new Array('ac/volt.png','IVC-222HPII Voltage Current Calibrator',"#ffffff");
messages[12] = new Array('ac/sensors.png','M2000A Lab Calibrator',"#ffffff");
messages[13] = new Array('ac/labs.png','3001 Precision Lab Calibrator',"#ffffff");
messages[14] = new Array('ac/linearity.png','MECP 24-1000 Linear Power Supply',"#ffffff");
messages[15] = new Array('ac/power.png','MECPS Loop Power Supplies',"#ffffff");
messages[16] = new Array('ac/process-power-packs.png','24.75STS-3 Process Power Pack',"#ffffff");
messages[17] = new Array('ac/ac.png','BetaGauge 311 Advanced Pressure Calibrator',"#ffffff");
messages[18] = new Array('ac/digital-pressure-calibrators.png','DPC-30 Digital Pressure Calibrator',"#ffffff");
messages[19] = new Array('ac/digital-pressure-gauges.png','BetaGauge PIR Digital Pressure Gauge',"#ffffff");
messages[20] = new Array('ac/module.png','BetaGauge II Modular Pressure Calibrator',"#ffffff")
messages[21] = new Array('ac/pressure-calibration-gauges.png','BetaGauge PI Pressure Calibration Test Gauge',"#ffffff")
messages[22] = new Array('ac/single-sensor-pressure-calibrators.png','BetaGauge 301 Single Sensor Pressure Calibrator',"#ffffff")
messages[23] = new Array('ac/tester.png','BetaGauge 321 Temperature Pressure Calibrator',"#ffffff")
messages[24] = new Array('ac/pressure.png','BetaGauge 330 Hand Held Pressure Calibrator',"#ffffff")
messages[25] = new Array('ac/meters.png','LPM 420 Loop Panel Meter',"#ffffff")
messages[26] = new Array('ac/manometers.png','T-140 Pressure Manometer',"#ffffff")
messages[27] = new Array('ac/indicators.png','LPM 4200 Loop Power Indicator',"#ffffff")
messages[28] = new Array('ac/pressure-modules.png','BetaPort-P Pressure Module',"#ffffff")
messages[29] = new Array('ac/bppa-adapter.jpg','BetaPort-P Adapter',"#ffffff")

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];
  }
}
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>';
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) {
		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;
var t1,t2;
var tipOn = false;
function doTooltip(evt,num) {
	if (!tooltip) return;
	if (t1) clearTimeout(t1);	if (t2) clearTimeout(t2);
	tipOn = true;
	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
	mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
	mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
	if (tipOn) positionTip(evt);
}
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;
	}
	var tpWd = (ie4||ie5)? tooltip.clientWidth: tooltip.offsetWidth;
	var tpHt = (ie4||ie5)? tooltip.clientHeight: tooltip.offsetHeight;
	var winWd = (ns5)? window.innerWidth-20+window.pageXOffset: standardbody.clientWidth+standardbody.scrollLeft;
	var winHt = (ns5)? window.innerHeight-20+window.pageYOffset: standardbody.clientHeight+standardbody.scrollTop;
	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>')
/*===CONTENTS OF pop.js END==========*/