printOptions = printService.QueryInterface(Components.interfaces.nsIPrintOptions); 
function loadDialog(){  var print_copies        = 1;  var print_selection_radio_enabled = false;  var print_frametype     = gPrintSetInterface.kSelectedFrame;  var print_howToEnableUI = gPrintSetInterface.kFrameEnableNone;  var print_tofile        = "";  try {    gPrefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);    printService = Components.classes["@mozilla.org/gfx/printsettings-service;1"];    if (printService) {      printService = printService.getService();      if (printService) {        printService = printService.QueryInterface(Components.interfaces.nsIPrintSettingsService);        printOptions = printService.QueryInterface(Components.interfaces.nsIPrintOptions);      }    }  } catch(e) {}  // Note: getPrinters sets up the PrintToFile radio buttons and initalises gPrintSettings  getPrinters();  if (gPrintSettings) {    print_tofile        = gPrintSettings.printToFile;    gOriginalNumCopies  = gPrintSettings.numCopies;    print_copies        = gPrintSettings.numCopies;    print_frametype     = gPrintSettings.printFrameType;    print_howToEnableUI = gPrintSettings.howToEnableFrameUI;    print_selection_radio_enabled = gPrintSettings.GetPrintOptions(gPrintSetInterface.kEnableSelectionRB);  }  if (doDebug) {    dump("loadDialog*********************************************\n");    dump("print_tofile            "+print_tofile+"\n");    dump("print_frame             "+print_frametype+"\n");    dump("print_howToEnableUI     "+print_howToEnableUI+"\n");    dump("selection_radio_enabled "+print_selection_radio_enabled+"\n");  }  dialog.printrangeGroup.selectedItem = dialog.allpagesRadio;  if (print_selection_radio_enabled) {    dialog.selectionRadio.removeAttribute("disabled");  } else {    dialog.selectionRadio.setAttribute("disabled","true");  }  doPrintRange(dialog.rangeRadio.selected);  dialog.frompageInput.value  = 1;  dialog.topageInput.value    = 1;  dialog.numCopiesInput.value = print_copies;  if (doDebug) {    dump("print_howToEnableUI: "+print_howToEnableUI+"\n");  }  // print frame  if (print_howToEnableUI == gPrintSetInterface.kFrameEnableAll) {    dialog.aslaidoutRadio.removeAttribute("disabled");    dialog.selectedframeRadio.removeAttribute("disabled");    dialog.eachframesepRadio.removeAttribute("disabled");    dialog.printframeGroupLabel.removeAttribute("disabled");    // initialize radio group    dialog.printframeGroup.selectedItem = dialog.selectedframeRadio;  } else if (print_howToEnableUI == gPrintSetInterface.kFrameEnableAsIsAndEach) {    dialog.aslaidoutRadio.removeAttribute("disabled");       //enable    dialog.selectedframeRadio.setAttribute("disabled","true"); // disable    dialog.eachframesepRadio.removeAttribute("disabled");       // enable    dialog.printframeGroupLabel.removeAttribute("disabled");    // enable    // initialize    dialog.printframeGroup.selectedItem = dialog.eachframesepRadio;  } else {    dialog.aslaidoutRadio.setAttribute("disabled","true");    dialog.selectedframeRadio.setAttribute("disabled","true");    dialog.eachframesepRadio.setAttribute("disabled","true");    dialog.printframeGroupLabel.setAttribute("disabled","true");  }  dialog.printButton.label = dialog.printName.getAttribute("label");}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/bc93bea3244fa2ac7f0fc5c183b69795c1024718/printdialog.js/clean/toolkit/components/printing/content/printdialog.js