var tooltip=function(def){

var wsh_est_def = new Array();
  
  wsh_est_def['EPS']="The default EPS adjusted (non-GAAP) to exclude extraordinary items, but include stock options expenses. Adjustments are typically one-time, nonrecurring items. EPS is calculated as: (Net Profit Adjusted + Stock Option Expense) / Fully Diluted Shares Outstanding. While EPS is the default and preferred value for display, contributing analysts may provide EPS using a different methodology or without specifying their methodology. In the event that EPS is not supplied, the value that the analyst provides will be displayed in this order: 1) Reported (GAAP); 2) Adjusted and excluding stock option expense.";
  wsh_est_def['EPSA']="Fully adjusted (non-GAAP) to exclude both extraordinary items and stock options expense. Adjustments are typically one-time, nonrecurring items. EPSA is collected if the analyst explicitly designates the EPS as “adjusted”. If EPS is not explicitly designated as “adjusted”, the EPSA field will be left blank. EPSA is calculated as: Net Profit Adjusted / Fully Diluted Shares Outstanding. For a selection of U.S. companies the difference between EPSA and EPS is stock option expense.";
  wsh_est_def['EPSR']="GAAP EPS for all U.S. companies. EPSR includes exceptions, nonrecurring items, and stock option expense. Since analysts often provide both adjusted and non-adjusted EPS values, the EPSR data item is the non-adjusted value in the Estimates database. EPSR is calculated as: Net Profit Reported (GAAP) / Fully Diluted Shares Outstanding.";
  wsh_est_def['Consensus']="The sum of the analyst's estimates divided by the number of estimates." 
  wsh_est_def['High']="The high of the analyst's estimates.";
  wsh_est_def['Low']="The low of the analyst's estimates.";
  wsh_est_def['PE']="The current share price compared to the per-share earnings.";
  wsh_est_def['YearAgo']="Earnings Per Share Consensus from one year prior to this date.";
  wsh_est_def['Analyst']="The number of analysts applied to the column of data points.";
  wsh_est_def['RevisionUp']="The number of analysts that increased their estimates within 30 days.";
  wsh_est_def['RevisionDown']="The number of analysts that decreased their estimates within 30 days.";
  wsh_est_def['ConsensusRating']="The sum of the analyst's estimates divided by the number of analyst's estimates.<br />BUY: Value=1, Range=1-1.8<br />OUTPERFORM: Value=2, Range=1.8-2.6<br />HOLD: Value=3, Range=2.6-3.4<br />UNDERPERFORM: Value=4, Range=3.4-4.2<br />SELL: Value=5, Range=4.2-5";
  wsh_est_def['CurrentTradingPrice']="The current stock price.<br /><em>Delayed at least 20 minutes.</em><br /><em>Provided by eSignal.</em>";
  wsh_est_def['MeanPrice']="The sum of the target price estimates divided by the number of estimates.";
  wsh_est_def['MedianPrice']="The mid point of range of numbers that are arranged in order of value for the analyst's target price estimates.";
  wsh_est_def['HighPrice']="The high of the analyst's target price estimate.";
  wsh_est_def['LowPrice']="The low of the analyst's target price estimate.";
  
  
	var id = 'tt';
	var top = 3;
	var left = 3;
	var maxw = 300;
	var speed = 10;
	var timer = 20;
	var endalpha = 90;
	var alpha = 0;
	var tt,t,c,b,h;
	var ie = document.all ? true : false;
	return{
		show:function(v,w){
			if(tt == null){
				tt = document.createElement('div');
				tt.setAttribute('id',id);
				t = document.createElement('div');
				t.setAttribute('id',id + 'top');
				c = document.createElement('div');
				c.setAttribute('id',id + 'cont');
				b = document.createElement('div');
				b.setAttribute('id',id + 'bot');
				tt.appendChild(t);
				tt.appendChild(c);
				tt.appendChild(b);
				document.body.appendChild(tt);
				tt.style.opacity = 0;
				tt.style.filter = 'alpha(opacity=0.1)';
				document.onmousemove = this.pos;
			}
			tt.style.display = 'block';
			c.innerHTML = v;
			tt.style.width = w ? w + 'px' : 'auto';
			if(!w && ie){
				t.style.display = 'none';
				b.style.display = 'none';
				tt.style.width = tt.offsetWidth;
				t.style.display = 'block';
				b.style.display = 'block';
			}
			if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
			h = parseInt(tt.offsetHeight) + top;
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(1)},timer);
		},
		pos:function(e){
			var u = ie ? event.clientY + document.documentElement.scrollTop : e.pageY;
			var l = ie ? event.clientX + document.documentElement.scrollLeft : e.pageX;
			tt.style.top = (u - h) + 'px';
			tt.style.left = (l + left) + 'px';
		},
		fade:function(d){
			var a = alpha;
			if((a != endalpha && d == 1) || (a != 0 && d == -1)){
				var i = speed;
				if(endalpha - a < speed && d == 1){
					i = endalpha - a;
				}else if(alpha < speed && d == -1){
					i = a;
				}
				alpha = a + (i * d);
				tt.style.opacity = alpha * .01;
				tt.style.filter = 'alpha(opacity=' + alpha + ')';
			}else{
				clearInterval(tt.timer);
				if(d == -1){tt.style.display = 'none'}
			}
		},
		hide:function(){
			clearInterval(tt.timer);
			tt.timer = setInterval(function(){tooltip.fade(-1)},timer);
		}
	};
}();
