/***********************************************
* 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= 260;
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= "#514F4F";
var tipBgColor= "#DDECFF"; 
var tipBorderColor= "#7B7979";
var tipBorderWidth= 1;
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('', '<span style="color:#1B9DD8">Zetasizer APS</span><br/><br/>The Zetasizer APS is the most advanced dynamic light scattering system available for investigating protein behaviour in the biotechnology and pharmaceutical industries. It enables accurate, reliable measurement of protein stability over a wide range of developmental conditions with minimal user intervention.',"#FFFFFF");
messages[1] = new Array('','<span style="color:#1B9DD8">MiniPal 4 Sulfur</span><br/><br/>The MiniPal 4 Sulfur compact spectrometer is designed for accurate and precise petrochemical analysis. Its improved sensitivity and lower limits of detection provide reliable and cost-effective analysis of elements and also help to ensure compliance with environmental regulations, for example legislation to reduce sulphur levels in fuel.',"#FFFFFF");
messages[2] = new Array('','<span style="color:#F29235">LAN-XI</span><br/><br/>The LAN-XI data acquisition hardware provides increased flexibility from a single system for sound and vibration measurement. Used as a stand-alone module or as part of a multi-rack distributed system, LAN-XI can be configured to measure from two to over 1000 channels, depending on the user&rsquo;s requirements.',"#FFFFFF");
messages[3] = new Array('','<span style="color:#F29235">QuantumX</span><br/><br/>QuantumX is the first universal data acquisition instrument with advanced plug and measure technology which enables precise and immediate results, even in difficult conditions. Its compact design allows for centralised or distributed high speed data acquisition for performance testing in development programmes for the automotive, aerospace and railway industries.',"#FFFFFF");
messages[4] = new Array('','<span style="color:#35B5B3">DRT-5500</span><br/><br/>The DRT-5500 Freeness Inline is the fastest, smallest and most flexible drainage rate transmitter on the market. It improves control during refining of the pulp and stabilises the drainage rate, which affects paper properties such as composition and strength. Improved drainage leads to lower energy consumption, reducing costs for pulp and paper manufacturers.',"#FFFFFF");
messages[5] = new Array('','<span style="color:#35B5B3">Series 710e</span><br/><br/>The Series 710e is a new range of on-line gauging systems, featuring high-speed digital processing technology and ethernet connectivity. The systems provide real-time measurement of critical parameters such as coat weight and moisture in the converting and papermaking industries, as well as moisture, fat and protein for a wide range of applications in the food industry.',"#FFFFFF");
messages[6] = new Array('','<span style="color:#CF354A">Universal signal conditioners</span><br/><br/>The new IAMS series of universal signal conditioners feature a detachable LCD display/programming module. This provides simple push-button programming which allows the signal conditioner to be easily set up and can be used to programme multiple units in the same way, greatly reducing configuration time. When not being used for programming, it can remain attached to the unit to indicate the input parameters, in the same way as a panel meter.',"#FFFFFF");
messages[7] = new Array('','<span style="color:#CF354A">G3 Kadet</span><br/><br/>Based on the G3 series, with many of the same capabilities, the G3 Kadet series of touchscreen operator interfaces offer the ideal balance of advanced features and value for process machinery applications.',"#FFFFFF");
messages[8] = new Array('','<span style="color:#6C3E6D">Lasair III</span><br/><br/>With its larger infrared touchscreen, simpler user interface and quieter operation than competitive instruments, the Lasair III portable particle counter also enables faster detection of particle contamination in cleanrooms, improving productivity for customers in the semiconductor and pharmaceutical industries.',"#FFFFFF");
messages[9] = new Array('','<span style="color:#6C3E6D">LDS Test and Measurement</span><br/><br/>In December, we completed the acquisition of the LDS Test and Measurement business. LDS is a market leader in vibration testing equipment for applications in the aerospace, defence, automotive, machinery, electrical and electronics markets. The business is an excellent fit with our Test and Measurement segment, adding capability in complete excitation systems and enabling customers to purchase the complete test system for both structural analysis and vibration testing from a single source to enhance productivity in their research and development cycles.',"#FFFFFF");
messages[10] = new Array('','<span style="color:#6C3E6D">SERVOPRO MultiExact</span><br/><br/>The SERVOPRO MultiExact is an innovative multi-gas analyser specifically developed to meet the latest industry requirements for air separation plants. It provides exceptional levels of accuracy, stability and reliability for all required gas measurements, whilst offering unparalleled ease-of-use and minimising maintenance and cost of ownership.',"#FFFFFF");
messages[11] = new Array('','<span style="color:#F18F1F">nCode acquisition</span><br/><br/>The acquisition of nCode extends our software capabilities for research and development programmes in the automotive and aerospace industries. nCode’s products enable customers to carry out fatigue and durability simulation, providing them with the full testing cycle from virtual to physical test. This helps manufacturers to cut test and prototype cycles, saving time and money and speeding up time to market.',"#FFFFFF");
messages[12] = new Array('','<span style="color:#CF354A">Siemens&rsquo; Machine Vision Business </span><br/><br/>The acquisition of the Siemens Machine Vision Business strengthens the Industrial Controls segment by expanding our range of vision and smart camera products. An industry leader in Automatic Identification and Data Capture (AIDC), the company specialises in machine vision and inspection systems used in a broad array of manufacturing, packaging and traceability applications. The acquisition enables us to provide full track, trace and control solutions, from basic barcode reading to complex inspection and measurement, to leading industrial markets, particularly in the medical, electronics manufacturing and automotive sectors. The acquisition has added ten product lines and over 60 technology patents to the Industrial Controls portfolio.',"#FFFFFF");
messages[13] = new Array('','<span style="color:#6C3E6D">Expedition Greenhouse World </span><br/><br/>As part of their commitment to activities that stimulate interest in the sciences, PANalytical sponsored two students in the 2008 ‘Expedition Greenhouse World’ – an initiative run by Utrecht University in the Netherlands. On the week-long expedition in October to Spitsbergen, Norway, the students visited Longyearbyen glacier where they collected rocks full of 40–60 million year old fossils of the plants that caused the greenhouse effect at that time. They investigated core samples where the ancient carbon layers demonstrated the high concentrations of atmospheric CO2. These climate changes devastated the Palaeocene animal population and, during a trip that took them 4km underground, the students saw 55-million year old footprints made by extinct hippopotamus-like mammals.',"#FFFFFF");
messages[14] = new Array('','The Kinexus rheometer is a new platform for analysing the flow properties of materials. Designed for ease of use, its adaptive intelligence guides users on how to operate the system quickly, leaving them more time to investigate ways in which to characterise and optimise a material’s performance.',"#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%">';
var midStr = '</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>')

