function show (e, obj, id)
{
	var posx = 0;
	var posy = 0;
	if (!e)
		e = window.event;
	if (e.pageX || e.pageY)
	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY)
	{
		if (document.documentElement && document.documentElement.scrollTop)
		{
			theTop = document.documentElement.scrollTop;
			theLeft = document.documentElement.scrollLeft;
		}else if (document.body)
		{
			theTop = document.body.scrollTop
			theLeft = document.body.scrollLeft;
		}
		posx = e.clientX + theLeft;
		posy = e.clientY + theTop;
	}
	// If you resize graphic, you need to modify this :)
	var ie4=(document.all)? true:false;
	if (navigator.userAgent.indexOf("MSIE") > -1)
		//posx -= 300;// determines how far the frame should be from the mouse in IE
		posx += 20;
	else
		//posx -= 300;// determines how far the frame should be from the mouse in other Browsers
		posx += 20;

	//posy -= 400;
	posy -= 80;
	var elem = document.getElementById(id);
	elem.style.display = "block";
	elem.style.top = posy + "px";
	elem.style.left = posx + "px";
}

var xCoord;
var yCoord;

function showFix(e, obj, id, imageWidth, imageHeight, offsetX, offsetY)
{
	var posx = 0;
	var posy = 0;
	if (!e)
		e = window.event;

	if (e.pageX || e.pageY)
	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY)
	{
		if (document.documentElement && document.documentElement.scrollTop)
		{
			theTop = document.documentElement.scrollTop;
			theLeft = document.documentElement.scrollLeft;
		}
		else if (document.body)
		{
			theTop = document.body.scrollTop
			theLeft = document.body.scrollLeft;
		}

		posx = e.clientX + theLeft;
		posy = e.clientY + theTop;
	}

	// If you resize graphic, you need to modify this
	var ie4=(document.all)? true:false;

	if (navigator.userAgent.indexOf("MSIE") > -1)
		posx += 20;
	else
		posx += 20;
	posy -= 20;

	if(document.body.clientWidth < (xCoord + imageWidth + 30))
	{
		posx = posx - 20 - 20 - imageWidth;
	}
	//alert(yCoord +", "+ imageHeight)
	if( yCoord > imageHeight)
	{
		posy = posy - imageHeight;
	}
	
    var elem = parent.document.getElementById(id);
	elem.style.display = "block";
	elem.style.top = (posy + offsetY) + "px";
	elem.style.left = (posx + offsetX) + "px";
	
}



function checkwhere(e) 
{
	if (document.layers)
	{
		xCoord = e.x;
		yCoord = e.y;
	} else if (document.all)
	{
		xCoord = event.clientX;
		yCoord = event.clientY;
	} else if (document.getElementById)
	{
		xCoord = e.clientX;
		yCoord = e.clientY;
	}
}

document.onmousemove = checkwhere;
if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}

function hide (id)
{
	parent.document.getElementById(id).style.display = "none";
}

function show_me (id, pic)
{
	var divID = 'tt'+id;
	var imgID = 'img'+id;
	parent.document.getElementById(imgID).src = pic;
	parent.document.getElementById(divID).style.display = "block";
}