rem: var messages = GetSelectedMessages(); var numMessages = messages.length;  var compositeDS = GetCompositeDataSource("MarkMessageFlagged"); var property = RDF.GetResource('http:  var areMessagesFlagged = false;  for(var i = 0; i < numMessages; i++) { var result = compositeDS.GetTarget(messages[i], property, true); result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if(result.Value == "flagged") { areMessagesFlagged = true; break; } } 
add: areMessagesFlagged = SelectedMessagesAreFlagged(); 
context: function InitMarkFlaggedMenuItem(){	var messages = GetSelectedMessages();	var numMessages = messages.length;	var compositeDS = GetCompositeDataSource("MarkMessageFlagged");	var property = RDF.GetResource('http://home.netscape.com/NC-rdf#Flagged');	var areMessagesFlagged = false;	for(var i = 0; i < numMessages; i++)	{		var result = compositeDS.GetTarget(messages[i], property, true);		result = result.QueryInterface(Components.interfaces.nsIRDFLiteral);		if(result.Value == "flagged")		{			areMessagesFlagged = true;			break;		}	}	var markFlaggedMenuItem = document.getElementById("markFlaggedMenuItem");	if(markFlaggedMenuItem)		markFlaggedMenuItem.setAttribute("checked", areMessagesFlagged);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/0938bbb70031b70863a26099bd6eab59d9a14e34/mailWindowOverlay.js/clean/mailnews/base/resources/content/mailWindowOverlay.js