under_mouse = {

	context : null,

	text : null,
	
	content : "",
	
	box : function (event, text) {
	
		
		text = "<div class='info3'>"+ text +"&nbsp;</div>";
		
		this.showText(event, text);
		
	
	},
	
	showText : function (event, text) {
		
		event = EventUtil.getEvent(); 
			
		if(this.context == null){
			this.construct();
			this.setText(text);
		} else if(this.content != text){
			this.setText(text);
		}
		
		this.setPosition(event);
	},
	
	move : function (event){
		event = EventUtil.getEvent(); 
		this.setPosition(event);
	},
	
	setText : function (text) {
		this.content = text;
		this.text.innerHTML = text;
	},
	
	construct : function () {
		this.context = document.createElement("div");
		
		this.context.className = "under_mouse";

		this.context.style.position = "absolute";
		this.context.style.left = 0;
		this.context.style.top = 0;
		this.context.style.zIndex = 200;
		
		this.text = document.createElement("span");
		
		this.context.appendChild(this.text);
		
		document.body.appendChild(this.context);
	},
	
	hide : function () {
		if( typeof this.context.parentNode != "undefined" ) this.context.parentNode.removeChild(this.context);
		this.context = null;
	},
	
	setPosition : function (event) {
		this.context.style.top = this.getMouseY(event.clientY)+2;//this.getMouseY(
		this.context.style.left = this.getMouseX(event.clientX)+15;//
	},
	
	getMouseX : function (mx){
		if(window.innerWidth) {
			offsetx = window.pageXOffset;
		}else{
			offsetx = document.body.scrollLeft;
		}
		return offsetx + mx;
	},
	
	getMouseY : function (my) {
		if(window.pageYOffset){
			 return (my + window.pageYOffset);
		}else{
			return my + document.body.scrollTop;
		}
	}
};
