	// Id of the alert div
	var alertId = "loginAlert";

	// Display the login popup by aligning the div to oElm's xy
	function showLoginError(oElm)
	{
		// oElm is the object which called it, we will use it for positioning
		var xy = findPos(oElm);
		
		xPos = xy[0];
		yPos = xy[1];
		
		var loginAlert = document.getElementById(alertId);
		
		loginAlert.style.left = xPos + "px";
		loginAlert.style.top = yPos + "px";
		
		loginAlert.style.display = "block";
	}
	
	// Close the login popup
	function closeLoginAlert(aObj)
	{
		document.getElementById(alertId).style.display = "none";
	}
	
	// Find position of any object in the DOM
	function findPos(obj) 
	{
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	}
	