﻿function ShowDivSuccinct(div){
	var x, y, w, h, ox, oy;
	x = event.clientX;
	y = event.clientY;
	if (div == null)
		return false;
	div.style.display = "block";
	ox = document.body.clientWidth + document.body.scrollLeft + document.documentElement.scrollLeft;
	oy = document.body.clientHeight + document.documentElement.scrollTop + document.body.scrollTop ;
	if(x > ox || y > oy)
	   return false;
	w = div.clientWidth;
	h = div.clientHeight;
	if((x + w) > ox)    
		x = x - w;
	if((y+h)>oy)
		y = y-h;
	if(x < 0)
		x = 20;
	if(y < 0)
		y = 10;
	div.style.posLeft = x+ document.body.scrollLeft + document.documentElement.scrollLeft;
	div.style.posTop = y+ document.documentElement.scrollTop + document.body.scrollTop ; 
}

function ShowDivHotLineInfo(divId)
{
	var div = document.getElementById(divId);
	var x,y, w, h, ox, oy;
	x = event.clientX-10;
	y = event.clientY-10;
	if (div == null)
		return false;
	div.style.display = "block";
	ox = document.body.clientWidth + document.body.scrollLeft + document.documentElement.scrollLeft;
	if(x > ox || y > oy)
	   return false;
	w = div.clientWidth;
	h = div.clientHeight;
	if((x + w) > ox)
		x = x - w;
	if((y+h)>document.body.clientHeight){
		y = y-h;
	}
	if(x < 0)
		x = 20;
	if(y < 0)
		y = 10;
	div.style.posLeft = x+ document.body.scrollLeft + document.documentElement.scrollLeft;
	div.style.posTop = y+ document.documentElement.scrollTop + document.body.scrollTop ;
}
function CloseDivHotLineInfo(divid)
{
	document.getElementById(divid).style.display = "none";
}