//Javascript file to load into the main index.html file

//This function displays some text on a div layer using the current mouse coordinates
function displayPopup(text, divWidth, divHeight)
{
	var curCoords = getMousePos();
	alert(curCoords);
}

//This function gets the current x-y coords of the mouse
function getMousePos() 
{
	var posx = 0;
	var posy = 0;
	if (!e) var e = window.event;
	if (e.pageX || e.pageY) 	{
		posx = e.pageX;
		posy = e.pageY;
	}
	else if (e.clientX || e.clientY) 	{
		posx = e.clientX + document.body.scrollLeft
			+ document.documentElement.scrollLeft;
		posy = e.clientY + document.body.scrollTop
			+ document.documentElement.scrollTop;
	}
	var coords = new Array(posx, posy);
	
	return coords;
}  