<%

CONST L_ErrorPage_HTMLTitle        = "エラー ページ"
CONST L_TryTheFollowing_Text       = "次の項目を実行してください: "

CONST L_Error_Text                 = " エラー"
CONST L_AnErrorOccurred_Text       = "次の処理でエラーが発生しました: "

CONST L_AuthUser_Text              = "認証"
CONST L_Resolution_Text            = "解決"
CONST L_CDO_Text                   = "コラボレーション データ オブジェクト"
CONST L_ADO_Text                   = "アクティブ データ オブジェクト"
CONST L_CMSAdmin_Text              = "Exchange 会議マネージャ管理ツール"

CONST L_Organizer_Text             = "Organizer"
CONST L_Required_Text              = "Required"
CONST L_Optional_Text              = "Optional"
CONST L_Resource_Text              = "Resource"

CONST L_CreateAppointment_ErrorMessage    = "CDO 3.0 予定表オブジェクトの作成中"
CONST L_CreateCDOConfig_ErrorMessage      = "CDO 3.0 構成オブジェクトの作成中"
CONST L_ParsingAuthUser_ErrorMessage      = "認証済みユーザーの設定を解析中"

CONST L_CreatingAddressee_ErrorMessage    = "create the addressee object for "
CONST L_SettingDisplayName_ErrorMessage   = "set the display name of the addressee object for "
CONST L_CheckingName_ErrorMessage         = "check the name of the addressee object for "

CONST L_ResolvingAuthUser_ErrorMessage    = "resolve the authenticated user to a mailbox"
CONST L_ParsingAuthEmail_ErrorMessage     = "parsing the authenticated user's e-mail address"

CONST L_CreateConfiguration_ErrorMessage  = "会議管理サーバー構成オブジェクトの取得中"
CONST L_GetZone_ErrorMessage              = "会議管理サーバー構成オブジェクトからゾーンを取得中"
CONST L_GetResourceMailboxes_ErrorMessage = "ゾーン オブジェクトからリソース メールボックスを取得中"
CONST L_CouldntFindResource_ErrorMessage  = "find the resource specified in the message"

CONST L_GettingConfigFields_ErrorMessage  = "構成オブジェクトのフィールド コレクションの取得中"
CONST L_SettingSendAddress_ErrorMessage   = "構成オブジェクトのフィールド コレクションの取得中"
CONST L_SettingSendUsing_ErrorMessage     = "構成オブジェクトの SendUsing プロパティの設定中"
CONST L_SettingTimeZoneId_ErrorMessage    = "set the TimeZoneId property of the Configuration object"
CONST L_UpdatingConfigFields_ErrorMessage = "構成オブジェクトのフィールドを更新中"
CONST L_SettingConfig_ErrorMessage        = "予定表オブジェクトの構成オブジェクトを更新中"

CONST L_AddingNewAttendee1_ErrorMessage   = "add a new Attendee "
CONST L_AddingNewAttendee2_ErrorMessage   = " to the Appointment object"
CONST L_SettingAddress_ErrorMessage       = "set the e-mail address of the new Attendee "
CONST L_RecipientRole1_ErrorMessage       = "set the role of the participant "
CONST L_RecipientRole2_ErrorMessage       = " to "

CONST L_SettingEmailAddress_ErrorMessage  = "setting the e-mail address of the attendee: "
CONST L_AmbiguousNames_ErrorMessage       = "resolve the attendees of the meeting.  There was an ambiguous name: "
CONST L_UnresolvableNames_ErrorMessage    = "resolve the attendees of the meeting.  There was an unresolvable name: "

CONST L_ResolvingResource_ErrorMessage    = "resolve the resource to a mailbox"

CONST L_SettingBusyStatus_ErrorMessage    = "set the busy status of the meeting"
CONST L_AddingRecurPattern_ErrorMessage   = "add a recurrence pattern to the meeting"
CONST L_SetRecurFrequency_ErrorMessage    = "set the recurrence frequency of the meeting"
CONST L_SetRecurInstances_ErrorMessage    = "set the recurrence instances of the meeting"
CONST L_SetRecurPatternEnd_ErrorMessage   = "set the recurrence end date of the meeting"

