/* for xpconnect */ var signonviewer = Components.classes ["component://netscape/signonviewer/signonviewer-world"].createInstance(); signonviewer = signonviewer.QueryInterface(Components.interfaces.nsISignonViewer); function DoGetSignonList() { return signonviewer.GetSignonValue(); } function DoGetRejectList() { return signonviewer.GetRejectValue(); } function DoGetNopreviewList() { return signonviewer.GetNopreviewValue(); } function DoGetNocaptureList() { return signonviewer.GetNocaptureValue(); } function DoSave(value) { signonviewer.SetValue(value, window); } /* end of xpconnect stuff */ index_frame = 0; title_frame = 1; spacer1_frame = 2; list_frame = 3; spacer2_frame = 4; button_frame = 5; var signon_mode; var signonList = []; var rejectList = []; var nopreviewList = []; var nocaptureList = []; deleted_signons = new Array; deleted_rejects = new Array; deleted_nopreviews = new Array; deleted_nocaptures = new Array; function DeleteItemSelected() { if (signon_mode == 0) { DeleteSignonSelected(); } else if (signon_mode == 1) { DeleteRejectSelected(); } else if (signon_mode == 2) { DeleteNopreviewSelected(); } else if (signon_mode == 3) { DeleteNocaptureSelected(); } } function DeleteSignonSelected() { selname = top.frames[list_frame].document.fSelectSignon.selname; goneS = top.frames[button_frame].document.buttons.goneS; var p; var i; for (i=selname.options.length; i>0; i--) { if (selname.options[i-1].selected) { selname.options[i-1].selected = 0; goneS.value = goneS.value + selname.options[i-1].value + ","; deleted_signons[selname.options[i-1].value] = 1; selname.remove(i-1); } } } function DeleteRejectSelected() { selname = top.frames[list_frame].document.fSelectReject.selname; goneR = top.frames[button_frame].document.buttons.goneR; var p; var i; for (i=selname.options.length; i>0; i--) { if (selname.options[i-1].selected) { selname.options[i-1].selected = 0; goneR.value = goneR.value + selname.options[i-1].value + ","; deleted_rejects[selname.options[i-1].value] = 1; selname.remove(i-1); } } } function DeleteNopreviewSelected() { selname = top.frames[list_frame].document.fSelectNopreview.selname; goneP = top.frames[button_frame].document.buttons.goneP; var p; var i; for (i=selname.options.length; i>0; i--) { if (selname.options[i-1].selected) { selname.options[i-1].selected = 0; goneP.value = goneP.value + selname.options[i-1].value + ","; deleted_nopreviews[selname.options[i-1].value] = 1; selname.remove(i-1); } } } function DeleteNocaptureSelected() { selname = top.frames[list_frame].document.fSelectNocapture.selname; goneC = top.frames[button_frame].document.buttons.goneC; var p; var i; for (i=selname.options.length; i>0; i--) { if (selname.options[i-1].selected) { selname.options[i-1].selected = 0; goneC.value = goneC.value + selname.options[i-1].value + ","; deleted_nocaptures[selname.options[i-1].value] = 1; selname.remove(i-1); } } } function loadSignons(){ signon_mode = 0; top.frames[index_frame].document.open(); top.frames[index_frame].document.write( "" + "" + "" + "" + "" + // "" + // "" + "" + // "" + "" + "" + "
" + "" + "Logons saved" + "" + "" + "" + "Logons not saved" + "" + "
" + "" + "Forms not previewed" + "" + "" + // "" + // "Forms not saved" + // "" + // "   
" + "" ); top.frames[index_frame].document.close(); top.frames[title_frame].document.open(); top.frames[title_frame].document.write (" Logon information that has been saved"); top.frames[title_frame].document.close(); loadSignonsList(); } function loadSignonsList(){ top.frames[list_frame].document.open(); top.frames[list_frame].document.write( "
" + "

" + "site:username" + "" + "" + "" + "" + "
" + "
" + "

" + "" + "

" + "
" + "
" + "

" + "
" ); top.frames[list_frame].document.close(); } function loadRejects(){ signon_mode = 1; top.frames[index_frame].document.open(); top.frames[index_frame].document.write( "" + "" + "" + "" + "" + "" + // "" + // "" + "" + // "" + "" + "" + "
" + "" + "Logons saved" + "" + "" + "" + "Logons not saved" + "" + "   
" + "" + "Forms not previewed" + "" + "" + // "" + // "Forms not saved" + // "" + // "   
" + "" ); top.frames[index_frame].document.close(); top.frames[title_frame].document.open(); top.frames[title_frame].document.write (" Sites for which logon information won't be saved"); top.frames[title_frame].document.close(); loadRejectsList(); } function loadRejectsList(){ top.frames[list_frame].document.open(); top.frames[list_frame].document.write( "
" + "

" + "" + "" + "" + "" + "
" + "
" + "

" + "" + "

" + "
" + "
" + "

" + "
" ); top.frames[list_frame].document.close(); } function loadNopreviews(){ signon_mode = 2; top.frames[index_frame].document.open(); top.frames[index_frame].document.write( "" + "" + "" + "" + "" + // "" + // "" + "" + // "" + "" + "" + "
" + "" + "Logons saved" + "" + "" + "" + "Logons not saved" + "" + "
" + "" + "Forms not previewed" + "" + "" + // "" + // "Forms not saved" + // "" + // "   
" + "" ); top.frames[index_frame].document.close(); top.frames[title_frame].document.open(); top.frames[title_frame].document.write (" Forms that won't be previewed before being pre-filled"); top.frames[title_frame].document.close(); loadNopreviewsList(); } function loadNopreviewsList(){ top.frames[list_frame].document.open(); top.frames[list_frame].document.write( "
" + "

" + "" + "" + "" + "" + "
" + "
" + "

" + "" + "

" + "
" + "
" + "

" + "
" ); top.frames[list_frame].document.close(); } function loadNocaptures(){ signon_mode = 3; top.frames[index_frame].document.open(); top.frames[index_frame].document.write( "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "
" + "" + "Logons saved" + "" + "" + "" + "Logons not saved" + "" + "
" + "" + "Forms not previewed" + "" + "" + "" + "Forms not saved" + "" + "   
" + "" ); top.frames[index_frame].document.close(); top.frames[title_frame].document.open(); top.frames[title_frame].document.write (" Forms that won't be saved"); top.frames[title_frame].document.close(); loadNocapturesList(); } function loadNocapturesList(){ top.frames[list_frame].document.open(); top.frames[list_frame].document.write( "
" + "

" + "" + "" + "" + "" + "
" + "
" + "

" + "" + "

" + "
" + "
" + "

" + "
" ); top.frames[list_frame].document.close(); } function loadButtons(){ top.frames[button_frame].document.open(); top.frames[button_frame].document.write( "
" + "
" + " " + "" + "
" + "" + "   " + "" + "
" + "" + "" + "" + "" + "" + "" + "
" ); top.frames[button_frame].document.close(); } function loadFrames(){ list = DoGetSignonList(); BREAK = list[0]; signonList = list.split(BREAK); list = DoGetRejectList(); BREAK = list[0]; rejectList = list.split(BREAK); list = DoGetNopreviewList(); BREAK = list[0]; nopreviewList = list.split(BREAK); list = DoGetNocaptureList(); BREAK = list[0]; nocaptureList = list.split(BREAK); loadSignons(); loadButtons(); } function Save(){ var goneS = top.frames[button_frame].document.buttons.goneS; var goneR = top.frames[button_frame].document.buttons.goneR; var goneP = top.frames[button_frame].document.buttons.goneP; var goneC = top.frames[button_frame].document.buttons.goneC; var result = "|goneS|"+goneS.value+"|goneR|"+goneR.value; result += "|goneC|"+goneC.value+"|goneP|"+goneP.value+"|"; DoSave(result); } function Cancel(){ var result = "|goneS||goneR||goneC||goneP||"; DoSave(result); }