function editLogin(myID)
{
	$('p#DisplayLogin' + myID).hide();
	$('p#EditLogin' + myID).show();
	$('#myPageElement').html('');
}



function saveLogin(RecID,FirstName,LastName,Title,Email,Password,myElement)
{
	if(undefined===myElement){
		myPageElement = 'myPageElement';
	} else {
		myPageElement = myElement;
	}


	$('p#DisplayLogin' + RecID).show();
	$('p#EditLogin' + RecID).hide();

	//  Reset the values of the original <p> to the new values we're using to update the database
	
	var myurl = '/includes/updateLoginInfo.lasso';
	myRand = parseInt(Math.random()*999999999999999);
	var modurl = myurl+"?rand="+myRand+"&RecID="+RecID+"&FirstName="+FirstName+"&LastName="+LastName+"&Title="+Title+"&Email="+Email+"&Password="+Password;
	http.open("GET", modurl, true);
	http.onreadystatechange = useHttpResponse;
	http.send(null);
	
	var newMsg = FirstName + ' ' + LastName + ', ' + Title
	newMsg += '<br /><a href="mailto:' + Email + '">' + Email + '</a>'
	newMsg += '<br />' + Password
	newMsg += '<br /><input type="button" onClick="editLogin(' + RecID + ');" id="EditLoginButton-' + RecID + '" value="Edit Login Info" />'
	
	$('p#DisplayLogin' + RecID).html(newMsg);
	
	delete myElement;
}