CONST L_SettingApptFields_ErrorMessage    = "set the Exchange Conferencing properties on the Appointment object"
CONST L_UpdatingApptFields_ErrorMessage   = "予定表オブジェクト フィールド コレクションの取得中"
CONST L_SyncingApptFields_ErrorMessage   = "synchronize the Appointment objects' fields collection"

CONST L_ApptCreateRequest_ErrorMessage    = "create the calendar message for the Appointment object"
CONST L_ApptSend_ErrorMessage             = "send the meeting to other users"
CONST L_ApptSaveTo1_ErrorMessage          = "save the meeting to the "
CONST L_ApptSaveTo2_ErrorMessage          = " mailbox"

CONST L_GettingApptSource_ErrorMessage    = "get the URL that the appointment was saved to"
CONST L_ApptOpen_ErrorMessage             = "open the appointment from the following URL: "

CONST L_GettingCGOID_ErrorMessage         = "retrieve the message ID"
CONST L_URLFromCGOID_ErrorMessage         = "URL をメッセージ ID から取得しているとき"

CONST L_GetResourceMailbox_ErrorMessage   = "リソース メールボックスの一覧から特定のリソース メールボックスを取得中"
'CONST L_GettingApptFields_ErrorMessage    = "get the Appointment objects' fields collection"
CONST L_SetAttendeeType_ErrorMessage      = "参加者の種類をリソースに追加中"
CONST L_GettingAuthUser_ErrorMessage      = "認証済みユーザーの名前を取得中"

DIM ErrorMsg        'Holds the main error message (displayed at the top of the error page)
DIM Reason          'Holds the paragraph description of the error (displayed below the main message)
DIM Fixes()         'Holds the suggested remedies (displayed in the bulleted list below the paragraph)
DIM Result          'Global variable used for function return values

DIM ErrCode
DIM ErrSource
DIM ErrDescription

ErrorMsg        = ""
Reason          = ""
Result          = 0

ErrCode         = 0
ErrSource       = ""
ErrDescription  = ""
REDIM Fixes(0)

FUNCTION CheckSetError(ResultSource, ResultReason)

    IF (0 <> Err.Number) THEN
        ErrCode        = Err.Number
        ErrSource      = Err.Source
        ErrDescription = Err.Description
        Err.Clear()
    ELSEIF (0 <> Result) THEN
        IF (IsNumeric(Result)) THEN
            ErrCode = CDbl(Result)
        ELSE
            ErrCode = Result
        END IF
        ErrSource      = ""
        ErrDescription = ""
        Result      = 0
    ELSE
        CheckSetError = FALSE
        EXIT FUNCTION
    END IF

    ErrorMsg = ResultSource & L_Error_Text
    Reason   = L_AnErrorOccurred_Text & ResultReason
    CheckSetError = ErrCode
    CALL DisplayErrorPage
END FUNCTION


SUB DisplayErrorPage() %>
<TITLE><%=L_ErrorPage_HTMLTitle%></TITLE>
</HEAD>
<body BGCOLOR="#FFFFFF" BACKGROUND="filespw.gif" LEFTMARGIN="40" RIGHTMARGIN="40" TEXT="#000000" LINK="#000000" ALINK="#FFCC66" VLINK="#0080FF" STYLE="background-color:#FFFFFF; background-image:url(filespw.gif); background-attachment:fixed; background-repeat:no-repeat; background-position:bottom right;">

<center>
<table CELLSPACING="12">
<tr><td COLSPAN="2" ROWSPAN="1" ALIGN="LEFT"><b><font FACE="verdana" SIZE="+3"><%=ErrorMsg%></font></b></td></tr>
<tr><td COLSPAN="2" ROWSPAN="1" ALIGN="LEFT"><font FACE="verdana" SIZE="-1">
    <%=Reason%>
    <P><%=L_TryTheFollowing_Text%></P>
    <UL>
        <%
            DIM count
            FOR count = 1 TO UBound(Fixes)
                Response.write("<LI>" + Fixes(count) + "</LI>")
            NEXT
        %>
    </UL>
    <P>
    <SMALL>
        Code:<%=ErrCode%>
        Source:<%=ErrSource%>
        Description:<%=ErrDescription%>
    </SMALL>
</font></td></tr>
</table>
</center>
</body>
</HTML>
<% Reponse.End %>
<% END SUB %>
