add:   if(!previousMessage && startFromEnd) { var parent = currentMessage.parentNode; previousMessage = parent.lastChild; }  
context: function GetPreviousMessage(currentMessage, previousFunction, startFromEnd){	var foundMessage = false;		var previousMessage = currentMessage.previousSibling;	while(previousMessage && (previousMessage != currentMessage))	{		if(previousFunction(previousMessage))		 break;		previousMessage = previousMessage.previousSibling;		if(!previousMessage && startFromEnd)		{			var parent = currentMessage.parentNode;			previousMessage = parent.lastChild;		}	}	if(previousMessage)	{		var id = previousMessage.getAttribute('id');		dump(id + '\n');	}	else		dump('No previous message\n');	return previousMessage;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/1e7905fdd5a28cbf8cad4b73100aee826b5e2207/msgViewNavigation.js/clean/mailnews/base/resources/content/msgViewNavigation.js