/************************************************************
Dynamic Tooltips 
*  (C) 2001 <a href="/dhtmlcentral/michael_van_ouwerkerk.asp">Michael van Ouwerkerk</a>
*   This script was released at DHTMLCentral.com
*   Visit for more great scripts!
*   This may be used and changed freely as long as this msg is intact!
*   We will also appreciate any links you could give us.
*
*   Made by <a href="/dhtmlcentral/michael_van_ouwerkerk.asp">Michael van Ouwerkerk</a> 
***************************************************************/

function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()


// Variables to set:

messages= new Array()
//Write your descriptions in here.
messages[0] = "Emerson 2003 Annual Report"

messages[1] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Services and Solutions</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Emerson services and solutions improve process project implementation scheduling, increase productivity, and reduce total cost of ownership.</td></tr></table>"
messages[2] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Systems and Software</td></tr><tr><td valign=top bgcolor=#000000 class=ten>DeltaV&reg;, PlantWeb&reg; digital plant architecture, and open, robust software systems enable customers to convert smart-device data into better decisions and dramatically reduced costs.</td></tr></table>"
messages[3] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Measurement</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Emerson's digital instruments provide real-time information and critical analysis when measurement of the pressure, temperature, or flow must be accurate.</td></tr></table>"
messages[4] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Flow Control</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Emerson valves, regulators, actuators, and other precision instruments are the standard for ensuring optimum flow of hundreds of thousands of barrels of crude.</td></tr></table>"


messages[9] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Energy Management</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Customers cut energy costs and create more comfortable environments for employees and shoppers by better managing internal conditions with Emerson energy supervision, service, and leading-technology products.</td></tr></table>"
messages[10] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Refrigeration</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Emerson's Copeland Scroll™ compressors and climate controls provide precise temperature management in the cold-storage room to ensure food quality, cut energy expense, and reduce maintenance.</td></tr></table>"
messages[11] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Remote Monitoring</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Data from air conditioning, lights, refrigerators, and freezers are collected and analyzed from Emerson's central monitoring location via a secure Web site, allowing multiple stores to be monitored from one location.</td></tr></table>"




messages[5] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Service and Site Operations</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Emerson hardware and software solutions provide companies with information and knowledge about system performance, as well as services needed to ensure reliability.</td></tr></table>"

messages[6] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Precision Air</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Emerson systems keep the computing and telecommunications environment within proper temperature and humidity levels to prevent overheating and dangerous disruptions.</td></tr></table>"

messages[7] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Uninterruptible Power</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Seamless switching to reliable AC and DC power backup systems from Emerson provide continuous power during grid interruptions so data networks and telecommunications continue to function.</td></tr></table>"

messages[8] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Power Supplies</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Power conversion and embedded power is available from Emerson for a wide range of telecom, computer, industrial, and other applications.</td></tr></table>"





messages[12] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Power Transmission</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Customers turn to Emerson for standard and customized automation solutions from a single source, including design and engineering.</td></tr></table>"

messages[13] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>AC Motor</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Industry-leading AC and DC motors provide consistent power to conveyors throughout the production line, enhancing productivity.</td></tr></table>"

messages[14] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Drive Control Center</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Drive systems from Emerson are adapted to integrate with other existing automation and factory functions to ensure speed, reliability, and peak performance.</td></tr></table>"

messages[15] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>Servo Motor</td></tr><tr><td valign=top bgcolor=#000000 class=ten>Highly diverse and advanced Emerson synchronous and servo motors enable accurate positioning for precision assembly while minimizing footprint size.</td></tr></table>"




messages[99] = "<table width=150 cellspacing=0 cellpadding=4 border=0><tr><td valign=top bgcolor=#E3B639>---------------</td></tr><tr><td valign=top bgcolor=#000000 class=ten>--------------</td></tr></table>"




messages[101] = "<table width=150 cellspacing=0 cellpadding=4  border=1 bordercolor=#383838 style=border:1px solid><tr><td valign=top bgcolor=#000000 class=ten><b>James G. Berges,</b><br> President</td></tr></table>"

