home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
iis4_07.cab
/
Benefits.asp
< prev
next >
Wrap
Text File
|
1997-11-01
|
9KB
|
295 lines
<%@ LANGUAGE="VBSCRIPT" TRANSACTION=REQUIRED %>
<% Option Explicit %>
<!--#include file=libAuthenticate.inc-->
<%
Dim m_PreTaxTotal, m_AfterTaxTotal, m_CreditsTotal, m_PaycheckTotal, _
m_MainPrompt, m_Title, m_BenefitYear
'Handle if Review or Open Enrollment
If Request("Review") = 0 Then
m_BenefitYear = Year(Date) + 1
CreateOpenEnrollmentBenefits
m_Title = "Open Enrollment"
m_MainPrompt = "To review or change a benefit, click the appropriate item in the " & _
"<STRONG>Benefit</STRONG> column. <BR>" & _
"You can choose any available Plan for next year."
Else
m_BenefitYear = Year(Date)
m_Title = "Review or Change Current Benefits"
m_MainPrompt = "To review or change a benefit, click the appropriate item in the " & _
"<STRONG>Benefit</STRONG> column. <BR>" & _
"After experiencing a qualifying event, you have a limited period to change a " & _
"current benefit."
End If
GetPreTaxTotal
GetAfterTaxTotal
GetCreditsTotal
GetPaycheckTotal
%>
<!--BEGIN HTML-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
<META NAME="DESCRIPTION" CONTENT="Exploration Air's Employee Benefits Summary">
<META NAME="KEYWORDS" CONTENT="benefit, summary, review, change">
<META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<!--END META TAGS-->
<TITLE><%= m_Title%></TITLE>
</HEAD>
<BODY BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#228B22 LINK=#23238E>
<BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
<!--Change link color on mouseover
Only if running Internet Explorer 4.0 or later -->
<!--#include file=../libHighlight.inc-->
<!--COLOR BANNER_START-->
<CENTER>
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD BGCOLOR="#C71585" WIDTH=100% HEIGHT=20>
</TD>
</TR>
</TABLE>
<!--COLOR BANNER_END-->
<!--BEGIN TABLE CONTAINING LOGO, TITLE AND NAVIGATIONAL LINK-->
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD VALIGN=TOP WIDTH=325>
<A HREF="../default.asp">
<IMG SRC="../images/logo_sm.gif" WIDTH=200 HEIGHT=100
ALT="Return to Exploration Air Home Page" BORDER=0>
</A>
<BR>
<A HREF="default.asp">
<IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 HSPACE=5
ALT="Return to Employee Benefit Home Page" BORDER=0>
</A>
<FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="2" ><STRONG>
<A HREF="default.asp" TITLE="Click to return to Employee Benefit Home Page">
EMPLOYEE BENEFITS HOME PAGE
</A>
</STRONG></FONT>
</TD>
<TD VALIGN=MIDDLE WIDTH=200>
</TD>
<TD VALIGN=MIDDLE WIDTH=200><FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>
<%= m_Title%></FONT>
</TD>
<TD VALIGN=TOP ALIGN=RIGHT>
<A HREF="../HowItWorks/HIWBenefitsSummary.asp">
<IMG SRC="../images/btssmall.gif" WIDTH="115" HEIGHT="52"
ALT="Click here to learn how this page works" BORDER=0>
</A>
</TD>
</TR>
</TABLE>
<!--END TABLE CONTAINING LOGO, TITLE AND NAVIGATIONAL LINK-->
<BR>
<BR>
<!-- BEGIN TABLE CONTAINING THE EMPLOYEE'S BENEFITS INFO -->
<CENTER>
<%= m_MainPrompt%>
<P>
<TABLE BORDER=1 WIDTH=90%>
<TR>
<TD>
<TR>
<TH>
Benefit
</TH>
<TH>
Plan
</TH>
<TH>
Tax Status
</TH>
<TH>
Cost per Period
</TH>
</TR>
<!--Output benefit detail lines -->
<% ListBenefitSummary %>
<TR>
<TD COLSPAN=3 ALIGN="RIGHT">
Cost of Pre-tax benefits:
</TD>
<TD COLSPAN=3 ALIGN="RIGHT">
<% If IsNull(m_PreTaxTotal) Then m_PreTaxTotal = 0 %>
<% = FormatCurrency(m_PreTaxTotal) %>
</TD>
</TR>
<TR>
<TD COLSPAN=3 ALIGN="RIGHT">
Cost of After-tax benefits:
</TD>
<TD COLSPAN=3 ALIGN="RIGHT">
<% If IsNull(m_AfterTaxTotal) Then m_AfterTaxTotal = 0 %>
<% = FormatCurrency(m_AfterTaxTotal) %>
</TD>
</TR>
<TR>
<TD COLSPAN=3 ALIGN="RIGHT">
Total cost of benefits:
</TD>
<TD COLSPAN=3 ALIGN="RIGHT">
<% = FormatCurrency(m_PreTaxTotal + m_AfterTaxTotal) %>
</TD>
</TR>
<TR>
<TD COLSPAN=3 ALIGN="RIGHT">
Flex dollars:
</TD>
<TD COLSPAN=3 ALIGN="RIGHT">
<% If IsNull(m_CreditsTotal) Then m_CreditsTotal = 0 %>
<%= FormatCurrency(m_CreditsTotal)%>
</TD>
</TR>
<TR>
<TD COLSPAN=3 ALIGN="RIGHT">
With selected benefits your regular paycheck will pay:
</TD>
<TD COLSPAN=3 ALIGN="RIGHT">
<% If IsNull(m_PaycheckTotal) Then m_PaycheckTotal = 0 %>
<%= FormatCurrency(m_PaycheckTotal)%>
</TD>
</TR>
</TD>
</TR>
</TABLE>
</CENTER>
<BR>
<P>
<HR=400>
<P>
<CENTER>
<FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1">
<A HREF="../legal.htm" NAME=Legal TITLE="Click to view Copyright and Legal Information">
©1997 Microsoft Corporation. All rights reserved. Terms of Use.
</A>
</FONT>
</CENTER>
<P>
<!--BEGIN COLOR BANNER-->
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD BGCOLOR="#C71585" WIDTH=100% HEIGHT=20>
</TD>
</TR>
</TABLE>
<!--END COLOR BANNER-->
</BODY>
</HTML>
<!--END HTML-->
<%
'
' If first time into Open Enrollment, Create Employee Benefit records for Open Enrollment year
'
Sub CreateOpenEnrollmentBenefits
Dim BenefitList, rstBenefitsForID
Set BenefitList = Server.CreateObject("Benefit.BenefitList")
Set rstBenefitsForID = BenefitList.BenefitsForID(Application("DSNBenefits"), Session("EmployeeID"), _
m_BenefitYear)
If rstBenefitsForID.EOF Then
Dim Employee
Set Employee = Server.CreateObject("Benefit.Employee")
Employee.NewBenefits Application("DSNBenefits"), Session("EmployeeId"), m_BenefitYear
End If
End Sub
'
' Generate the rows for a table consisting of the Benefits for the current employee
'
Sub ListBenefitSummary
Dim BenefitList, rstBenefitSummary
Set BenefitList = Server.CreateObject("Benefit.BenefitList")
Set rstBenefitSummary = BenefitList.SummaryForID(Application("DSNBenefits"), Session("EmployeeID"), _
m_BenefitYear)
Do Until rstBenefitSummary.EOF
Response.Write "<TR>" & Chr(13)
Response.Write "<TD><A HREF=" & rstBenefitSummary("DetailTemplate") & _
"?BenefitId=" & rstBenefitSummary("BenefitId") & _
"&Review=" & Request("Review") & " TITLE='Click to view " & _
rstBenefitSummary("BenefitLabel") & " benefit information'>" & Chr(13) & _
rstBenefitSummary("BenefitLabel") & "</A></TD>" & Chr(13)
Response.Write "<TD ALIGN=RIGHT> "
Response.Write rstBenefitSummary("PlanLabel")
Response.Write "</TD>" & Chr(13)
Response.Write "<TD ALIGN=RIGHT> "
If rstBenefitSummary("PlanCost") > 0 Then
Response.Write rstBenefitSummary("TaxStatusLabel")
Else
Response.Write " "
End If
Response.Write "</TD>" & Chr(13)
Response.Write "<TD ALIGN=RIGHT> "
If rstBenefitSummary("PlanCost") > 0 Then
Response.Write FormatCurrency(rstBenefitSummary("PlanCost"))
Else
Response.Write " "
End If
Response.Write "</TD>" & Chr(13)
Response.Write "</TR>" & Chr(13)
rstBenefitSummary.MoveNext
Loop
End Sub
Sub GetPreTaxTotal
Dim BenefitList, TaxStatusID
'For Tax Status of: PreTax
TaxStatusID = 2
Set BenefitList = Server.CreateObject("Benefit.BenefitList")
m_PreTaxTotal = BenefitList.GetTotalCost(Application("DSNBenefits"), Session("EmployeeID"), _
m_BenefitYear, TaxStatusID)
End Sub
Sub GetAfterTaxTotal
Dim BenefitList, TaxStatusID
'For Tax Status of: AfterTax
TaxStatusID = 1
Set BenefitList = Server.CreateObject("Benefit.BenefitList")
m_AfterTaxTotal = BenefitList.GetTotalCost(Application("DSNBenefits"), Session("EmployeeID"), _
m_BenefitYear, TaxStatusID)
End Sub
Sub GetCreditsTotal
Dim BenefitList
Set BenefitList = Server.CreateObject("Benefit.BenefitList")
m_CreditsTotal = BenefitList.GetTotalCredits(Application("DSNBenefits"), Session("EmployeeID"), _
m_BenefitYear)
End Sub
Sub GetPaycheckTotal
Dim BenefitList
Set BenefitList = Server.CreateObject("Benefit.BenefitList")
m_PaycheckTotal = BenefitList.GetTotalPaycheck(Application("DSNBenefits"), Session("EmployeeID"), _
m_BenefitYear)
End Sub
%>