context: function OpenURL(event, node){    // clear any single-click/edit timeouts    if (timerID != null)    {        gEditNode = null;        clearTimeout(timerID);        timerID = null;    }    if (node.getAttribute('container') == "true")    {        return(false);    }    var url = node.getAttribute('id');    // Ignore "NC:" urls.    if (url.substring(0, 3) == "NC:")    {        return(false);    }	try	{		// add support for IE favorites under Win32, and NetPositive URLs under BeOS		if (url.indexOf("file://") == 0)		{			var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService();			if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);			if (rdf)			{				var fileSys = rdf.GetDataSource("rdf:files");				if (fileSys)				{					var src = rdf.GetResource(url, true);					var prop = rdf.GetResource("http://home.netscape.com/NC-rdf#URL", true);					var target = fileSys.GetTarget(src, prop, true);					if (target)	target = target.QueryInterface(Components.interfaces.nsIRDFLiteral);					if (target)	target = target.Value;					if (target)	url = target;									}			}		}	}	catch(ex)	{	}    if(top.isEditor != undefined) {        if(top.editorShell) {            var ext = getFileExtension(url);                // look at the extension of the file to see what should be done            // with it. Note that this is a typically windowsey approach. will            // rdf:files hold a reference to the actual file type? (Mac?)             switch(ext) {            // XXX Crude, but it will do for now.            case "gif":            case "jpeg":            case "jpg":            case "png":                // just insert the image                EditorAutoInsertImage(url);                break;            case "htm":            case "html":            case "xul":                toEditor(url);                break;                           case "js":                EditorInsertJSFile(url);                break;            case "css":                EditorInsertCSSFile(url);                break;            default:                // load the file in the editor                dump("Editor Message: Weirdo File Format\n");                toEditor(url);                break;            }        }    } else {        window.open(url,'bookmarks');    }        dump("OpenURL(" + url + ")\n");    return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/eaa6754a0a946375badf1165b3e4af3999e4b03c/sb-file-panel.js/buggy/editor/ui/composer/content/sb-file-panel.js