home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 December / DPPCPRO1202.ISO / Extras / Assistum / setup.exe / Msointl.dll / HTML / BE_SHARED.JS < prev    next >
Encoding:
Text File  |  2001-02-13  |  20.8 KB  |  573 lines

  1. //-----------------------------------------------------------------------------
  2. //    const value
  3. //-----------------------------------------------------------------------------
  4. TIME_AFTER_LOADING = 100
  5. ENTER_KEY_CODE       = 13
  6. SPACE_KEY_CODE     = 32
  7.  
  8. //-----------------------------------------------------------------------------
  9. //    All Action Descriptions
  10. //-----------------------------------------------------------------------------
  11. ACTION_NEW_LICENSE                        = 0
  12. ACTION_CC_RENEWAL                        = 1
  13. ACTION_RETAIL_RENEWAL                    = 2
  14. ACTION_REVISE_CUSTOMERINFO                = 3
  15. ACTION_REFUND_ISSURED                    = 4
  16. ACTION_CC_RENEWAL_FOR_EXPIRED_REISSUE    = 5
  17. ACTION_REISSUE_OR_CC_RENEWAL            = 6
  18. ACTION_REISSUE_OR_CC_RENEWAL__I            = 7
  19. ACTION_REISSUE_OR_CC_RENEWAL__N            = 8
  20. ACTION_ORW_REISSUE                        = 9
  21. ACTION_DROP_LICENSE                        = 10
  22.  
  23. ACTION_TELEPHONE_ACTIVATION             = 20
  24. ACTION_TELEPHONE_RENEWAL                = 21
  25.  
  26. //-----------------------------------------------------------------------------
  27. //    Offline Page Index
  28. //-----------------------------------------------------------------------------
  29. GOTO_OFFLINE_PAGE_1    = 1        //fe_regmeth1.htm -- welcome page
  30. GOTO_OFFLINE_PAGE_2    = 2        //fe_update.htm -- reg option page
  31. GOTO_PREVIOUS_PAGE    = 3        //goto previous page
  32. GOTO_CURRENT_PAGE    = 4        //stay current page
  33.  
  34. //-----------------------------------------------------------------------------
  35. //    All return code from License Agent
  36. //-----------------------------------------------------------------------------
  37. ERROR_SUCCESS       = 0
  38.  
  39. //--success code
  40. ESL_ERR_CODE_BASE                = 0xB000
  41. ESL_ERR_NEW_LICENSE                        = (ESL_ERR_CODE_BASE+45)    //- NewLicenseRequest
  42. ESL_ERR_REISSUE_OR_CC_RENEWAL            = (ESL_ERR_CODE_BASE+46)    //- Reissue/CCRenewal
  43. ESL_ERR_ORW_REISSUE                        = (ESL_ERR_CODE_BASE+52)    //- Reissue for ORW only
  44. ESL_ERR_CC_RENEWAL_FOR_EXPIRED_REISSUE    = (ESL_ERR_CODE_BASE+49)    //- CCRenewal for expired Reissue
  45. ESL_ERR_CC_RENEWAL                        = (ESL_ERR_CODE_BASE+47)    //- CCRenewal
  46. ESL_ERR_RETAIL_RENEWAL                    = (ESL_ERR_CODE_BASE+38)    //- Retail Renewal
  47. ESL_ERR_REVISE_CUSTINFO                    = (ESL_ERR_CODE_BASE+62)    //- Revise CustInfo
  48. ESL_ERR_DROPPED_LICENSE                    = (ESL_ERR_CODE_BASE+66)    //- Drop License
  49.  
  50. //--Error Codes - we can not proceed to the next request
  51. ESL_ERR_TIME_OUTOFSYNC            = (ESL_ERR_CODE_BASE+16)
  52. ESL_ERR_INVALID_PARAMETER        = (ESL_ERR_CODE_BASE+17)
  53. ESL_ERR_REVOKED_LICENSE_EXISTS  = (ESL_ERR_CODE_BASE+19)
  54. ESL_ERR_CONTACT_CSR                = (ESL_ERR_CODE_BASE+22)
  55. ESL_ERR_REQUIRED_DATA_NOT_FOUND    = (ESL_ERR_CODE_BASE+23)
  56. ESL_ERR_INTERNAL_ERROR            = (ESL_ERR_CODE_BASE+24)
  57. ESL_ERR_TDO_TDN_FAILED            = (ESL_ERR_CODE_BASE+25)
  58. ESL_ERR_INVALID_REQUEST            = (ESL_ERR_CODE_BASE+26)
  59. ESL_ERR_INVALID_LICENSE_ID        = (ESL_ERR_CODE_BASE+28)
  60. ESL_ERR_BLOCKED_PID                = (ESL_ERR_CODE_BASE+34)
  61. ESL_ERR_REFUNDED_PID            = (ESL_ERR_CODE_BASE+35)
  62. ESL_ERR_MAX_UNLOCK_LIMIT        = (ESL_ERR_CODE_BASE+36)
  63. ESL_ERR_INVALID_LA_VERSION        = (ESL_ERR_CODE_BASE+44)
  64. ESL_ERR_INVALID_CERTIFICATE        = (ESL_ERR_CODE_BASE+48)
  65. ESL_ERR_INVALID_REQUEST_FOR_THIS_PROGRAM = (ESL_ERR_CODE_BASE+53)
  66. ESL_ERR_INVALID_CREDIT_CARD_INFO= (ESL_ERR_CODE_BASE+59)
  67. ESL_ERR_UNSUPPORTED_PID            = (ESL_ERR_CODE_BASE+60)
  68. ESL_ERR_DROPPED_LICENSE_MISMATCH= (ESL_ERR_CODE_BASE+67)
  69. ESL_ERR_OUT_OF_RANGE_PID        = (ESL_ERR_CODE_BASE+72)
  70.  
  71. ESL_ERR_BANNED_CREDIT_CARD                = (ESL_ERR_CODE_BASE+74)
  72. ESL_ERR_INVALID_ADDRESS                    = (ESL_ERR_CODE_BASE+75)
  73. ESL_ERR_CCTRANS_REFERRAL_CALL            = (ESL_ERR_CODE_BASE+76)
  74. ESL_ERR_CCTRANS_PICKUP                    = (ESL_ERR_CODE_BASE+77)
  75. ESL_ERR_CCTRANS_REENTER_INFO            = (ESL_ERR_CODE_BASE+78)
  76. ESL_ERR_CCTRANS_DECLINED                = (ESL_ERR_CODE_BASE+79)
  77. ESL_ERR_CCTRANS_INVALID_CC_NUMBER        = (ESL_ERR_CODE_BASE+80)
  78. ESL_ERR_CCTRANS_INVALID_EXPIRATION_DATE    = (ESL_ERR_CODE_BASE+81)
  79. ESL_ERR_CCTRANS_INVALID_FIRST_NAME        = (ESL_ERR_CODE_BASE+82)
  80. ESL_ERR_CCTRANS_INVALID_LAST_NAME        = (ESL_ERR_CODE_BASE+83)
  81. ESL_ERR_CCTRANS_INVALID_CURRENCY_CODE    = (ESL_ERR_CODE_BASE+84)
  82. ESL_ERR_CCTRANS_INTERNAL_ERROR            = (ESL_ERR_CODE_BASE+85)
  83. ESL_ERR_CCTRANS_UNKNOWN_ERROR            = (ESL_ERR_CODE_BASE+86)
  84. ESL_ERR_BAD_CCRENEWAL_COUNTRY_OR_MPC    = (ESL_ERR_CODE_BASE+87)
  85. ESL_ERR_BAD_VAT_FORMAT                    = (ESL_ERR_CODE_BASE+88)
  86. ESL_ERR_MULTIPLE_PRODUCT_PID            = (ESL_ERR_CODE_BASE+89)
  87. ESL_ERR_END_OF_LIFE                     = (ESL_ERR_CODE_BASE+90)
  88.  
  89.  
  90.  
  91. //--Error Code From Clearing Hource
  92. CH_CLIENT_E_BASE                = 0x6000
  93. CH_CLIENT_CH_CONNECT_FAILED        = (CH_CLIENT_E_BASE + 3)
  94. CH_CLIENT_CH_SUBMIT_FAILED        = (CH_CLIENT_E_BASE + 10)
  95.  
  96. //--Error Code From Clearing Hource Extension
  97. CH_EXT_E_BASE                    = 0x7000
  98. CH_EXT_CHCLIENT_CREATE_FAILED    = (CH_EXT_E_BASE + 1)
  99. CH_EXT_NOT_ENOUGH_MEMORY        = (CH_EXT_E_BASE + 2)
  100. CH_EXT_CH_MAINTENANCE_ON        = (CH_EXT_E_BASE + 3)
  101.  
  102. //--Error Code From Clearing Hource CH ICLIENT
  103. CH_ICLIENT_E_BASE                = 0x8000
  104. CH_ICLIENT_HTTP_SEND_FAILED        = (CH_ICLIENT_E_BASE + 9)
  105. CH_ICLIENT_CHEXT_STATUS_NOT_OK    = (CH_ICLIENT_E_BASE + 10)
  106. CH_ICLIENT_RESP_PBAG_GET_FAILED    = (CH_ICLIENT_E_BASE + 12)
  107. CH_ICLIENT_HTTP_SEND_CANCELED    = (CH_ICLIENT_E_BASE + 13)
  108.  
  109. //--Error Code From License Agent
  110. LA_ERROR_BASE                    = 0x250
  111. LA_ERR_REQUEST_IN_PROGRESS        = (LA_ERROR_BASE + 5)
  112. LA_ERR_MODEM_DIALUP_CONNECTION  = (LA_ERROR_BASE + 7)
  113.  
  114. //--Error Code From  License Store
  115. LS_ERROR_BASE                    = 0x50
  116. LS_ERROR_NOT_FOUND                = (LS_ERROR_BASE + 3)            //Attribute not found
  117.  
  118.  
  119. //-----------------------------------------------------------------------------
  120. // this function may take 1 or 2 paramters
  121. function ErrAlert( sMessage, sIconName )
  122. {
  123.     var sIconNameParam = "ERROR";
  124.     if( ErrAlert.arguments.length == 2 )
  125.     {
  126.         sIconNameParam = ErrAlert.arguments[1];
  127.     }
  128.  
  129.     global.show_alert(sMessage, "OK", sIconNameParam);
  130. }
  131.  
  132. //-----------------------------------------------------------------------------
  133. function ASSERT( bTest )
  134. {
  135.     if( bTest == -1 || bTest == false )
  136.     {
  137.         ErrAlert("ASSERT FAILED: JavaScript Error")
  138.     }
  139. }
  140.  
  141. //sheared functions------------------------------------------------------------
  142. //    this function will trim leading and trailing space
  143. //-----------------------------------------------------------------------------
  144. function TrimSpace(objCTRL)
  145. {
  146.     if( typeof(objCTRL) != "object" || objCTRL.type != "text" )
  147.     {    //if not text control, just return what ever input
  148.         return objCTRL;
  149.     }
  150.  
  151.     var strValue = objCTRL.value
  152.     if( strValue.length == 0 )
  153.     {
  154.         return;
  155.     }
  156.     var iLead = 0;
  157.     var iTrail= 0;
  158.  
  159.     for(iLead=0; iLead < strValue.length; iLead++)
  160.     {    //search the first leading space
  161.         if( strValue.charAt(iLead) != '\ ' && strValue.charCodeAt(iLead) != 0x3000 )
  162.         {    //0x3000 is the space for unicode
  163.             break;
  164.         }
  165.     }
  166.  
  167.     for(iTrail=strValue.length-1; iTrail >= 0 ; iTrail--)
  168.     {    //search the first trailing space
  169.         if( strValue.charAt(iTrail) != ' ' && strValue.charCodeAt(iTrail) != 0x3000 )
  170.         {
  171.             break;
  172.         }
  173.     }
  174.  
  175.     //trim sapce here
  176.     if( iLead > iTrail )
  177.     {
  178.         objCTRL.value = ""
  179.         return;
  180.     }
  181.     if( iLead == iTrail )
  182.     {
  183.         objCTRL.value = strValue.charAt(iLead);
  184.     }
  185.     else
  186.     {
  187.         objCTRL.value = strValue.substr(iLead , iTrail-iLead+1);
  188.     }
  189. }
  190.  
  191. //-----------------------------------------------------------------------------
  192. function IsTextBoxNotEmpty( oTextBox )
  193. {
  194.     ASSERT( oTextBox.type == "text" );
  195.     var sText = oTextBox.value;
  196.     for(var i=0; i < sText.length; i++)
  197.     {    //0x3000 is the space for unicode
  198.         if( sText.charAt(i) != ' '  && sText.charCodeAt(i) != 0x3000 )
  199.             return true;
  200.     }
  201.     return false;
  202. }
  203.  
  204. //-----------------------------------------------------------------------------
  205. function SelectItemInComboBox(oComboBox, strItemValue)
  206. {    //combo box values are always string values
  207.     //strItemValue = strItemValue.toString();
  208.  
  209.     if( typeof(oComboBox) != "object" || oComboBox.type != "select-one" )
  210.     {
  211.         return;
  212.     }
  213.  
  214.     for(var iItem=0; iItem < oComboBox.options.length; iItem++)
  215.     {
  216.         if( oComboBox.options[iItem].value == strItemValue )
  217.         {
  218.             oComboBox.selectedIndex = iItem;
  219.             break;
  220.         }
  221.     }
  222. }
  223.  
  224. //-----------------------------------------------------------------------------
  225. function SetControlFocusSelection(oControl)
  226. {
  227.     oControl.focus();                //gain focus
  228.     if( oControl.type == "text" )    //for edit box, select all text in it
  229.     {
  230.         oControl.select();
  231.     }
  232. }
  233.  
  234. //-----------------------------------------------------------------------------
  235. function GotoErrHandlingPage( iPageID )
  236. {
  237.     switch( iPageID )
  238.     {
  239.     case GOTO_CURRENT_PAGE:
  240.         break;
  241.  
  242.     case GOTO_PREVIOUS_PAGE:
  243.         global.back_click();
  244.         break;
  245.  
  246.     case GOTO_OFFLINE_PAGE_2:
  247.         parent.hist_index = 0;
  248.         location.href = "fe_update.htm";
  249.         break;
  250.  
  251.     case GOTO_OFFLINE_PAGE_1:
  252.     default:
  253.         //Disable BACK button in Error Handler page!
  254.         //NOTE: parent.next_click() will increase hist_index. but if this fun is called from
  255.         //GetProcessResult(), because time delay and alert box, next_click() is ended already
  256.         parent.hist_index = 0;
  257.         location.href = "fe_regmeth1.htm";
  258.         break;
  259.     }
  260. }
  261.  
  262. //-----------------------------------------------------------------------------
  263. // use this function to set button state. init_navbuttons() may cause all window flash
  264. //-----------------------------------------------------------------------------
  265. function DisableNavigateBtn( sButtonName )
  266. {
  267.     switch( sButtonName )
  268.     {
  269.     case "~Next":
  270.         parent.next_btn.disabled = true;
  271.         parent.default_btn_enabled = false;
  272.         break;
  273.     case "~Submit":
  274.         parent.submit_btn.disabled = true;
  275.         parent.default_btn_enabled = false;
  276.         break;
  277.     case "~Finish":
  278.         parent.finish_btn.disabled = true;
  279.         parent.default_btn_enabled = false;
  280.         break;
  281.     case "~Back":
  282.         parent.back_btn.disabled = true;
  283.         break;
  284.     }
  285. }
  286.  
  287. //-----------------------------------------------------------------------------
  288. function EnableNavigateBtn( sButtonName )
  289. {
  290.     switch( sButtonName )
  291.     {
  292.     case "Next":
  293.         parent.next_btn.disabled = false;
  294.         parent.default_btn_enabled = true;
  295.         break;
  296.     case "Submit":
  297.         parent.submit_btn.disabled = false;
  298.         parent.default_btn_enabled = true;
  299.         break;
  300.     case "Finish":
  301.         parent.finish_btn.disabled = false;
  302.         parent.default_btn_enabled = true;
  303.         break;
  304.     case "Back":
  305.         parent.back_btn.disabled = false;
  306.         break;
  307.     }
  308. }
  309.  
  310. //-----------------------------------------------------------------------------
  311. function StartOnlineTransaction( sDisableButtonName )
  312. {
  313.     global.init_logo(true);
  314.     DisableNavigateBtn(sDisableButtonName);        //disable NEXT or SUBMIT button
  315.     DisableNavigateBtn("~Back");
  316.  
  317.     document.body.style.cursor = "wait"
  318.     global.document.body.style.cursor = "wait"
  319.  
  320.     //disable all conytols
  321.     var oControls = document.all.tags("INPUT");  //"INPUT tag includes "text", "radio" and "checkbox"
  322.     for(var iCTRL=0; iCTRL<oControls.length; iCTRL++)
  323.     {
  324.         if( oControls(iCTRL).type == "text" || 
  325.             oControls(iCTRL).type == "radio" || 
  326.             oControls(iCTRL).type == "checkbox" )
  327.         { 
  328.             oControls(iCTRL).disabled = true;
  329.             oControls(iCTRL).style.cursor = "wait";
  330.         }
  331.     }
  332.  
  333.     oControls = document.all.tags("SELECT")
  334.     for(var iCTRL=0; iCTRL<oControls.length; iCTRL++)
  335.     {
  336.         oControls(iCTRL).disabled = true;
  337.         oControls(iCTRL).style.cursor = "wait";
  338.     }
  339.  
  340.     //last for country list in child IFRAME
  341.     if( typeof(idCountry) == "object" )
  342.     {
  343.         idCountry.disabled = true;
  344.     }
  345. }
  346.  
  347. //-----------------------------------------------------------------------------
  348. function EndOnlineTransaction( idTimer, sEnableButtonName )
  349. {
  350.     window.clearInterval(idTimer);
  351.     document.body.style.cursor = "auto"
  352.     global.document.body.style.cursor = "auto"
  353.     global.init_logo(false);
  354.  
  355.     //restore all controls
  356.     var oControls = document.all.tags("INPUT")
  357.     for(var iCTRL=0; iCTRL<oControls.length; iCTRL++)
  358.     {
  359.         if( oControls(iCTRL).type == "text" || 
  360.             oControls(iCTRL).type == "radio" || 
  361.             oControls(iCTRL).type == "checkbox" )
  362.         { 
  363.             oControls(iCTRL).disabled = false;
  364.             oControls(iCTRL).style.cursor = "auto";
  365.         }
  366.     }
  367.  
  368.     oControls = document.all.tags("SELECT")
  369.     for(var iCTRL=0; iCTRL<oControls.length; iCTRL++)
  370.     {
  371.         oControls(iCTRL).disabled = false;
  372.         oControls(iCTRL).style.cursor = "auto";
  373.     }
  374.  
  375.     //last for country list in child IFRAME
  376.     if( typeof(idCountry) == "object" )
  377.     {
  378.         idCountry.disabled = false;
  379.     }
  380.  
  381.     EnableNavigateBtn( sEnableButtonName );
  382.     EnableNavigateBtn("Back");
  383. }
  384.  
  385. //-----------------------------------------------------------------------------
  386. //    Error Description
  387. //-----------------------------------------------------------------------------
  388. function Alert_Exception( err )
  389. {    
  390.     var iErrHandlePage = parent.InUpdate ? GOTO_OFFLINE_PAGE_2 : GOTO_OFFLINE_PAGE_1;
  391.     var sErrMsg = "";
  392.  
  393.     switch( err.number )
  394.     {
  395.     case CH_EXT_CH_MAINTENANCE_ON:
  396.         L_ERRDESC1_TEXT = "Microsoft Activation Server is offline for regular maintenance or upgrade. Please try your request later.";
  397.         sErrMsg = L_ERRDESC1_TEXT;
  398.         break;
  399.  
  400.     case ESL_ERR_CONTACT_CSR:
  401.     case ESL_ERR_MAX_UNLOCK_LIMIT:
  402.         L_ERR2A_TEXT = "According to our records, this copy of ";
  403.         L_ERR2B_TEXT = " has already been activated on another computer. If you believe you have received this message in error, please contact a Customer Support Representative by clicking OK and following the instructions.";
  404.         sErrMsg = L_ERR2A_TEXT + global.ProductName + L_ERR2B_TEXT;
  405.         break;
  406.  
  407.     case ESL_ERR_BLOCKED_PID:
  408.         L_ERRDESC3_TEXT = "You have entered an unauthorized Product Key. Product activation cannot continue. For more information, you may contact a Customer Service Representative by selecting the Telephone option.";
  409.         sErrMsg = L_ERRDESC3_TEXT;
  410.         break;
  411.  
  412.     case ESL_ERR_INVALID_CERTIFICATE:
  413.         L_ERRDESC4_TEXT = "Your existing license seems to be invalid or corrupt. Please reinstall ";
  414.         sErrMsg = L_ERRDESC4_TEXT + parent.ProductName + ".";
  415.         break;
  416.  
  417.     case ESL_ERR_UNSUPPORTED_PID:
  418.     case ESL_ERR_OUT_OF_RANGE_PID:
  419.         L_ERRDESC5_TEXT = "Your Product ID is not valid. Please contact a Customer Service Representative by clicking OK and selecting the Telephone option.";
  420.         sErrMsg = L_ERRDESC5_TEXT;
  421.         break;
  422.  
  423.     case ESL_ERR_INVALID_CREDIT_CARD_INFO:
  424.         L_ERRDESC6_TEXT = "Your credit card company has informed us that they cannot approve this transaction at this time. You can either try using this card later, or enter another card number now.";
  425.         sErrMsg = L_ERRDESC6_TEXT;
  426.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  427.         break;
  428.  
  429.     case LA_ERR_MODEM_DIALUP_CONNECTION:
  430.         L_ERRDESC7_TEXT    = "A communication error has occurred. Your request cannot be processed at this time. Please try again later, or select the Telephone option in the Activation Wizard and follow the instructions provided.";
  431.         sErrMsg = L_ERRDESC7_TEXT;
  432.         break;
  433.  
  434.     case CH_ICLIENT_HTTP_SEND_FAILED:
  435.         L_ERRDESC8_TEXT    = "A communication error has occurred. Your request cannot be processed at this time. Please try again later, or select the Telephone option to speak with a Customer Support Representative.";
  436.         sErrMsg = L_ERRDESC8_TEXT;
  437.         break;
  438.  
  439.     case CH_CLIENT_CH_CONNECT_FAILED:            //CH service is not started
  440.         L_ERRDESC9_TEXT = "The Microsoft Activation Server is offline for regular maintenance or an upgrade. Please try again later.";
  441.         sErrMsg = L_ERRDESC9_TEXT;
  442.         break;
  443.  
  444.     case ESL_ERR_INVALID_REQUEST:
  445.     case ESL_ERR_INVALID_REQUEST_FOR_THIS_PROGRAM:
  446.         L_ERRDESC10_TEXT = "An error occurred while processing your request. Either try again later, or select the Telephone option in the Microsoft Office Activation Wizard and follow the instructions provided.";
  447.         sErrMsg = L_ERRDESC10_TEXT;
  448.         break;
  449.  
  450.     case CH_CLIENT_CH_SUBMIT_FAILED:
  451.     case CH_EXT_CHCLIENT_CREATE_FAILED:
  452.     case CH_ICLIENT_CHEXT_STATUS_NOT_OK:
  453.     case CH_ICLIENT_RESP_PBAG_GET_FAILED:        //Database is down
  454.     case LS_ERROR_NOT_FOUND:
  455.         L_ERRDESC11_TEXT = "Cannot connect to the Microsoft Activation Server. Make sure your connection to the Internet is working. Either try again later, or select the Telephone option in the Microsoft Office Activation Wizard and follow the instructions provided.";
  456.         sErrMsg = L_ERRDESC11_TEXT;
  457.         break;
  458.  
  459.     case ESL_ERR_INTERNAL_ERROR:
  460.     case ESL_ERR_CCTRANS_INTERNAL_ERROR:
  461.     case ESL_ERR_CCTRANS_INVALID_FIRST_NAME:
  462.     case ESL_ERR_CCTRANS_INVALID_LAST_NAME:
  463.     case ESL_ERR_CCTRANS_UNKNOWN_ERROR:
  464.         L_ERRDESC12_TEXT = "An error occurred while processing your request. Please make sure the information provided by you is correct and then resubmit your request, or select the Telephone option in the Microsoft Office Activation Wizard and follow the instructions provided.";
  465.         sErrMsg = L_ERRDESC12_TEXT;
  466.         break;
  467.  
  468.     case ESL_ERR_INVALID_LA_VERSION:
  469.         L_ERR13A_TEXT = "This version of ";
  470.         L_ERR13B_TEXT =  " is no longer supported. Please upgrade to a newer version of the product and try again.";
  471.         sErrMsg = L_ERR13A_TEXT + global.ProductName + L_ERR13B_TEXT;
  472.         break;
  473.  
  474.     case ESL_ERR_DROPPED_LICENSE_MISMATCH:
  475.         L_ERRDESC14_TEXT = "According to our records, your last attemp to download license failed. We are unable to validate your credentials. Please contact Customer Service Representative to acquire your license.";
  476.         sErrMsg = L_ERRDESC14_TEXT;
  477.         break;
  478.  
  479.     case ESL_ERR_TDO_TDN_FAILED:
  480.         L_ERRDESC16_TEXT = "U.S. Export Law prohibits delivery of intellectual property rights to this Country, Region, Company, or Individual. If you believe there has been an error, please select the Telephone method for your renewal to speak with a Customer Support Representative.";
  481.         sErrMsg = L_ERRDESC16_TEXT;
  482.         iErrHandlePage = GOTO_CURRENT_PAGE;
  483.         break;
  484.  
  485.     case ESL_ERR_BAD_VAT_FORMAT:
  486.         L_ERRDESC17_TEXT = "Your tax registration number is not valid. Please check the number and try again.";
  487.         sErrMsg = L_ERRDESC17_TEXT;
  488.         iErrHandlePage = GOTO_CURRENT_PAGE;
  489.         break;
  490.  
  491.     case ESL_ERR_INVALID_ADDRESS:
  492.         L_ERRDESC18_TEXT = "You have entered an invalid billing address. Please check the address and try again.";
  493.         sErrMsg = L_ERRDESC18_TEXT;
  494.         iErrHandlePage = GOTO_CURRENT_PAGE;
  495.         break;
  496.  
  497.     case ESL_ERR_CCTRANS_REFERRAL_CALL:
  498.         L_ERRDESC19_TEXT = "Your credit card company has informed us that they cannot approve this transaction at this time. You can either try using this card later, or enter another card number now.";
  499.         sErrMsg = L_ERRDESC19_TEXT;
  500.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  501.         break;
  502.         
  503.     case ESL_ERR_CCTRANS_PICKUP:
  504.         L_ERRDESC20_TEXT = "Your credit card company will not approve this transaction. Please try again later.";
  505.         sErrMsg = L_ERRDESC20_TEXT;
  506.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  507.         break;
  508.         
  509.     case ESL_ERR_CCTRANS_REENTER_INFO:
  510.         L_ERRDESC21_TEXT = "The credit card number you have entered is not valid. Please check the card number and type, and try again.";
  511.         sErrMsg = L_ERRDESC21_TEXT;
  512.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  513.         break;
  514.         
  515.     case ESL_ERR_CCTRANS_DECLINED:
  516.         L_ERRDESC22_TEXT = "Your credit card company has declined this transaction. Please try using another credit card.";
  517.         sErrMsg = L_ERRDESC22_TEXT;
  518.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  519.         break;
  520.         
  521.     case ESL_ERR_CCTRANS_INVALID_CC_NUMBER:
  522.         L_ERRDESC23_TEXT = "The credit card number you entered is not valid. Please check the card number and type, and try again.";
  523.         sErrMsg = L_ERRDESC23_TEXT;
  524.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  525.         break;
  526.         
  527.     case ESL_ERR_CCTRANS_INVALID_EXPIRATION_DATE:
  528.         L_ERRDESC24_TEXT = "The expiration date you entered is not valid. Please check the expiration date or use another credit card, and try again.";
  529.         sErrMsg = L_ERRDESC24_TEXT;
  530.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  531.         break;
  532.         
  533.     case ESL_ERR_BANNED_CREDIT_CARD:
  534.         L_ERRDESC25_TEXT = "We are not able to process this credit card. Please use another credit card and try again.";
  535.         sErrMsg = L_ERRDESC25_TEXT;
  536.         iErrHandlePage = GOTO_PREVIOUS_PAGE;
  537.         break;
  538.  
  539.     case ESL_ERR_BAD_CCRENEWAL_COUNTRY_OR_MPC:
  540.     case ESL_ERR_CCTRANS_INVALID_CURRENCY_CODE:
  541.         L_ERRDESC26_TEXT = "WeÆre sorry, but we are not able to accept credit cards from this country or region. We suggest that you acquire a renewal from an authorized Microsoft Retailer.";
  542.         sErrMsg = L_ERRDESC26_TEXT;
  543.         iErrHandlePage = (err.number==ESL_ERR_BAD_CCRENEWAL_COUNTRY_OR_MPC) ? GOTO_CURRENT_PAGE : GOTO_PREVIOUS_PAGE;
  544.         break;
  545.  
  546.     case ESL_ERR_MULTIPLE_PRODUCT_PID:
  547.         L_ERRDESC27_TEXT = "Our records indicate that this Product Key has already been used to activate another product. If you feel you've received this message in error, please contact a Customer Service Representative by clicking OK and selecting the Telephone option.";
  548.         sErrMsg = L_ERRDESC27_TEXT;
  549.         break;
  550.  
  551.     default:
  552.         if( typeof(err.description) == "string" && err.description != "" )
  553.         {    //if error is valid, we still use it. for example java script errors
  554.             sErrMsg = err.description + " (0x" + (err.number).toString(16) + ")";
  555.         }
  556.         else
  557.         {    //check if error msg coming from backend.
  558.             sErrMsg = objLicenseAgent.GetBackendErrorMsg();
  559.             if( sErrMsg == "" )
  560.             {    //nobody has err msg for this err code. use default here
  561.                 L_ERRDESC0_TEXT = "We are unable to process your request at this time. Please try again later, or contact a Customer Service Representative by clicking OK and selecting the Telephone option.";
  562.                 sErrMsg = L_ERRDESC0_TEXT + " (0x" + (err.number).toString(16) + ")";
  563.             }
  564.         }
  565.         break;
  566.     }
  567.  
  568.     ErrAlert( sErrMsg );
  569.  
  570.     GotoErrHandlingPage(iErrHandlePage);
  571. }
  572. //-----------------------------------------------------------------------------
  573.