var hover = getObject("hover");
var hover_offset_x = 0;
var hover_offset_y = 0;
var hover_start_x = 0;
var hover_start_y = 0;
var hover_set_visible = false;

function mouseMovePop(x, y) {
	
	if (hover_set_visible) {
		hover.style.visibility	= "visible";
		hover.style.overflow	= "visible";
		hover_set_visible	= false;		
		hover_start_x		= x;
		hover_start_y		= y;
	}
	
	if (hover.style.visibility == "visible") {
		
		if (Math.abs(hover_start_x - x) > 200) hideHover();
		if (Math.abs(hover_start_y - y) > 200) hideHover();
		
//		if (Math.abs(x - x) > 200) hideHover();
		if (y  > 2700) hover_offset_y = -200;
//		alert(document.body.height);

		hover.style.left	= x + hover_offset_x;	
		hover.style.top		= y + hover_offset_y;
	}
}

function showHover(content) {
	
}


function hidePopUp() {	
	if (old) return;	
		
	writeObjectContent(hover, "");	
	
	hover_set_visible		= false;
	hover.style.visibility	= "hidden";
	hover.style.overflow	= "hidden";	
	hover.style.width		= 0;
	hover.style.height		= 0;
	hover.style.left		= -1000;
	hover.style.top			= -1000;
}

function showPopUp(info) {	
	if (old) return;	

	var content = '';
	
	content += '<table cellpadding="2" cellspacing="0" class="popup" id="hover_content">';
	content += '<tr>';
	content += '	<td valign="top" nowrap="wrap">'+info+'</td>';
	content += '</tr>';
	content += '</table>';
	
	hover_offset_x = 15;
	hover_offset_y = 15;
	
	writeObjectContent(hover, content);
		
	hover.style.width		= 160;
	hover.style.height		= 200;
	hover_set_visible		= true;
}