messages[102] = "<table width=150 cellspacing=0 cellpadding=4  border=1 bordercolor=#383838 style=border:1px solid><tr><td valign=top bgcolor=#000000 class=ten><b>Charles A. Peters,</b><br>Senior Executive Vice President</td></tr></table>"

messages[103] = "<table width=150 cellspacing=0 cellpadding=4  border=1 bordercolor=#383838 style=border:1px solid><tr><td valign=top bgcolor=#000000 class=ten><b>Edward L. Monser,</b><br>Chief Operating Officer</td></tr></table>"

messages[104] = "<table width=150 cellspacing=0 cellpadding=4  border=1 bordercolor=#383838 style=border:1px solid><tr><td valign=top bgcolor=#000000 class=ten><b>David N. Farr</b><br>Chief Executive Officer</td></tr></table>"

messages[105] = "<table width=100% cellspacing=0 cellpadding=4 border=1 bordercolor=#383838 style=border:1px solid><tr><td valign=top bgcolor=#000000 class=ten><b>Walter J. Galvin,</b><br>Executive Vice President and Chief Financial Officer</td></tr></table>"


//To have more descriptions just add to the array.

fromX= -65           // How much from the actual mouse X should the description box appear?
fromY= 30           // How much from the actual mouse Y should the description box appear?
ns4center= 0        // Centering the text in ns4 doesn't work with css, use this variable instead... the value is 1 or 0
useFading= 1        // 1 for a fading effect in windows explorer 5+ and all platforms ns6, 0 for no fading effect.
animation= 1        // 1 if you want animation, 0 for no animation.
detectiontype= 0    // 1 for 'smooth' window size detection, 0 for 'flip' window size detection.
delay= 100          // The time before showing the popup, in milliseconds.



/*** There should be no need to change anything beyond this. ***/ 

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

if(document.layers){ //NS4 resize fix.
    scrX= innerWidth; scrY= innerHeight;
    onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} };
}

// object constructor...
function makeTooltip(obj){								
   	this.elm= document.getElementById? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
   	this.css= bw.ns4?this.elm:this.elm.style;
   	this.wref= bw.ns4?this.elm.document:this.elm;
	this.obj= obj+'makeTooltip'; eval(this.obj+'=this');
	this.w= bw.ns4? this.elm.clip.width: this.elm.offsetWidth;
	this.h= bw.ns4? this.elm.clip.height: this.elm.offsetHeight;
};
makeTooltip.prototype.measureIt= function(){
	this.w= bw.ns4? this.elm.clip.width: this.elm.offsetWidth;
	this.h= bw.ns4? this.elm.clip.height: this.elm.offsetHeight;
};
makeTooltip.prototype.writeIt= function(text){
	if (bw.ns4) {this.wref.write(text); this.wref.close()}
	else this.wref.innerHTML= text;
};

// Mousemove detection
var mouseX=0,mouseY=0,setX=0,setY=0;
function getMousemove(e){
	mouseX= (bw.ns4||bw.ns6)? e.pageX: bw.ie&&bw.win&&!bw.ie4? (event.clientX-2)+document.body.scrollLeft : event.clientX+document.body.scrollLeft;
	mouseY= (bw.ns4||bw.ns6)? e.pageY: bw.ie&&bw.win&&!bw.ie4? (event.clientY-2)+document.body.scrollTop : event.clientY+document.body.scrollTop;
	if (isLoaded && hovering && animation) placeIt();
};
function placeIt(){
	if (detectiontype==1) setX= mouseX+fromX+tooltip.w > screenWscrolled ? screenWscrolled-tooltip.w: mouseX+fromX;
	if (detectiontype==1) setY= mouseY+fromY+tooltip.h > screenHscrolled ? screenHscrolled-tooltip.h: mouseY+fromY;
	if (detectiontype==0) setX= mouseX+fromX+tooltip.w > screenWscrolled ? mouseX-fromX-tooltip.w: mouseX+fromX;
	if (detectiontype==0) setY= mouseY+fromY+tooltip.h > screenHscrolled ? mouseY-fromY-tooltip.h: mouseY+fromY;
	if (setX<0) setX= 0;
	if (setY<0) setY= 0;
	tooltip.css.left= setX+px;
	tooltip.css.top= setY+px;
};

