function getMousePos (e)
{
	/* Get position of mouse pointer */
	
	var cursor = {x:0, y:0};

	if (document.all)
	{
		cursor.x = e.clientX;
		cursor.y = e.clientY;
	}
	else
	{
		cursor.x = e.layerX;
		cursor.y = e.layerY;
	}
	
	return cursor;
}
