var tooltip=function(){
	var id = 'tt';
	var top = 0;
	var left = 0;
	var maxw = 320;
	var maxh =220;
	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,newsite,w){
			if(newsite==0){
				defaultContent = '<div class=\'wrapper white"\'><div class=\'login_box_top\'> <a href=\'#\' onclick=\'tooltip.hide();\'><img src=\'/images/btn_close_Loginbox.gif\' class=\'close\'/></a> </div><div class=\'login_box_btm\'><p>If you want to use the Assessment Tool or simply stay in touch with <em>Disney Institute</em>, please take a few moments to register with our Web site. If you are already registered, simply log in.</p><p><a href=\'/login.aspx?ReturnUrl='+v+'\'  class=\'btn go \'>Login</a> <a href=\'/register.aspx?ReturnUrl='+v+'\'  class=\'btn go \'>Register</a></p>  </div></div>';
				}else if(newsite==1){
					defaultContent = '<div class=\'wrapper white"\'><div class=\'login_box_top\'> <a href=\'#\' onclick=\'tooltip.hide();\'><img src=\'/images/btn_close_Loginbox.gif\' class=\'close\'/></a> </div><div class=\'login_box_btm\'><p>You are now leaving the <em>Disney Institute</em> site and going to LearningTree.com to learn more about <em>Disney Institute</em> programs offered at their locations.</p><p><a href=\''+v+'\' target=\'_blank\'  class=\'btn go \'>Book Now</a></p>  </div></div>';
				}else if(newsite==2){
					defaultContent = '<div class=\'wrapper white"\'><div class=\'login_box_top\'> <a href=\'#\' onclick=\'tooltip.hide();\'><img src=\'/images/btn_close_Loginbox.gif\' class=\'close\'/></a> </div><div class=\'login_box_btm\'><p>You are now leaving the <em>Disney Institute</em> site. <br /><br /> The program sponsor will be assisting you with any future communication for this event date. Thank you! </p><p><a href=\''+v+'\' target=\'_blank\' class=\'btn go \'>Book Now</a></p>  </div></div>';
				}else if(newsite==3){
					defaultContent = '<div class=\'wrapper white"\'><div class=\'login_box_top\'> <a href=\'#\' onclick=\'tooltip.hide();\'><img src=\'/images/btn_close_Loginbox.gif\' class=\'close\'/></a> </div><div class=\'login_box_btm\'><p>You are now leaving the <em>Disney Institute</em> site and going to CMCTraining.org to learn more about <em>Disney Institute</em> programs offered at their locations.</p><p><a href=\''+v+'\' target=\'_blank\'  class=\'btn go \'>Book Now</a></p>  </div></div>';
				}else if(newsite==4){
					defaultContent = '<div class=\'wrapper white"\'><div class=\'login_box_top\'> <a href=\'#\' onclick=\'tooltip.hide();\'><img src=\'/images/btn_close_Loginbox.gif\' class=\'close\'/></a> </div><div class=\'login_box_btm\'><p>Ready to enroll in a course?  If you are an individual or coordinating a booking for teams of 2-9 people, please login or register now.</p><p><a href=\'/login.aspx?ReturnUrl='+v+'\'  class=\'btn go \'>Login</a> <a href=\'/register.aspx?ReturnUrl='+v+'\'  class=\'btn go \'>Register</a></p>  </div></div>';
				}
			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.9;
				//tt.style.filter = 'alpha(opacity=1)';
				tt.style.display = 'block';
				
				
				//document.onmousemove = this.pos;
				
				
			}
			
			tt.style.display = 'block';
			
			tt.innerHTML = defaultContent;
			
			
			if(tt.offsetWidth > maxw){tt.style.width = maxw + 'px'}
			
			
			
		},
		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 - maxh)/2+h) + 'px';
			//tt.style.left = ((l-maxw)/2 + 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);
			tt.style.display = 'none';
		}
	};
}();


