rem: setTimeout("centerOverParent()", 0); 
add: setTimeout(centerOverParent, 0); 
context: function init(){  gRDF = window.opener.gRDF;  gItemRes = window.arguments[0];    gHelperApps = window.opener.gHelperApps;  gHandlerPropArc = gHelperApps._handlerPropArc;  gExternalAppArc = gHelperApps._externalAppArc;  gFileHandlerArc = gHelperApps._fileHandlerArc;    gNC_URI = window.opener.NC_URI;    var typeField = document.getElementById("typeField");  var str = gHelperApps.getLiteralValue(gItemRes.Value, "FileType");  // XXXben localize!  str += " (" + gHelperApps.getLiteralValue(gItemRes.Value, "FileExtensions") + ")";  typeField.value = str;  var typeIcon = document.getElementById("typeIcon");  typeIcon.src = gHelperApps.getLiteralValue(gItemRes.Value, "FileIcon");  var handlerGroup = document.getElementById("handlerGroup");    gHandlerRes = gHelperApps.GetTarget(gItemRes, gHandlerPropArc, true);  if (gHandlerRes) {    gHandlerRes = gHandlerRes.QueryInterface(Components.interfaces.nsIRDFResource);    // Custom App Handler Path - this must be set before we set the selected    // radio button because the selection event handler for the radio group    // requires the extapp handler field to be non-empty for the extapp radio    // button to be selected.     var gExtAppRes = gHelperApps.GetTarget(gHandlerRes, gExternalAppArc, true);    if (gExtAppRes) {      gExtAppRes = gExtAppRes.QueryInterface(Components.interfaces.nsIRDFResource);      var customAppPath = document.getElementById("customAppPath");                customAppPath.value = gHelperApps.getLiteralValue(gExtAppRes.Value, "path");    }        // Selected Action Radiogroup    var handleInternal = gHelperApps.getLiteralValue(gHandlerRes.Value, "useSystemDefault");    var saveToDisk = gHelperApps.getLiteralValue(gHandlerRes.Value, "saveToDisk");    if (handleInternal == "true")      handlerGroup.selectedItem = document.getElementById("openDefault");    else if (saveToDisk == "true")      handlerGroup.selectedItem = document.getElementById("saveToDisk");    else      handlerGroup.selectedItem = document.getElementById("openApplication");          gLastSelectedActionItem = handlerGroup.selectedItem;  }  else {    // No Handler/ExtApp Resources for this type for some reason    handlerGroup.selectedItem = document.getElementById("openDefault");  }  var defaultAppName = document.getElementById("defaultAppName");  var mimeInfo = gHelperApps.getMIMEInfo(gItemRes);  defaultAppName.value = mimeInfo.defaultDescription;    handlerGroup.focus();    // We don't let users open .exe files or random binary data directly   // from the browser at the moment because of security concerns.   var mimeType = mimeInfo.MIMEType;  if (mimeType == "application/object-stream" ||      mimeType == "application/x-msdownload") {    document.getElementById("openApplication").disabled = true;    document.getElementById("openDefault").disabled = true;    handlerGroup.selectedItem = document.getElementById("saveToDisk");  }    var x = document.documentElement.getAttribute("screenX");  if (x == "")    setTimeout("centerOverParent()", 0);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/a429b6720a457cbc90d1df942a1f58abece300ce/editAction.js/clean/toolkit/mozapps/downloads/content/editAction.js