41 if (typeof(
Cc) ==
"undefined")
42 var
Cc = Components.classes;
43 if (typeof(
Ci) ==
"undefined")
44 var
Ci = Components.interfaces;
45 if (typeof(
Cr) ==
"undefined")
46 var
Cr = Components.results;
47 if (typeof(
Cu) ==
"undefined")
48 var
Cu = Components.utils;
51 if (typeof(
XUL_NS) ==
"undefined")
52 var
XUL_NS =
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
63 var importMediaPrefsPane = {
76 doPaneLoad:
function importMediaPrefs_doPaneLoad(aEvent) {
78 var tabPanelsElem = document.getElementById(
"import_media_tabpanels");
79 var tabPanelList = tabPanelsElem.getElementsByTagNameNS(XUL_NS,
"tabpanel");
80 for (var
i = 0;
i < tabPanelList.length;
i++) {
81 var tabPanel = tabPanelList[
i];
82 this._fireEvent(tabPanel, aEvent.type, aEvent.bubbles, aEvent.cancelable);
84 var tabBox = document.getElementById(
"import_media_tabbox");
85 if (tabBox.hasAttribute(
"selectedIndex")) {
86 tabBox.selectedIndex = tabBox.getAttribute(
"selectedIndex");
108 _fireEvent:
function importMediaPrefs__fireEvent(aTarget,
115 var
event = document.createEvent(
"Events");
116 event.initEvent(aEventType, aBubbles, aCancelable);
119 var cancel = !aTarget.dispatchEvent(
event);
122 var eventHandlerAttrName =
"on" + aEventType;
123 if (aTarget.hasAttribute(eventHandlerAttrName)) {
124 var func =
new Function(
"event",
125 aTarget.getAttribute(eventHandlerAttrName));
126 var result = func.call(aTarget,
event);
_getSelectedPageStyle s i