home *** CD-ROM | disk | FTP | other *** search
/ Online Praxis 1998 March / Image.iso / CD-ROM / NETSCAPE / CCK / INSTBLDR.Z / asw.jar / clayer1.js < prev    next >
Encoding:
Text File  |  1998-02-27  |  26.3 KB  |  813 lines

  1. <!--  to hide script contents from old browsers
  2.  
  3.  
  4.  
  5. compromisePrincipals();
  6.  
  7.  
  8.  
  9. function page(file,section,variable)
  10. {
  11.     this.type = "INFO";
  12.     this.file=file;
  13.     this.section=section;
  14.     this.variable=variable;
  15.  
  16.     this.fullhistory=false;
  17.     this.top=false;
  18. }
  19.  
  20.  
  21.  
  22. function condition(file,section,variable,value)
  23. {
  24.     this.type = "CONDITION";
  25.     this.file=file;
  26.     this.section=section;
  27.     this.variable=variable;
  28.     this.value=value;
  29. }
  30.  
  31.  
  32.  
  33. function method(file,method,value)
  34. {
  35.     this.type = "METHOD";
  36.     this.file=file;
  37.     this.method=method;
  38.     this.value=value;
  39. }
  40.  
  41.  
  42.  
  43. function action(file)
  44. {
  45.     this.type = "ACTION";
  46.     this.file=file;
  47. }
  48.  
  49.  
  50.  
  51. function checkEditMode()
  52. {
  53.     if (parent.parent && parent.parent.globals && parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes")    {
  54.         return(true);
  55.         }
  56.     else    {
  57.         return(false);
  58.         }
  59. }
  60.  
  61.  
  62.  
  63. pages=new Array();
  64.  
  65. pages[0]=new Array();
  66. pages[0][0]=new page("main.htm",null,null);
  67. pages[0][1]=new method("ipreview/inpvw1.htm","parent.content.go('Internet Preview')",true);
  68. pages[0][2]=new method("preview/duepvw1.htm","parent.content.go('Preview')",true);
  69. pages[0][3]=new method("intro/intro1.htm","parent.controls.checkShowIntroFlag('')",true);
  70. pages[0][4]=new condition("intro/intro1.htm","Mode Selection","Show_Intro_Screens","yes");
  71. pages[0][5]=new condition("needs1.htm","Mode Selection","ForceNew","yes");
  72. pages[0][6]=new condition("useAcct.htm","Mode Selection","ForceExisting","yes");
  73. pages[0][7]=new action("accounts.htm");
  74.  
  75. pages[1]=new Array();
  76. pages[1][0]=new page("accounts.htm",null,null);
  77. pages[1][1]=new method("needs1.htm","parent.content.go('New Path')",true);
  78. pages[1][2]=new method("useAcct.htm","parent.content.go('Existing Path')",true);
  79.  
  80. // New Account Path
  81.  
  82. pages[2]=new Array();
  83. pages[2][0]=new page("needs1.htm","New Acct Mode","ShowNewPathInfo");
  84. pages[2][1]=new condition("newAcct.htm","New Acct Mode","ShowNewPathInfo","no");
  85. pages[2][2]=new method("newAcct.htm","parent.content.go('')",true);
  86.  
  87. pages[3]=new Array();
  88. pages[3][0]=new page("newAcct.htm","New Acct Mode","AskPersonalInfo");
  89. pages[3][1]=new condition("billing.htm","New Acct Mode","AskPersonalInfo","no");
  90. pages[3][2]=new method("billing.htm","parent.content.go('')",true);
  91.  
  92. pages[4]=new Array();
  93. pages[4][0]=new page("billing.htm","New Acct Mode","AskBillingInfo");
  94. pages[4][1]=new condition("modem1.htm","New Acct Mode","AskBillingInfo","no");
  95. pages[4][2]=new method("modem1.htm","parent.content.go('')",true);
  96.  
  97. pages[5]=new Array();
  98. pages[5][0]=new page("modem1.htm",null,null);
  99. pages[5][1]=new method("dialinf1.htm","parent.content.go('')",true);
  100.  
  101. pages[6]=new Array();
  102. pages[6][0]=new page("dialinf1.htm",null,null);
  103. pages[6][1]=new method("dialinf2.htm","parent.content.go('')",true);
  104.  
  105. pages[7]=new Array();
  106. pages[7][0]=new page("dialinf2.htm",null,null);
  107. pages[7][1]=new method("connect1.htm","parent.content.go('New Path')",true);
  108. pages[7][2]=new method("connect2.htm","parent.content.go('Existing Path')",true);
  109.  
  110. pages[8]=new Array();
  111. pages[8][0]=new page("connect1.htm",null,null);
  112. pages[8][1]=new method("editfour.htm", "checkEditMode('')", true);
  113. pages[8][2]=new method("register.htm","parent.content.go('')",true);
  114.  
  115. pages[9]=new Array();
  116. pages[9][0]=new page("register.htm",null,null);
  117.  
  118. // Existing Account Path
  119.  
  120. pages[10]=new Array();
  121. pages[10][0]=new page("useAcct.htm",null,null);
  122. pages[10][1]=new condition("needs2.htm","Mode Selection","ExistingSRFile","...");
  123. pages[10][2]=new method("needs2.htm","parent.content.go('')",true);
  124.  
  125. pages[11]=new Array();
  126. pages[11][0]=new page("needs2.htm","Existing Acct Mode","ShowExistingPathInfo");
  127. pages[11][1]=new condition("acctInfo.htm","Existing Acct Mode","ShowExistingPathInfo","no");
  128. pages[11][2]=new method("acctInfo.htm","parent.content.go('')",true);
  129.  
  130. pages[12]=new Array();
  131. pages[12][0]=new page("acctInfo.htm","Existing Acct Mode","AskName");
  132. pages[12][1]=new condition("dial.htm","Existing Acct Mode","AskName","no");
  133. pages[12][2]=new method("dial.htm","parent.content.go('')",true);
  134.  
  135. pages[13]=new Array();
  136. pages[13][0]=new page("dial.htm","Existing Acct Mode","AskPhone");
  137. pages[13][1]=new condition("namepw.htm","Existing Acct Mode","AskPhone","no");
  138. pages[13][2]=new method("namepw.htm","parent.content.go('')",true);
  139.  
  140. pages[14]=new Array();
  141. pages[14][0]=new page("namepw.htm","Existing Acct Mode","AskLogin");
  142. pages[14][1]=new condition("email.htm","Existing Acct Mode","AskLogin","no");
  143. pages[14][2]=new method("email.htm","parent.content.go('')",true);
  144.  
  145. pages[15]=new Array();
  146. pages[15][0]=new page("email.htm","Existing Acct Mode","AskEmail");
  147. pages[15][1]=new condition("servers.htm","Existing Acct Mode","AskEmail","no");
  148. pages[15][2]=new method("servers.htm","parent.content.go('')",true);
  149.  
  150. pages[16]=new Array();
  151. pages[16][0]=new page("servers.htm","Existing Acct Mode","AskHosts");
  152. pages[16][1]=new condition("dns.htm","Existing Acct Mode","AskHosts","no");
  153. pages[16][2]=new method("dns.htm","parent.content.go('')",true);
  154.  
  155. pages[17]=new Array();
  156. pages[17][0]=new page("dns.htm","Existing Acct Mode","AskDNS");
  157. pages[17][1]=new condition("publish.htm","Existing Acct Mode","AskDNS","no");
  158. pages[17][2]=new method("publish.htm","parent.content.go('')",true);
  159.  
  160. pages[18]=new Array();
  161. pages[18][0]=new page("publish.htm","Existing Acct Mode","AskPublishing");
  162. pages[18][1]=new condition("modem1.htm","Existing Acct Mode","AskPublishing","no");
  163. pages[18][2]=new method("modem1.htm","parent.content.go('')",true);
  164.  
  165. pages[19]=new Array();
  166. pages[19][0]=new page("connect2.htm",null,null);
  167. pages[19][1]=new method(null,"parent.content.go('Connect Now')",true);
  168. pages[19][2]=new method("error.htm","parent.content.go('error.htm')",true);
  169.  
  170. // Final Screens
  171.  
  172. pages[20]=new Array();
  173. pages[20][0]=new page("ok.htm",null,null);
  174.  
  175. pages[21]=new Array();
  176. pages[21][0]=new page("okreboot.htm",null,null);
  177.  
  178. pages[22]=new Array();
  179. pages[22][0]=new page("error.htm",null,null);
  180. pages[22][1]=new method("register.htm","parent.content.go('New Path')",true);
  181. pages[22][2]=new method("connect2.htm","parent.content.go('Existing Path')",true);
  182.  
  183. pages[23]=new Array();
  184. pages[23][0]=new page("later.htm",null,null);
  185. pages[23][1]=new method("later.htm","parent.content.go('Done')",true);
  186.  
  187. // Settings
  188.  
  189. pages[24]=new Array();
  190. pages[24][0]=new page("settings.htm",null,null);
  191.  
  192. // About Box
  193.  
  194. pages[25]=new Array();
  195. pages[25][0]=new page("aboutbox.htm",null,null);
  196.  
  197. // Manage IAS Servers
  198.  
  199. pages[26]=new Array();
  200. pages[26][0]=new page("addias.htm",null,null);
  201.  
  202. // Manage NCI Servers
  203.  
  204. pages[27]=new Array();
  205. pages[27][0]=new page("addnci.htm",null,null);
  206.  
  207. // Dialup Edition Preview Screens
  208.  
  209. pages[28]=new Array();
  210. pages[28][0]=new page("preview/duepvw1.htm",null,null);
  211. //pages[28][0].fullhistory=true;
  212. pages[28][1]=new method("preview/duepvw2.htm","parent.content.go('')",true);
  213.  
  214. pages[29]=new Array();
  215. pages[29][0]=new page("preview/duepvw2.htm",null,null);
  216. pages[29][1]=new method("preview/duepvw3.htm","parent.content.go('')",true);
  217.  
  218. pages[30]=new Array();
  219. pages[30][0]=new page("preview/duepvw3.htm",null,null);
  220. pages[30][1]=new method("preview/duepvw4.htm","parent.content.go('')",true);
  221.  
  222. pages[31]=new Array();
  223. pages[31][0]=new page("preview/duepvw4.htm",null,null);
  224. pages[31][1]=new method("preview/duepvw5.htm","parent.content.go('')",true);
  225.  
  226. pages[32]=new Array();
  227. pages[32][0]=new page("preview/duepvw5.htm",null,null);
  228. pages[32][1]=new method("preview/duepvw6.htm","parent.content.go('')",true);
  229.  
  230. pages[33]=new Array();
  231. pages[33][0]=new page("preview/duepvw6.htm",null,null);
  232. pages[33][1]=new method("preview/duepvw7.htm","parent.content.go('')",true);
  233.  
  234. pages[34]=new Array();
  235. pages[34][0]=new page("preview/duepvw7.htm",null,null);
  236. pages[34][1]=new method("preview/duepvw7a.htm","parent.content.go('')",true);
  237.  
  238. pages[35]=new Array();
  239. pages[35][0]=new page("preview/duepvw7a.htm",null,null);
  240. pages[35][1]=new method("preview/duepvw8.htm","parent.content.go('')",true);
  241.  
  242. pages[36]=new Array();
  243. pages[36][0]=new page("preview/duepvw8.htm",null,null);
  244. //pages[36][1]=new method("main.htm","parent.content.go('')",true);
  245. pages[36][1]=new action("main.htm");
  246.  
  247. // Internet Preview Screens
  248.  
  249. pages[37]=new Array();
  250. pages[37][0]=new page("ipreview/inpvw1.htm",null,null);
  251. //pages[37][0].fullhistory=true;
  252. pages[37][1]=new method("ipreview/inpvw2.htm","parent.content.go('')",true);
  253.  
  254. pages[38]=new Array();
  255. pages[38][0]=new page("ipreview/inpvw2.htm",null,null);
  256. pages[38][1]=new method("ipreview/inpvw3.htm","parent.content.go('')",true);
  257.  
  258. pages[39]=new Array();
  259. pages[39][0]=new page("ipreview/inpvw3.htm",null,null);
  260. pages[39][1]=new method("ipreview/inpvw4.htm","parent.content.go('')",true);
  261.  
  262. pages[40]=new Array();
  263. pages[40][0]=new page("ipreview/inpvw4.htm",null,null);
  264. pages[40][1]=new method("ipreview/inpvw5.htm","parent.content.go('')",true);
  265.  
  266. pages[41]=new Array();
  267. pages[41][0]=new page("ipreview/inpvw5.htm",null,null);
  268. pages[41][1]=new method("ipreview/inpvw6.htm","parent.content.go('')",true);
  269.  
  270. pages[42]=new Array();
  271. pages[42][0]=new page("ipreview/inpvw6.htm",null,null);
  272. pages[42][1]=new method("ipreview/inpvw7.htm","parent.content.go('')",true);
  273.  
  274. pages[43]=new Array();
  275. pages[43][0]=new page("ipreview/ipreview/inpvw7.htm",null,null);
  276. //pages[43][1]=new method("main.htm","parent.content.go('')",true);    
  277. pages[43][1]=new action("main.htm");                                    // XXX For Deluxe, change "main.htm" to "ipreview/inpvw8.htm"
  278.  
  279. pages[44]=new Array();
  280. pages[44][0]=new page("ipreview/inpvw8.htm",null,null);
  281. //pages[44][1]=new method("main.htm","parent.content.go('')",true);
  282. pages[44][1]=new action("main.htm");
  283.  
  284. // start screen
  285.  
  286. pages[45]=new Array();
  287. pages[45][0]=new page("start.htm",null,null);
  288. //pages[45][0].top=true;
  289.  
  290. // intro screens
  291.  
  292. pages[46]=new Array();
  293. pages[46][0]=new page("intro/intro1.htm",null,null);
  294. //pages[46][0].fullhistory=true;
  295. pages[46][1]=new method("intro/intro2.htm","parent.content.go('')",true);
  296.  
  297. pages[47]=new Array();
  298. pages[47][0]=new page("intro/intro2.htm",null,null);
  299. pages[47][1]=new method("intro/intro3.htm","parent.content.go('')",true);
  300.  
  301. pages[48]=new Array();
  302. pages[48][0]=new page("intro/intro3.htm",null,null);
  303. pages[48][1]=new method("intro/intro4.htm","parent.content.go('')",true);
  304.  
  305. pages[49]=new Array();
  306. pages[49][0]=new page("intro/intro4.htm",null,null);
  307. pages[49][1]=new method("intro/intro5.htm","parent.content.go('')",true);
  308.  
  309. pages[50]=new Array();
  310. pages[50][0]=new page("intro/intro5.htm",null,null);
  311. pages[50][1]=new method("intro/intro6.htm","parent.content.go('')",true);
  312.  
  313. pages[51]=new Array();
  314. pages[51][0]=new page("intro/intro6.htm",null,null);
  315. pages[51][1]=new condition("needs1.htm","Mode Selection","ForceNew","yes");
  316. pages[51][2]=new condition("useAcct.htm","Mode Selection","ForceExisting","yes");
  317. pages[51][3]=new action("accounts.htm");
  318.  
  319. pages[52]=new Array();
  320. pages[52][0]=new page("editfour.htm",null,null);
  321. pages[52][1]=new method("register.htm","parent.content.go('register.htm')",true);
  322. pages[52][2]=new method("ok.htm","parent.content.go('ok.htm')",true);
  323. pages[52][3]=new method("okreboot.htm","parent.content.go('okreboot.htm')",true);
  324. pages[52][4]=new method("error.htm","parent.content.go('error.htm')",true);
  325.  
  326.  
  327.  
  328. function checkShowIntroFlag()
  329. {
  330.     if (parent && parent.parent && parent.parent.globals)    {
  331.         var theFile = parent.parent.globals.getAcctSetupFilename(self);    
  332.  
  333.         var theFlag = parent.parent.globals.GetNameValuePair(theFile, "Mode Selection", "Show_Intro_Screens");
  334.         if (theFlag != null)    {
  335.             theFlag = theFlag.toLowerCase();
  336.             }
  337.         return (theFlag == "yes");
  338.         }
  339.     else    {
  340.         return(false);
  341.         }
  342. }
  343.  
  344.  
  345. function findPageOffset(file)
  346. {
  347.     if ((slashPos=file.lastIndexOf("/"))>0)    {
  348.         file=file.substring(slashPos+1,file.length);
  349.         }
  350.  
  351.     var    pageNum=-1;
  352.     for (var x=0; x<pages.length; x++)    {
  353.         for (var y=0; y<pages[x].length; y++)    {
  354.             if (pages[x][y].type=="INFO")    {
  355.                 var theName=pages[x][y].file;
  356.  
  357.                 if ((slashPos=theName.lastIndexOf("/"))>0)    {
  358.                     theName=theName.substring(slashPos+1,theName.length);
  359.                     }
  360.  
  361.                 if (theName == file)    {        // pages[x][y].file
  362.                     pageNum=x;
  363.                     }
  364.                 break;
  365.                 }
  366.             }
  367.         if (pageNum>=0)    break;
  368.         }
  369.  
  370.     if (parent && parent.parent && parent.parent.globals)    {
  371.         parent.parent.globals.debug("\tfindPageOffset: '" +file+ "' is " +pageNum);
  372.         }
  373.  
  374.     return(pageNum);
  375. }
  376.  
  377.  
  378.  
  379. function go(msg)
  380. {
  381.         var editMode=false;
  382.  
  383.     netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
  384.  
  385.     if (parent && parent.parent && parent.parent.globals)    {
  386.         editMode=(parent.parent.globals.document.vars.editMode.value.toLowerCase() == "yes") ? true:false;
  387.         }
  388.  
  389. //    var formName = new String(parent.content.location);
  390.     var formName = "" + parent.content.location;
  391.  
  392.     if ((x=formName.lastIndexOf("/"))>0)    {
  393.         formName=formName.substring(x+1,formName.length);
  394.         }
  395.     var pageNum=findPageOffset(formName);
  396.     if (pageNum>=0)    {
  397.         formName=pages[pageNum][0].file;
  398.         }
  399.  
  400. //        var startingPageName = parent.content.document.forms[0].name;
  401.         var startingPageName = formName;
  402.  
  403.         var thePlatform = new String(navigator.userAgent);
  404.         var x=thePlatform.indexOf("(")+1;
  405.         var y=thePlatform.indexOf(";",x+1);
  406.         thePlatform=thePlatform.substring(x,y);
  407.  
  408.         var separatorString=",";
  409.  
  410.     // process messages
  411.  
  412.     if (msg=="Next")    {
  413.         if (!parent || !parent.content || !parent.content.checkData)    return;
  414.         if (parent.content.loading) return;
  415.         if (editMode != true)    {
  416.             if (parent.content.checkData()==false)    {
  417.                 return;
  418.                 }
  419.             // workaround for onunload handler bugs in 4.0b2; no longer using onunload handler
  420.             if (parent.content.saveData!=null)    {
  421.                 parent.content.saveData();
  422.                 }
  423.             }
  424.  
  425.         var pageName = startingPageName;
  426.  
  427.         if (parent && parent.parent && parent.parent.globals)    {
  428.             parent.parent.globals.debug("\ngo: Starting at page " +pageName);
  429.             }
  430.  
  431.         var theFile = "";
  432.         if (parent && parent.parent && parent.parent.globals)    {
  433.             theFile = parent.parent.globals.getAcctSetupFilename(self);
  434.             }
  435.         var moved = false;
  436.         var active = true;
  437.  
  438.         while(active)    {
  439.             active=false;            
  440.             var pageNum=findPageOffset(pageName);
  441.             if (pageNum<0)    {
  442.                 alert("The file '"+ pageName + "' is unknown to Account Setup.");
  443.                 return;
  444.                 }
  445.  
  446.             for (var x=0; x<pages[pageNum].length; x++)    {
  447.                 if (editMode==false && pages[pageNum][x].type=="CONDITION")    {
  448.                     var theFlag = parent.parent.globals.GetNameValuePair(theFile,pages[pageNum][x].section, pages[pageNum][x].variable);
  449.                     theFlag = theFlag.toLowerCase();
  450.                     
  451.                     if (pages[pageNum][x].value == "...")    {
  452.                         if (theFlag != null && theFlag != "")    {
  453.                             active=moved=true;
  454.                             pageName=pages[pageNum][x].file;
  455.                             break;
  456.                             }
  457.                         }
  458.                     else if (theFlag == pages[pageNum][x].value)    {
  459.                         active=moved=true;
  460.                         pageName=pages[pageNum][x].file;
  461.                         break;
  462.                         }
  463.                     }
  464.     
  465.                 else if (moved==false && pages[pageNum][x].type=="METHOD")    {
  466.                     var val= eval(pages[pageNum][x].method);
  467.                         
  468.                     if (parent && parent.parent && parent.parent.globals)    {
  469.                         parent.parent.globals.debug("\tMethod: " +pages[pageNum][x].method);
  470.                         parent.parent.globals.debug("\tReturned: " +val);
  471.                         }
  472.  
  473.                     if (val==pages[pageNum][x].value)    {
  474.                         active=moved=true;
  475.                         pageName=pages[pageNum][x].file;
  476.                         break;
  477.                         }
  478.                     }
  479.  
  480.                 else if (moved==false && pages[pageNum][x].type=="ACTION")    {
  481.                     parent.parent.globals.debug("\tAction: " +pages[pageNum][x].file);
  482.                     active=false;
  483.                     moved=true;
  484.                     pageName=pages[pageNum][x].file;
  485.                     break;
  486.                     }
  487.  
  488.                 }
  489.             }
  490.         if (pageName != startingPageName)    {
  491.             if (parent && parent.parent && parent.parent.globals)    {
  492.                 if (parent.parent.globals.document.setupPlugin.NeedReboot() == true)    {
  493.                     parent.parent.globals.forceReboot(pageName);
  494.                     }
  495.                 else    {
  496.                     if (pageName == "main.htm")    {
  497.                         parent.parent.globals.document.vars.pageHistory.value = "";
  498.                         }
  499.                     else    {
  500.                         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  501.                         }
  502.     
  503.                     parent.parent.globals.debug("go: Moving to page " +pageName);
  504.     
  505.                     pages.current = pageName;
  506.                     parent.content.location.replace(pageName);
  507.  
  508.                     if (helpWindow && helpWindow != null)    {
  509.                         if (helpWindow.closed==false)    {
  510.                             doHelp(pageName);
  511.                             }
  512.                         }
  513.                     }
  514.                 }
  515.             else    {
  516.                 pages.current = pageName;
  517.  
  518.                 if (pages[pageNum][0].top == true)    {
  519.                     parent.location.replace(pageName);
  520.                     }
  521.                 else    {
  522.                     var theLoc = "" + parent.content.location;
  523.                     if ((x=theLoc.lastIndexOf("/"))>0)    {
  524.                         pageName=theLoc.substring(0,x+1) + pageName;
  525.                         }
  526.                     parent.content.location.replace(pageName);
  527.                     }
  528.                 }
  529.             }
  530.         }
  531.     else if (msg == "Back")    {
  532.         if (parent.content.loading) return;
  533.  
  534.         // workaround for onunload handler bugs in 4.0b2; no longer using onunload handler
  535.         if (parent.content.saveData!=null)    {
  536.             parent.content.saveData();
  537.             }
  538. //        parent.content.history.back();
  539.  
  540.         if (parent.content.verifyData)    {
  541.             var verifyFlag = parent.content.verifyData();
  542.             if (verifyFlag != true)    {
  543.                 generateControls();
  544.                 return;
  545.                 }
  546.             }
  547.  
  548.         if (parent && parent.parent && parent.parent.globals)    {
  549.             var historyCleanup = true;
  550.             while (historyCleanup == true)    {
  551.                 historyCleanup = false;
  552.  
  553.                 var pageHistory = parent.parent.globals.document.vars.pageHistory.value;
  554.                 if (pageHistory!="")    {            
  555.                     var pageName="";
  556.                     x = pageHistory.lastIndexOf(separatorString);
  557.                     pageHistory=pageHistory.substring(0,x);
  558.                     x = pageHistory.lastIndexOf(separatorString);
  559.                     if (x>=0)    {
  560.                         pageName=pageHistory.substring(x+1,pageHistory.length);
  561.                         parent.parent.globals.document.vars.pageHistory.value = pageHistory.substring(0,x+1);
  562.                         if ((pageName == "register.htm") || (pageName == "error.htm"))    {
  563.                             historyCleanup = true;
  564.                             }
  565.                         }
  566.                     else    {
  567.                         pageName=pageHistory;
  568.                         parent.parent.globals.document.vars.pageHistory.value="";
  569.                         }
  570.                     }
  571.                 }
  572.             parent.parent.globals.debug("go: Moving back to page " +pageName);
  573.             
  574.             if (pageName == "undefined")
  575.                 return;
  576.  
  577.             pages.current = pageName;
  578.             if (pageNum >= 0 && pages[pageNum][0].fullhistory == true)    {
  579.                 parent.parent.history.back();
  580.                 }
  581.             else    {
  582.                 parent.content.location.replace(pageName);
  583.                 }
  584.  
  585.             if (helpWindow && helpWindow != null)    {
  586.                 if (helpWindow.closed==false)    {
  587.                     doHelp(pageName);
  588.                     }
  589.                 }
  590.             }
  591.         else    {
  592.             if (pages[pageNum][0].fullhistory == true)    {
  593.                 parent.parent.history.back();
  594.                 }
  595.             else    {
  596.                 parent.content.history.back();
  597.                 }
  598.             }
  599.         }
  600.     else if (msg == "Help")    {
  601.         doHelp(formName);
  602.         }
  603.     else if (msg == "Show Screen")    {
  604.         var pageNum=findPageOffset(formName);
  605.         if (pageNum>=0)    {
  606.             var section=pages[pageNum][0].section;
  607.             var variable=pages[pageNum][0].variable;
  608.             if (section!=null && section!="" && variable!=null && variable!="")    {
  609.                 showScreenToggle=true;
  610.                 var theFile = parent.parent.globals.getAcctSetupFilename(self);
  611.                 var theFlag = parent.parent.globals.GetNameValuePair(theFile,section, variable);
  612.                 theFlag = theFlag.toLowerCase();
  613.                 if (theFlag == "no")    theFlag="yes";
  614.                 else            theFlag="no";
  615.                 
  616.                 parent.parent.SetNameValuePair(theFile,section, variable,theFlag);
  617.                 }
  618.             }
  619.         }
  620.     else if (msg == "Later")    {
  621.         if (parent.content.go("Later") == true)    {
  622.  
  623.             if ((parent.parent.globals.document.vars.editMode.value.toLowerCase() != "yes") || (confirm("Normally, this would complete the Account Setup process and quit Communicator.  Would you like to quit now?") == true))
  624.                 {
  625. //                    parent.content.location.href = "later.htm";
  626.                     if (parent && parent.parent && parent.parent.globals)    {
  627.                         if (parent.parent.globals.document.vars.editMode.value.toLowerCase() != "yes")
  628.                             parent.parent.globals.saveGlobalData();
  629.                         parent.parent.globals.document.setupPlugin.QuitNavigator();
  630.                         }
  631.                     window.close();
  632.                 }
  633.             }
  634.         }
  635.     else if (msg == "Done")    {
  636.         if (parent && parent.parent && parent.parent.globals)    {
  637.             if (parent.parent.globals.document.vars.editMode.value.toLowerCase() != "yes")
  638.                 parent.parent.globals.saveGlobalData();
  639.             if ((parent.parent.globals.document.vars.editMode.value.toLowerCase() != "yes") || (confirm("Normally, this would complete the Account Setup process and quit Communicator.  Would you like to quit now?") == true)) {    
  640.                 parent.parent.globals.document.setupPlugin.QuitNavigator();
  641.                 window.close();
  642.                 }
  643.             }
  644.         }
  645.     else if (msg == "Exit")    {
  646.         var    longMsgFlag = true;
  647.         var confirmFlag = false;
  648.         
  649.         if (formName.indexOf("main.htm")>=0)            longMsgFlag = false;
  650.         else if (formName.indexOf("aboutbox.htm")>=0)    longMsgFlag = false;
  651.         else if (formName.indexOf("error.htm")>=0)        longMsgFlag = false;
  652.         else if (formName.indexOf("intro/")>=0)            longMsgFlag = false;
  653.         else if (formName.indexOf("ipreview/")>=0)        longMsgFlag = false;
  654.         else if (formName.indexOf("preview/")>=0)        longMsgFlag = false;
  655.  
  656.         if (longMsgFlag == true)    {
  657.             if (parent.parent.globals.document.vars.editMode.value.toLowerCase() != "yes")    
  658.                 confirmFlag = confirm("Your haven't finished setting up your account. Are you sure you want to quit Account Setup?");
  659.             else    // this is for the account setup editor
  660.                 confirmFlag = confirm("Are you sure you want to quit the Account Setup Editor?");
  661.             }
  662.         else    {
  663.             confirmFlag = confirm("Quit Account Setup?");
  664.             }
  665.  
  666.         if (confirmFlag == true)    {
  667.             if (parent && parent.parent && parent.parent.globals)    {
  668.                 parent.parent.globals.saveGlobalData();
  669.                 parent.parent.globals.document.setupPlugin.QuitNavigator();
  670.                 }
  671.             window.close();
  672.             }
  673.         }
  674.     else if (msg == "Restart")    {
  675.         if (parent.parent.globals.document.vars.editMode.value.toLowerCase() != "yes")    {
  676.             parent.parent.globals.saveGlobalData();
  677.             parent.parent.globals.document.setupPlugin.Reboot(null);
  678.             window.close();
  679.             }
  680.         else    {
  681.             alert("Cannot reboot in edit mode.");
  682.             }
  683.         }
  684.     else if (msg == "About")    {
  685.         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  686.         pages.current = "aboutbox.htm";
  687.         parent.content.location.replace("aboutbox.htm");
  688.         }
  689.     else if (msg == "Setup")    {
  690.         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  691.  
  692.         var acctSetupFile = parent.parent.globals.getAcctSetupFilename(self);
  693.         var newPathFlag = parent.parent.globals.GetNameValuePair(acctSetupFile,"Mode Selection","ForceNew");
  694.         newPathFlag = newPathFlag.toLowerCase();
  695.         var existingPathFlag = parent.parent.globals.GetNameValuePair(acctSetupFile,"Mode Selection","ForceExisting");
  696.         existingPathFlag = existingPathFlag.toLowerCase();
  697.  
  698.         var pageName="";
  699.         if (newPathFlag == "yes" && existingPathFlag != "yes")    {
  700.             pageName = "needs1.htm";
  701.             }
  702.         else if (existingPathFlag == "yes" && newPathFlag != "yes")    {
  703.             pageName = "useAcct.htm";
  704.             }
  705.         else    {
  706.             pageName = "accounts.htm";
  707.             }
  708.         parent.content.location.replace(pageName);
  709.         if (helpWindow && helpWindow != null)    {
  710.             if (helpWindow.closed==false)    {
  711.                 doHelp(pageName);
  712.                 }
  713.             }
  714.         }
  715.     else if (msg == "Edit Settings")    {
  716.         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  717.         pages.current = "settings.htm";
  718.         parent.content.location.replace("../CG/docs/settings.htm");
  719.         }
  720.     else if (msg == "Manage Servers")    {
  721.         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  722.         pages.current = "editregs.htm";
  723.         parent.content.location.replace("../CG/docs/editregs.htm");
  724.         }
  725.     else if (msg == "Manage Accounts")    {
  726.         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  727.         pages.current = "editisps.htm";
  728.         parent.content.location.replace("../CG/docs/editisps.htm");
  729.         }
  730.     else if (msg == "Edit IAS")            {
  731.         if (thePlatform == "Macintosh")
  732.             parent.parent.globals.document.vars.pageHistory.value += "../../Tools/CG/docs/" + startingPageName + separatorString;
  733.         else
  734.             parent.parent.globals.document.vars.pageHistory.value += "../../../AccountSetupTools/CG/docs/" + startingPageName + separatorString;
  735.             
  736.         pages.current = "addias.htm";
  737.         parent.content.location.replace("ias/addias.htm");
  738.         }
  739.     else if (msg == "Edit NCI")            {
  740.         if (thePlatform == "Macintosh")
  741.             parent.parent.globals.document.vars.pageHistory.value += "../../Tools/CG/docs/" + startingPageName + separatorString;
  742.         else
  743.             parent.parent.globals.document.vars.pageHistory.value += "../../../AccountSetupTools/CG/docs/" + startingPageName + separatorString;
  744.         pages.current = "addnci.htm";
  745.         parent.content.location.replace("nci/addnci.htm");
  746.         }    
  747.     else if (msg == "Screen Options")    {
  748.         parent.parent.globals.document.vars.pageHistory.value += startingPageName + separatorString;
  749.             
  750.         if (formName == "namepw.htm")    {
  751.                 pages.current = "asktty.htm";
  752.                 parent.content.location.replace("../CG/docs/asktty.htm");
  753.                 }
  754.         //else if (formName == "servers.htm")    {
  755.         //        pages.current = "askserv.htm";
  756.         //        parent.content.location.replace("../CG/docs/askserv.htm");
  757.         //        }
  758.         else if (formName == "ok.htm")    {
  759.                 pages.current = "asksvinf.htm";
  760.                 parent.content.location.replace("../CG/docs/asksvinf.htm");
  761.                 }
  762.         else if (formName == "okreboot.htm")    {
  763.                 pages.current = "asksvinf.htm";
  764.                 parent.content.location.replace("../CG/docs/asksvinf.htm");
  765.                 }
  766.         else if (formName == "billing.htm") {
  767.                 pages.current = "editcc.htm";
  768.                 parent.content.location.replace("../CG/docs/editcc.htm");
  769.                 }
  770.         else if (formName == "main.htm")    {
  771.                 pages.current = "settings.htm";
  772.                 parent.content.location.replace("../CG/docs/settings.htm");
  773.                 }
  774.         else if (formName == "useAcct.htm")    {
  775.                 pages.current = "editisps.htm";
  776.                 parent.content.location.replace("../CG/docs/editisps.htm");
  777.                 }
  778.         else if (formName == "connect1.htm") {
  779.                 pages.current = "editregs.htm";
  780.                 parent.content.location.replace("../CG/docs/editregs.htm");
  781.                 }        
  782.  
  783.         }    //end screen options special casing
  784.         
  785.     else    
  786.         parent.content.go(msg);
  787. //    generateControls();
  788. }
  789.  
  790.  
  791.  
  792. function loadData()
  793. {
  794.     var file="";
  795.         
  796. //    preLoadImages();
  797.  
  798.     if (parent && parent.parent && parent.parent.globals)    {
  799.         file = parent.parent.globals.document.vars.startupFile.value;
  800.         }
  801.     if (file != null && file != "")    {
  802.         if (parent && parent.parent && parent.parent.globals)    {
  803.             parent.parent.globals.document.vars.startupFile.value = "";
  804.             }
  805.         parent.content.location.replace(file);
  806.         }
  807.     generateControls();
  808. }
  809.  
  810.  
  811.  
  812. // end hiding contents from old browsers  -->
  813.