Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

941 lines
25 KiB

  1. // Constants
  2. var g_bMigration = 0;
  3. var gselectedISPIndx = 0;
  4. var gCurrISPURL = "about:blank";
  5. var gpgType = -1;
  6. var gLastProg = 0;
  7. var PAGE_REFDIAL = 0;
  8. var PAGE_ISPLIST = 1;
  9. var PAGE_ISPDIAL = 2;
  10. var PAGE_ISPPAGE = 3;
  11. var PAGE_SERVERR = 4;
  12. var PAGE_REFDRDY = 5;
  13. var PAGE_MIGDRDY = 6;
  14. var PAGE_REGDIAL = 7;
  15. var PAGETYPE_ISP_NORMAL = 0x20;
  16. var PAGETYPE_ISP_TOS = 0x40;
  17. var PAGETYPE_ISP_FINISH = 0x80;
  18. var PAGETYPE_ISP_CUSTOMFINISH = 0x100;
  19. var PAGEFLAG_SAVE_CHECKBOX = 1;
  20. // Localization strings
  21. var L_REF_STATUS_DIALING_Text = "Dialing...";
  22. var L_REF_STATUS_LOCATING_Text = "Locating service";
  23. var L_REF_STATUS_CONNECTING_Text = "Connecting to service";
  24. var L_REF_STATUS_CONNECTED_Text = "Connected";
  25. var L_REF_STATUS_DOWNLOAD_Text = "Downloading information about ISPs...";
  26. var L_REFDIALTITLE_TEXT = "Finding Internet service providers in your area";
  27. var L_REFDIALINTRO_TEXT = "Microsoft is retrieving a list of Internet service providers (ISPs) in your area so you can select the one you want to use.";
  28. var REFERALDLCOMPLETED = "{E9E228E0-7A58-11D3-8B99-00A0C91E7F3C}";
  29. var gCurrPage = -1;
  30. var gDialerr = 0;
  31. var TEMP_KEY = "\\Temp";
  32. var ISPINDX = "ISPindex";
  33. var g_IgnoreDialErr = false;
  34. var g_CustomISPName = null;
  35. function SetCustomISPName(Name)
  36. {
  37. g_CustomISPName = Name;
  38. }
  39. // Description: Disable all the buttons
  40. // Used to prevent script error caused by
  41. // double clicking or rapid clicking
  42. // of two different buttons. E.g. when someone click
  43. // next and back quickly.
  44. //
  45. function DisableButtons()
  46. {
  47. g.MigPagePlsWaitText.style.visibility = "visible";
  48. try
  49. {
  50. g.btnNext.disabled=true;
  51. }
  52. catch(e) {}
  53. try
  54. {
  55. g.btnBack.disabled=true;
  56. }
  57. catch(e) {}
  58. try
  59. {
  60. InitButtons();
  61. }
  62. catch(e) {}
  63. }
  64. //////////////////////////////////////////////////////////////////////////////////////
  65. // drdyref.htm
  66. //////////////////////////////////////////////////////////////////////////////////////
  67. var L_drdyref_2_ICS_Text = "Windows will now use your Shared Internet Connection to migrate your existing Internet account setting so you will be able to use it with your new computer";
  68. var L_drdyref_4_ICS_Text = "To proceed, provide the information below and click <b>Next</b>. To continue without migrating an existing account, click <b>Skip</b>.";
  69. var L_drdymig_2_ICS_Text = "Windows will now use your Shared Internet Connection to begin re-establishing your existing Internet account. &nbsp; Click <b>Next</b> to begin connecting.";
  70. var L_drdymig_4_ICS_Text = "To proceed, provide the information below and click <b>Next</b>. To continue without re-establishing an existing Internet Account, click <b>Skip</b>.";
  71. var g_ISPAuto = 1;
  72. var g_CalledFromDrdyref = false;
  73. function drdyref_LoadMe(btnSW)
  74. {
  75. gCurrPage = PAGE_REFDRDY;
  76. InitFrameRef();
  77. if (g != null)
  78. {
  79. g_FirstFocusElement = g.btnNext;
  80. g_FirstFocusElement.focus();
  81. }
  82. InitNewButtons();
  83. var fTapi = TapiObj.IsTAPIConfigured;
  84. if (!fTapi && !g_bTapiDone)
  85. {
  86. g.drdyref_ctrl1.style.visibility="visible";
  87. if(g_CountryIdx < 0)
  88. {
  89. g_CountryIdx = TapiObj.get_CountryIndex;
  90. }
  91. g.selCountry.selectedIndex=g_CountryIdx;
  92. g.edtAreaCode.value = TapiObj.get_AreaCode;
  93. if(1 == TapiObj.get_PhoneSystem)
  94. g.radioTouchToneYes.checked = true; //touch tone
  95. else
  96. g.radioTouchToneNo.checked = true; //rotary
  97. }
  98. if (true == ApiObj.get_OOBEDebugMode)
  99. {
  100. g.spnOutsideLine.style.visibility = "visible";
  101. }
  102. drdyref_SetOutsideLine( );
  103. if (g_ISPAuto == 1)
  104. {
  105. g.radioYesISPAuto.checked = true;
  106. g.radioNoISPAuto.checked = false;
  107. }
  108. else
  109. {
  110. g.radioYesISPAuto.checked = false;
  111. g.radioNoISPAuto.checked = true;
  112. }
  113. g_CalledFromDrdyref = true;
  114. g.btnNext.onclick = ISPNextBtnHandler;
  115. g.btnSkip.onclick = ISPSkipBtnHandler;
  116. }
  117. function checkISPSetupType()
  118. {
  119. if (g.radioYesISPAuto.checked == true)
  120. g_ISPAuto = 1;
  121. else
  122. g_ISPAuto = 2;
  123. }
  124. function drdyref_OutsideLineClicked( )
  125. {
  126. try
  127. {
  128. if (null == g.event)
  129. return;
  130. }
  131. catch(e)
  132. {
  133. return;
  134. }
  135. drdyref_SetOutsideLine( );
  136. }
  137. function drdyref_SetOutsideLine( )
  138. {
  139. if (true == g.radioOutsideLineYes.checked &&
  140. "visible" == g.spnOutsideLine.style.visibility)
  141. {
  142. g.spnOutsideLineNumber.style.visibility = "visible";
  143. g.edtOutsideLineNumber.style.visibility = "visible";
  144. g.edtOutsideLineNumber.value = TapiObj.get_DialOut;
  145. if (0 == g.edtOutsideLineNumber.value.length)
  146. {
  147. g.edtOutsideLineNumber.value = "9";
  148. }
  149. }
  150. else
  151. {
  152. g.edtOutsideLineNumber.value = "";
  153. g.spnOutsideLineNumber.style.visibility = "hidden";
  154. g.spnOutsideLine.style.visibility = "hidden";
  155. }
  156. }
  157. function drdymig_LoadMe()
  158. {
  159. gCurrPage = PAGE_MIGDRDY;
  160. InitFrameRef();
  161. if (g != null)
  162. {
  163. g_FirstFocusElement = g.btnNext;
  164. g_FirstFocusElement.focus();
  165. }
  166. InitNewButtons();
  167. var fTapi = TapiObj.IsTAPIConfigured;
  168. if (!fTapi && !g_bTapiDone)
  169. {
  170. g.drdyref_ctrl1.style.visibility="visible";
  171. if(g_CountryIdx < 0)
  172. {
  173. g_CountryIdx = TapiObj.get_CountryIndex;
  174. }
  175. g.selCountry.selectedIndex=g_CountryIdx;
  176. g.edtAreaCode.value = TapiObj.get_AreaCode;
  177. if(1 == TapiObj.get_PhoneSystem)
  178. g.radioTouchToneYes.checked = true; //touch tone
  179. else
  180. g.radioTouchToneNo.checked = true; //rotary
  181. }
  182. g.btnNext.onclick = ISPNextBtnHandler;
  183. g.btnSkip.onclick = ISPSkipBtnHandler;
  184. }
  185. var bMSgDisplay = true;
  186. function ISPNextBtnHandler()
  187. {
  188. trace("ISPNextBtnHandler: CurrentPage: " + gCurrPage);
  189. switch (gCurrPage)
  190. {
  191. case PAGE_REFDRDY:
  192. case PAGE_MIGDRDY:
  193. {
  194. if (g.drdyref_ctrl1.style.visibility == "visible")
  195. {
  196. TapiObj.set_AreaCode = g.edtAreaCode.value;
  197. TapiObj.set_CountryIndex = g.selCountry.selectedIndex;
  198. if (g.PulseToneDialing.style.visibility != "hidden")
  199. {
  200. if (g.radioTouchToneYes.checked)
  201. TapiObj.set_PhoneSystem = 1;
  202. else
  203. TapiObj.set_PhoneSystem = 0;
  204. }
  205. }
  206. if ("visible" == g.spnOutsideLine.style.visible &&
  207. true == g.radioOutsideLineYes.checked &&
  208. "visible" == g.spnOutsideLineNumber.style.visibility
  209. )
  210. {
  211. TapiObj.set_DialOut = g.edtOutsideLineNumber.value;
  212. }
  213. if (window.external.CheckPhoneBook("msobe.isp"))
  214. {
  215. if (!g_CalledFromDrdyref)
  216. {
  217. GoToDialingPage();
  218. }
  219. else
  220. {
  221. g_CalledFromDrdyref = false;
  222. if (g_ISPAuto == 1)
  223. GoToDialingPage();
  224. else
  225. GoNext(); // This will navigate to iconnect.htm
  226. }
  227. }
  228. else
  229. {
  230. Navigate("isperror\\isppberr.htm");
  231. }
  232. break;
  233. }
  234. case PAGE_REFDIAL:
  235. {
  236. // NO Next button on this page
  237. break;
  238. }
  239. case PAGE_ISPLIST:
  240. {
  241. // if something selected
  242. // if use network
  243. // go to CKPT_??
  244. // else
  245. // go to CKPT_MIGDIAL
  246. // else if message already displayed
  247. // go to CKPT_OEMCUST
  248. // else
  249. // display message
  250. if (-1 == gselectedISPIndx)
  251. {
  252. // We need to display some a message to contact ISP
  253. if (bMSgDisplay && (g.selISPDropList.length != 1))
  254. {
  255. // Set this to false so user will navigate when the Next
  256. // button is pressed again.
  257. //
  258. bMSgDisplay = false;
  259. // Hide the selection controls and display the message.
  260. //
  261. g.selISPDropList.style.display = "none";
  262. g.drdyisp_4_spanID.style.display = "none";
  263. g.btnManual.style.display = "none";
  264. g.ManualBtnLocalText01.style.display = "none";
  265. g.MigListTitle.style.display="none";
  266. g.MigListTxt.style.display="none";
  267. g.MigListTxt2.style.display="none";
  268. // g.selectedISPName.style.display="none";
  269. gselectedISPIndx = -1;
  270. g.MigListNoOffer.style.display="inline";
  271. g.MigListTxtNoOffer.style.display="inline";
  272. }
  273. else
  274. {
  275. GoNavigate(CKPT_OEMCUST);
  276. }
  277. }
  278. else
  279. {
  280. // From ISP selection page, advance to the isp pre-dialing page
  281. // g_navigate(g_OOBEDir + "setup\\migdial.htm");
  282. GoNavigate(CKPT_MIGDIAL);
  283. }
  284. break;
  285. }
  286. case PAGE_ISPDIAL:
  287. {
  288. break;
  289. }
  290. case PAGE_ISPPAGE: // ISP hosting page
  291. {
  292. trace("ISPNextBtnHandler: gpgType: " + gpgType);
  293. switch (gpgType)
  294. {
  295. case PAGETYPE_ISP_NORMAL:
  296. case PAGETYPE_ISP_TOS:
  297. {
  298. DisableButtons();
  299. if (false == window.external.Migrate_GoNext())
  300. {
  301. OnServerErrorEx(0);
  302. }
  303. break;
  304. }
  305. case PAGETYPE_ISP_FINISH:
  306. {
  307. DisableButtons();
  308. var szINSURL = window.external.get_URL(1);
  309. if (true == window.external.ProcessINS(szINSURL))
  310. {
  311. // ProcessINS creates a connectoid which will be firewalled
  312. // at the end of OOBE via an API from HomeNet. We don't want
  313. // the firewalling if there is one or more net cards because
  314. // the function call can affect bridging of the net cards.
  315. if (HasNetwork())
  316. {
  317. window.external.FirewallPreferredConnection(false);
  318. }
  319. GoNavigate(CKPT_OEMCUST);
  320. }
  321. else
  322. Navigate("isperror\\ispins.htm");
  323. break;
  324. }
  325. case PAGETYPE_ISP_CUSTOMFINISH:
  326. {
  327. break;
  328. }
  329. case PAGE_SERVERR:
  330. {
  331. //PopCKPT(); // Pop the double check point
  332. GoNavigate(CKPT_MIGLIST);
  333. break;
  334. }
  335. }
  336. break;
  337. }
  338. }
  339. }
  340. function ISPBackBtnHandler()
  341. {
  342. g_bMigration = 0;
  343. switch (gCurrPage)
  344. {
  345. case PAGE_REFDIAL:
  346. {
  347. g_IgnoreDialErr = true;
  348. window.external.Hangup();
  349. PopCKPT(CKPT_REFDIAL); // Pop the dial ready checkpoint
  350. GoBack(); //GoNavigate(CKPT_ISPSIGNUP);
  351. break;
  352. }
  353. case PAGE_ISPLIST:
  354. {
  355. window.external.Hangup();
  356. if (!bMSgDisplay)
  357. {
  358. bMSgDisplay = true;
  359. g.selISPDropList.style.display = "inline";
  360. g.drdyisp_4_spanID.style.display = "inline";
  361. g.btnManual.style.display = "inline";
  362. g.ManualBtnLocalText01.style.display = "inline";
  363. g.MigListTitle.style.display="inline";
  364. g.MigListTxt.style.display="inline";
  365. g.MigListTxt2.style.display="inline";
  366. // g.selectedISPName.style.display="inline";
  367. g.MigListTxtNoOffer.style.display="none";
  368. g.MigListNoOffer.style.display="none";
  369. g.selISPDropList.focus();
  370. }
  371. else
  372. {
  373. GoBack();
  374. }
  375. break;
  376. }
  377. case PAGE_ISPDIAL:
  378. {
  379. g_IgnoreDialErr = true;
  380. window.external.Hangup();
  381. PopCKPT(CKPT_MIGDIAL); // Pop the dial ready checkpoint
  382. GoBack(); // GoNavigate(CKPT_MIGLIST);
  383. break;
  384. }
  385. case PAGE_ISPPAGE:
  386. {
  387. DisableButtons();
  388. if (false == window.external.Migrate_GoBack())
  389. {
  390. window.external.Hangup();
  391. PopCKPT(CKPT_MIGDIAL); // Pop the double check point
  392. GoBack();
  393. }
  394. break;
  395. }
  396. case PAGE_REGDIAL:
  397. {
  398. window.external.Hangup();
  399. GoBack();
  400. break;
  401. }
  402. case PAGE_SERVERR:
  403. {
  404. window.external.Hangup();
  405. PopCKPT(); // Pop the double check point
  406. GoNavigate(CKPT_MIGLIST);
  407. break;
  408. }
  409. }
  410. }
  411. function ISPSkipBtnHandler()
  412. {
  413. window.external.Hangup();
  414. PopCKPT();
  415. g_bMigration = 0;
  416. GoCancel();
  417. }
  418. function HandleISPDropListChange()
  419. {
  420. gselectedISPIndx = g.selISPDropList.selectedIndex;
  421. // g.selectedISPName.value=g.selISPDropList.options(gselectedISPIndx).text;
  422. ApiObj.set_RegValue(HKEY_LOCAL_MACHINE, OOBE_MAIN_REG_KEY + TEMP_KEY, ISPINDX, gselectedISPIndx);
  423. // The "My ISP is not listed" entry is always last in the list. If it is
  424. // selected, pretend that no entry was selected.
  425. //
  426. if ((gselectedISPIndx+1) == g.selISPDropList.length)
  427. gselectedISPIndx = -1;
  428. }
  429. // Referral dialing page
  430. function Refdial_LoadMe()
  431. {
  432. InitFrameRef()
  433. g.btnNext.disabled = true;
  434. InitNewButtons();
  435. gCurrPage = PAGE_REFDIAL;
  436. g.btnNext.onclick = ISPNextBtnHandler;
  437. g.btnBack.onclick = ISPBackBtnHandler;
  438. g.btnSkip.onclick = ISPSkipBtnHandler;
  439. if (g != null && g.spnReferralStatus != null)
  440. g.spnReferralStatus.innerText = L_REF_STATUS_DIALING_Text;
  441. setTimeout("DoReferralDial()" , 40); //BUGBUG #define this at the top, and why do we have to wait 40 milliseconds anyway?
  442. }
  443. function Miglist_Manual_Btn_Handler()
  444. {
  445. GoNavigate(CKPT_ICONNECT);
  446. }
  447. // ISP Sel page
  448. function Miglist_LoadMe()
  449. {
  450. InitFrameRef()
  451. InitNewButtons();
  452. gCurrPage = PAGE_ISPLIST;
  453. g.btnNext.onclick = ISPNextBtnHandler;
  454. g.btnBack.onclick = ISPBackBtnHandler;
  455. g.btnSkip.onclick = ISPSkipBtnHandler;
  456. g.selISPDropList.style.width = 300;
  457. g.btnManual.onmouseover = HandleNextButtonMouseOver;
  458. g.btnManual.onmouseout = HandleNextButtonMouseOut;
  459. g.btnManual.onmousedown = HandleNextButtonMouseDown;
  460. g.btnManual.className="newbuttonsNext";
  461. g.btnManual.onclick = Miglist_Manual_Btn_Handler;
  462. try
  463. {
  464. gselectedISPIndx = ApiObj.get_RegValue(HKEY_LOCAL_MACHINE, OOBE_MAIN_REG_KEY + TEMP_KEY, ISPINDX)
  465. }
  466. catch (e)
  467. {
  468. gselectedISPIndx = 0;
  469. }
  470. if (g.selISPDropList.length <= 0)
  471. {
  472. // Go back one page
  473. PopCKPT(); // Pop the current check point
  474. ISPBackBtnHandler();
  475. }
  476. else if (g.selISPDropList.length == 1)
  477. {
  478. // My ISP is not on the list
  479. gselectedISPIndx = -1;
  480. g.MigListNoOffer.style.display="inline";
  481. g.MigListTxtNoOffer.style.display="inline";
  482. }
  483. else
  484. {
  485. if ((gselectedISPIndx + 1) > g.selISPDropList.length)
  486. gselectedISPIndx = 0;
  487. g.selISPDropList.onchange = HandleISPDropListChange;
  488. g.selISPDropList.selectedIndex = gselectedISPIndx;
  489. // g.selectedISPName.value=g.selISPDropList.options(gselectedISPIndx).text;
  490. // If isp is not on the list:
  491. if ((gselectedISPIndx + 1) == g.selISPDropList.length)
  492. gselectedISPIndx = -1;
  493. g.selISPDropList.style.display = "inline";
  494. g.drdyisp_4_spanID.style.display = "inline";
  495. g.btnManual.style.display = "inline";
  496. g.ManualBtnLocalText01.style.display = "inline";
  497. g.MigListTitle.style.display="inline";
  498. g.MigListTxt.style.display="inline";
  499. g.MigListTxt2.style.display="inline";
  500. // g.selectedISPName.style.display="inline";
  501. g.selISPDropList.focus();
  502. }
  503. }
  504. // ISP dialing page
  505. function Migdial_LoadMe()
  506. {
  507. InitFrameRef()
  508. g.btnNext.disabled = true;
  509. InitNewButtons();
  510. gCurrPage = PAGE_ISPDIAL;
  511. g.btnNext.onclick = ISPNextBtnHandler;
  512. g.btnBack.onclick = ISPBackBtnHandler;
  513. g.btnSkip.onclick = ISPSkipBtnHandler;
  514. try
  515. {
  516. gselectedISPIndx = ApiObj.get_RegValue(HKEY_LOCAL_MACHINE, OOBE_MAIN_REG_KEY + TEMP_KEY, ISPINDX)
  517. }
  518. catch (e)
  519. {
  520. gselectedISPIndx = 0;
  521. }
  522. setTimeout("DoISPDial(" + gselectedISPIndx + ")" , 40); //BUGBUG #define this at the top, and why do we have to wait 40 milliseconds anyway?
  523. }
  524. // ISP Access page
  525. function Migpage_LoadMe()
  526. {
  527. InitFrameRef();
  528. g.spnSaveInfo.style.display="none";
  529. InitNewButtons();
  530. gCurrPage = PAGE_ISPPAGE;
  531. g.MigPagePlsWaitText.style.visibility = "hidden";
  532. g.TOSFramespn.style.display = "none";
  533. g.btnNext.onclick = ISPNextBtnHandler;
  534. g.btnBack.onclick = ISPBackBtnHandler;
  535. g.btnSkip.onclick = ISPSkipBtnHandler;
  536. g.ISPContent.style.display = "none";
  537. g.TOSFramespn.style.display = "none";
  538. g.TOSRadioSpn.style.display = "none";
  539. g.ISPContent.innerHTML = ReadContent();
  540. window.external.walk();
  541. gpgType = window.external.get_PageType();
  542. switch (gpgType)
  543. {
  544. case PAGETYPE_ISP_NORMAL:
  545. {
  546. g.ISPContent.style.display = "inline";
  547. break;
  548. }
  549. case PAGETYPE_ISP_TOS:
  550. {
  551. g.TOSFrame.navigate(gCurrISPURL);
  552. g.TOSFramespn.style.display = "inline";
  553. g.TOSRadioSpn.style.display = "inline";
  554. break;
  555. }
  556. default:
  557. {
  558. g.ISPContent.style.display = "inline";
  559. break;
  560. }
  561. }
  562. var pgFlag = window.external.get_PageFlag();
  563. switch (pgFlag)
  564. {
  565. case PAGEFLAG_SAVE_CHECKBOX:
  566. {
  567. //alert("PAGEFLAG_SAVE_CHECKBOX");
  568. g.spnSaveInfo.style.display="inline";
  569. break;
  570. }
  571. }
  572. }
  573. function ReadContent()
  574. {
  575. var fso, f, r = "";
  576. var ForReading = 1;
  577. try
  578. {
  579. fso = new ActiveXObject("Scripting.FileSystemObject");
  580. if ("" == gCurrISPURL)
  581. return;
  582. f = fso.OpenTextFile(gCurrISPURL, ForReading);
  583. r = f.ReadAll();
  584. f.Close();
  585. }
  586. catch(e) {}
  587. return r;
  588. }
  589. function DoReferralDial()
  590. {
  591. g_bMigration = 1;
  592. g_IgnoreDialErr = false;
  593. if ((UseModem()) && window.external.CheckOnlineStatus &&
  594. window.external.CheckStayConnected("migrate.isp"))
  595. {
  596. window.external.Connect(CONNECTED_REFFERAL, "migrate.isp");
  597. }
  598. else
  599. {
  600. window.external.DialEx(CONNECTED_REFFERAL, "migrate.isp");
  601. }
  602. }
  603. function DoISPDial(dISP)
  604. {
  605. g_bMigration = 1;
  606. g_IgnoreDialErr = false;
  607. window.external.DialEx(CONNECTED_ISP_MIGRATE, "", dISP);
  608. }
  609. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  610. function OnDialingErrorEx(derr)
  611. {
  612. window.external.Hangup();
  613. if (g_IgnoreDialErr)
  614. return;
  615. switch (derr)
  616. {
  617. case DERR_PORT_OR_DEVICE:
  618. case DERR_PORT_ALREADY_OPEN:
  619. case DERR_HARDWARE_FAILURE:
  620. case DERR_DIALTONE:
  621. Navigate("isperror\\ispdtone.htm");
  622. break;
  623. case DERR_BUSY:
  624. Navigate("isperror\\ispphbsy.htm");
  625. break;
  626. case DERR_VOICEANSWER:
  627. case DERR_PPP_TIMEOUT:
  628. Navigate("isperror\\isphdshk.htm");
  629. break;
  630. case DERR_NO_CARRIER:
  631. case DERR_REMOTE_DISCONNECT:
  632. Navigate("isperror\\ispcnerr.htm");
  633. break;
  634. case DERR_NOANSWER:
  635. Navigate("isperror\\ispnoanw.htm");
  636. break;
  637. default:
  638. Navigate("isperror\\isphdshk.htm");
  639. break;
  640. }
  641. }
  642. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  643. function OnServerErrorEx(derr)
  644. {
  645. window.external.Hangup();
  646. if (g_IgnoreDialErr)
  647. return;
  648. Navigate("isperror\\ispsbusy.htm");
  649. }
  650. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  651. var L_NAME_OF_ISP_Text = "MSN";
  652. function OnDialingEx()
  653. {
  654. // Called when dialing type != CONNECTED_REGISTRATION
  655. if (g != null && g.spnISPName != null)
  656. {
  657. switch (g_CurrentCKPT)
  658. {
  659. case CKPT_ISPDIAL:
  660. g.spnISPName.innerText = (g_CustomISPName == null) ?
  661. L_NAME_OF_ISP_Text : g_CustomISPName;
  662. break;
  663. default:
  664. g.spnISPName.innerText = window.external.get_ISPName;
  665. break;
  666. }
  667. }
  668. if (g != null && g.spnDialing != null)
  669. g.spnDialing.innerText = window.external.get_DialNumber;
  670. }
  671. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  672. function OnConnectingEx()
  673. {
  674. switch (g_CurrentCKPT)
  675. {
  676. case CKPT_REFDIAL:
  677. if (g != null && g.spnReferralStatus != null)
  678. g.spnReferralStatus.innerText = L_REF_STATUS_CONNECTING_Text;
  679. break;
  680. }
  681. }
  682. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  683. function OnDownloadingEx()
  684. {
  685. // Next line of code added by TandyT to support special ISP signup process commands
  686. // Calls to function in agtcore.js
  687. Agent_TurnOnISPSpecialCommands();
  688. // Static control over online pages
  689. try
  690. {
  691. window.parent.document.frames("connDelay").frameElement.style.zIndex=3;
  692. window.parent.document.frames("connDelay").frameElement.style.display="inline";
  693. window.parent.document.frames("connDelay").document.body.style.cursor='wait';
  694. }
  695. catch (e)
  696. {
  697. }
  698. switch (g_CurrentCKPT)
  699. {
  700. case CKPT_REFDIAL:
  701. if (g != null)
  702. {
  703. if (g.spnReferralStatus != null)
  704. {
  705. g.spnReferralStatus.innerText = L_REF_STATUS_CONNECTED_Text;
  706. }
  707. if (g.spnTblProgressBar != null)
  708. {
  709. g.spnTblProgressBar.style.visibility="visible";
  710. }
  711. }
  712. break;
  713. }
  714. }
  715. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  716. function OnDisconnectEx()
  717. {
  718. }
  719. function SetProg(i)
  720. {
  721. // Status item starts at 1
  722. if (0 == i )
  723. return;
  724. if ((i>0) && (i<=100))
  725. {
  726. for (var j = gLastProg; j < i; j++)
  727. {
  728. if (g != null && g.tblProg != null)
  729. g.tblProg.rows(0).cells(j).style.backgroundColor = "green";
  730. }
  731. gLastProg = i;
  732. }
  733. }
  734. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  735. function OnConnectedEx()
  736. {
  737. g_bTapiDone = true;
  738. switch (g_CurrentCKPT)
  739. {
  740. case CKPT_REFDIAL:
  741. if (g != null && g.spnReferralStatus != null)
  742. g.spnReferralStatus.innerText = L_REF_STATUS_CONNECTED_Text;
  743. if (g != null && g.spnTblProgressBar != null)
  744. g.spnTblProgressBar.style.visibility="visible";
  745. break;
  746. }
  747. }
  748. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  749. function OnRefDownloadProgressEx(dprog)
  750. {
  751. if (g != null && g.spnReferralStatus != null)
  752. {
  753. g.spnReferralStatus.innerText = L_REF_STATUS_DOWNLOAD_Text;
  754. g.refdial_title1.innerText = L_REFDIALTITLE_TEXT;
  755. g.refdial_intro1.innerText = L_REFDIALINTRO_TEXT;
  756. }
  757. // UPDATE PROGRESS BAR
  758. SetProg(dprog);
  759. }
  760. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  761. function OnRefDownloadCompleteEx(bRet)
  762. {
  763. var TIME_FOR_PROGRESS_BAR_FILL = 1000;
  764. // NAVIGATE TO ERROR OR THE NEXT PAGE
  765. if (1 == bRet)
  766. {
  767. window.external.Hangup();
  768. StatusObj.set_Status(REFERALDLCOMPLETED, true);
  769. setTimeout("GoNavigate(" + CKPT_MIGLIST + ")", TIME_FOR_PROGRESS_BAR_FILL);
  770. }
  771. else
  772. {
  773. OnServerErrorEx(0);
  774. }
  775. }
  776. <!--REQUIRED FUNCTION NAME:: DO NOT OVERLOAD OR ALTER-->
  777. function OnISPDownloadCompleteEx(szURL)
  778. {
  779. // alert("OnISPDownloadCompleteEx: " + szURL);
  780. if ("" == szURL)
  781. {
  782. OnServerErrorEx(0);
  783. }
  784. else
  785. {
  786. gCurrISPURL = szURL;
  787. Navigate("setup\\Migpage.htm");
  788. }
  789. }
  790. function TOSRadioClick()
  791. {
  792. if (g.radioAgree.checked)
  793. {
  794. g.btnNext.disabled=false;
  795. g.btnNext.className="buttons";
  796. }
  797. else if (g.radioDisAgree.checked)
  798. {
  799. g.btnNext.disabled=true;
  800. g.btnNext.className="buttons-disabled";
  801. }
  802. }