context: function OnDblClick(treeitem, root){    // Deal with a double-click    // First, see if they're opening the related links node. If so,    // we'll need to go out and fetch related links _now_.    if (treeitem.getAttribute('id') == 'NC:RelatedLinks' &&        treeitem.getAttribute('open') != 'true') {	refetchRelatedLinks(Handler, ContentWindow.location);        return;    }    // Next, check to see if it's a container. If so, then just let    // the tree do its open and close stuff.    if (treeitem.getAttribute('container') == 'true') {        return;    }    if (treeitem.getAttribute('type') == 'http://home.netscape.com/NC-rdf#BookmarkSeparator') {        return;    }    // Okay, it's not a container. See if it has a URL, and if so, open it.    var id = treeitem.getAttribute('id');    if (!id)	return(false);	// rjc: add support for anonymous resources; if the node has	// a "#URL" property, use it, otherwise default to using the id	try	{		var rootNode = document.getElementById(root);		var ds = null;		if (rootNode)		{			ds = rootNode.database;		}		var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();		if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);		if (rdf)		{			if (ds)			{				var src = rdf.GetResource(id, true);				var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);				var target = ds.GetTarget(src, prop, true);				if (target)	target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);				if (target)	target = target.Value;				if (target)	id = target;							}		}	}	catch(ex)	{	}    ContentWindow.location = id;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/978cd22825d085bee783f174908fd35d7ae1bd7a/related-panel.js/buggy/xpfe/components/related/resources/related-panel.js