// Main popUp function.
var hovering=false, screenWscrolled=0, screenHscrolled=0;
makeTooltip.prototype.showTimer= null;
function popUp(num){
	if(isLoaded){
		clearTimeout(tooltip.popTimer);
		dopopOut();
		if (bw.ns4){
			var text= '<span class="netscape4Style">' + (ns4center?'<center>':"") + messages[num] + (ns4center?'</center>':"") + '</span>';
			tooltip.writeIt(text);
		}
		if (!bw.ns4) tooltip.writeIt(messages[num]);
		screenWscrolled= screenW + (bw.ie?document.body.scrollLeft:pageXOffset);
		screenHscrolled= screenH + (bw.ie?document.body.scrollTop:pageYOffset);
		hovering= true;
		
		/* I'm using a timeout for ie4 here, because it doesn't store the measurements quickly enough. Does anybody know why this happens? */
		if (bw.ie4) setTimeout('tooltip.measureIt(); placeIt();', delay/2);
		else { tooltip.measureIt(); placeIt(); }
		if (useFading) tooltip.showTimer= setTimeout('tooltip.blendIn()', delay);
		if (!useFading) tooltip.showTimer= setTimeout('tooltip.css.visibility="visible"', delay);
    }
};

// Hiding routines
makeTooltip.prototype.popTimer= null;
function popOut(){
	if (isLoaded) tooltip.popTimer= setTimeout('dopopOut()', 30)
};
function dopopOut(){
	hovering= false;
	clearTimeout(tooltip.showTimer);
	tooltip.css.visibility= 'hidden';
	clearTimeout(tooltip.fadeTimer);
	tooltip.i= 0;
};

// Measure screensize.
var scrollbarWidth= bw.ns6&&bw.win?14:bw.ns6&&!bw.win?16:bw.ns4?16:0;
function measureScreen() {
	tooltip.css.top= 0+px;
	tooltip.css.left= 0+px;
	screenW= (bw.ie?document.body.clientWidth:innerWidth) - scrollbarWidth;
	screenH= (bw.ie?document.body.clientHeight:innerHeight);
};

// Opacity methods.
makeTooltip.prototype.blendIn= function(){
	if (bw.ie && bw.win && !bw.ie4) {
		this.css.filter= 'blendTrans(duration=0.5)';
		this.elm.filters.blendTrans.apply();
		this.css.visibility= 'visible';
		this.elm.filters.blendTrans.play();
	}
	else {
		this.css.visibility= 'visible';
		if (!bw.ns4) this.fadeIt();
	}
};
makeTooltip.prototype.step= 8;
makeTooltip.prototype.i= 0;
makeTooltip.prototype.fadeTimer= null;
makeTooltip.prototype.fadeIt= function(){
	this.i+= this.step;
	//this.css.filter= 'alpha(opacity='+this.i+')';
	this.css.MozOpacity= this.i/100;
	if (this.i<100) this.fadeTimer= setTimeout(this.obj+'.fadeIt()', 40);
	else this.i= 0;
};

// Init function...
var isLoaded= false;
function popupInit(){
	//Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
	bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
	if (bw.opera5) bw.ns6 = 0
	
	//Extending the browsercheck to add windows platform detection.
	bw.win= (navigator.userAgent.indexOf('Windows')>-1)

	tooltip= new makeTooltip('divTooltip');
	tooltip.elm.onmouseover= function(){ clearTimeout(tooltip.popTimer); if(bw.ns4){setTimeout('clearTimeout(tooltip.popTimer)',20)}; };
	tooltip.elm.onmouseout= dopopOut;
	if (bw.ns4) document.captureEvents(Event.MOUSEMOVE);
	document.onmousemove= getMousemove;
	measureScreen();
	if (!bw.ns4) onresize= measureScreen;
	if (!bw.ns4) tooltip.elm.className= 'normalStyle';
	if (bw.ie && bw.win && !bw.ie4) tooltip.css.filter= 'alpha(opacity=100)'; //Preloads the windows filters.
	isLoaded= true;
};

// Initiates page on pageload if the browser is ok.
if(bw.bw && !isLoaded) onload= popupInit;