rem: var windowReference=document.getElementById('certDetails'); 
context: function setWindowName(){  //  Get the cert from the cert database  var certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);  var windowReference=document.getElementById('certDetails');  var myName = self.name;  bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");  var cert;  var certDetails = bundle.GetStringFromName('certDetails');  if (myName != "") {    windowReference.setAttribute("title",certDetails+'"'+myName+'"');    //  Get the token    //  XXX ignore this for now.  NSS will find the cert on a token    //      by "tokenname:certname", which is what we have.    //var tokenName = "";    //var pk11db = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB);    //var token = pk11db.findTokenByName(tokenName);    //var cert = certdb.findCertByNickname(token, myName);    cert = certdb.findCertByNickname(null, myName);  } else {    var pkiParams = window.arguments[0].QueryInterface(nsIPKIParamBlock);    var isupport = pkiParams.getISupportAtIndex(1);    cert = isupport.QueryInterface(nsIX509Cert);    windowReference.setAttribute("title",                                  certDetails+'"'+cert.windowTitle+'"');  }  //  //  Set the cert attributes for viewing  //  //  The chain of trust  var chain = cert.getChain();  AddCertChain("treesetDump", chain, "dump_");  DisplayGeneralDataFromCert(cert);  BuildPrettyPrint(cert);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/5601db241c69949126f4af5dc3980dff80e03ce7/viewCertDetails.js/buggy/security/manager/pki/resources/content/viewCertDetails.js