home *** CD-ROM | disk | FTP | other *** search
- function Startup()
- {
- checkAll();
- }
-
- function checkAll()
- {
- var IMPlayAll = document.getElementById("IMPlayAll");
- var playSoundSignon = document.getElementById("playSoundSignon");
- var sndPlaySignOff = document.getElementById("sndPlaySignOff");
- var sndPlayFirstIncoming = document.getElementById("sndPlayFirstIncoming");
- var sndPlayIncoming = document.getElementById("sndPlayIncoming");
- var sndPlayOutgoing = document.getElementById("sndPlayOutgoing");
- var sndChat = document.getElementById("sndChat");
- var rcvChat = document.getElementById("rcvChat");
-
- if(IMPlayAll.checked)
- {
- playSoundSignon.removeAttribute("disabled");
- sndPlaySignOff.removeAttribute("disabled");
- sndPlayFirstIncoming.removeAttribute("disabled");
- sndPlayIncoming.removeAttribute("disabled");
- sndPlayOutgoing.removeAttribute("disabled");
- sndChat.removeAttribute("disabled");
- rcvChat.removeAttribute("disabled");
-
- //buttons
- document.getElementById("tbSound").setAttribute("disabled","false");
- document.getElementById("btnsndPlaySignOff").setAttribute("disabled","false");
- document.getElementById("btnsndPlayFirstIncoming").setAttribute("disabled","false");
- document.getElementById("btnsndPlayIncoming").setAttribute("disabled","false");
- document.getElementById("btnsndPlayOutgoing").setAttribute("disabled","false");
- document.getElementById("btnsndChat").setAttribute("disabled","false");
- document.getElementById("btnrcvChat").setAttribute("disabled","false");
-
- //browse buttons
- document.getElementById("SndSignOnChooseFile").setAttribute("disabled","false");
- document.getElementById("SndSignOffChooseFile").setAttribute("disabled","false");
- document.getElementById("SndFirstIncomingChooseFile").setAttribute("disabled","false");
- document.getElementById("SndIncomingChooseFile").setAttribute("disabled","false");
- document.getElementById("SndOutgoingChooseFile").setAttribute("disabled","false");
- document.getElementById("SndChatOutgoingChooseFile").setAttribute("disabled","false");
- document.getElementById("SndChatIncomingChooseFile").setAttribute("disabled","false");
- }
- else
- {
- playSoundSignon.setAttribute("disabled", "true");
- sndPlaySignOff.setAttribute("disabled", "true");
- sndPlayFirstIncoming.setAttribute("disabled", "true");
- sndPlayIncoming.setAttribute("disabled", "true");
- sndPlayOutgoing.setAttribute("disabled", "true");
- sndChat.setAttribute("disabled", "true");
- rcvChat.setAttribute("disabled", "true");
-
- //buttons
- document.getElementById("tbSound").setAttribute("disabled","true");
- document.getElementById("btnsndPlaySignOff").setAttribute("disabled","true");
- document.getElementById("btnsndPlayFirstIncoming").setAttribute("disabled","true");
- document.getElementById("btnsndPlayIncoming").setAttribute("disabled","true");
- document.getElementById("btnsndPlayOutgoing").setAttribute("disabled","true");
- document.getElementById("btnsndChat").setAttribute("disabled","true");
- document.getElementById("btnrcvChat").setAttribute("disabled","true");
-
- //browse buttons
- document.getElementById("SndSignOnChooseFile").setAttribute("disabled","true");
- document.getElementById("SndSignOffChooseFile").setAttribute("disabled","true");
- document.getElementById("SndFirstIncomingChooseFile").setAttribute("disabled","true");
- document.getElementById("SndIncomingChooseFile").setAttribute("disabled","true");
- document.getElementById("SndOutgoingChooseFile").setAttribute("disabled","true");
- document.getElementById("SndChatOutgoingChooseFile").setAttribute("disabled","true");
- document.getElementById("SndChatIncomingChooseFile").setAttribute("disabled","true");
- }
- }
-
-
- /*
- * Function: selectFile(pref)
- *
- * Arguments: prefs.
- *
- * Return: none
- *
- * Description: Called when Browse is clicked in Pref Notification Pabel.
- * Opens the filepicker window and sets the pref.
- *
- * Author: Suresh Kasinathan<suresh@netscape.com> 12/10/01
- *
- */
-
- function selectFile(prefs) {
- var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(Components.interfaces.nsIFilePicker);
- if (!fp) {
- dump("Unable to create file picker...\n");
- return;
- }
- fp.init(window, aimString("cn.title"), Components.interfaces.nsIFilePicker.modeOpen);
- fp.appendFilter(aimString("cn.filetypes"), "*.wav");
- var ret = fp.show();
- if (ret == Components.interfaces.nsIFilePicker.returnOK && fp.fileURL.spec) {
- var fileurl = fp.fileURL.spec;
- // we need to write immediately to pref on OK. The 'normal' prefs are written to prefs.js
- // only on OK'ing the pref window. This is a special case.
- aimPrefsManager().SetCharPref(prefs, fileurl, null, false);
- }
-
- }