
// id is currently unused, but can reference a value in an array that contains community information
function ShowPopup(id, ev) 
{
	var info, x, y;
	var mouse = getPosition(ev);
	
	x = ev.pageX? ev.pageX:parseInt(ev.x)+parseInt(document.body.scrollLeft);
	x = x + 10
	y = ev.pageY? ev.pageY:parseInt(ev.y)+parseInt(document.body.scrollTop);
	
	//x = mouse.x;
	y = mouse.y;
	
	info = document.getElementById("info" + id); // Use layers here for NS4.7 compatability
	info.style.left = x + "px";
	info.style.top = y + "px";
	info.style.display = "";
	setTimeout("HidePopup('" + id + "')", 9000);
}

function HidePopup(id)
{
	var info;

	info = document.getElementById("info" + id); // Use layers here for NS4.7 compatability

	info.style.display = "none";
} 

function getPosition(e) { 
     e = e || window.event; 
     var cursor = {x:0, y:0}; 
     if (e.pageX || e.pageY) { 
         cursor.x = e.pageX; 
         cursor.y = e.pageY; 
     }  
     else { 
         cursor.x = e.clientX +  
             (document.documentElement.scrollLeft ||  
             document.body.scrollLeft) -  
             document.documentElement.clientLeft; 
         cursor.y = e.clientY +  
             (document.documentElement.scrollTop ||  
             document.body.scrollTop) -  
             document.documentElement.clientTop; 
     } 
     return cursor; 
 }
