%@ LANGUAGE = VBScript %> <% Option Explicit %> <% Const Action_Default = "default" Const Action_Compute = "compute" Const Server_Name = "www.coli.org" Const Licensee_GUID = "{4DDA55A4-7A2B-403C-9861-309591C321DE}" '****************************************************************************************** Sub Main() Dim strAction 'As String Dim bIndex 'As Boolean Dim bIncome 'As Boolean Dim bAverage 'As Boolean Dim bCompare 'As Boolean If Request("action") <> "" Then 'Set a Default Action strAction = Request("action") Else strAction = "default" End If bIncome = True bIndex = True bAverage = True bCompare = True Select Case strAction Case Action_Default CalculatorMain Licensee_GUID, bIncome Case Action_Compute CalculatorCompute bIncome, bIndex, bAverage, bCompare End Select End Sub '****************************************************************************************** Sub CalculatorMain(Licensee_GUID, bIncome) %>
| COLI Calculator Result <% If bIncome Then %>Based on the Income that you entered, if you are earning $<%=formatNumber(Request("salary"),,,,true)%> after tax in <%=strMovingFrom%>, the comparable after-tax income in <%=strMovingTo%> is <%=dblStandard%>. Below are the index values and average prices of two areas as well as the national average: |
<% end if %>
| Index and average prices are based on data gathered between <%=GetPeriodInfo()%>. For more information on the methodology, please visit ACCRA Cost of Living Index website. Please click here to make another comparison. |
| Category (Percent Weight) | <%=strMovingFrom%> | <%=strMovingTo%> | National Average | <% For i = 0 To (intNoOfHeadlines) Set objHdl = objLst.item(i) Response.Write("||||
|---|---|---|---|---|---|---|---|
| " & child.text & " | ") case "formatid" formatID = child.text case "cost" Response.Write("" & FormatValue(child.text,formatID) & " | ") End Select next i = i + 1 Set objHdl = objLst.item(i) for each child in objHdl.childNodes Select case lcase(child.nodeName) case "formatid" formatID = child.text case "cost" Response.Write("" & FormatValue(child.text,formatID) & " | ") End Select next Response.Write("100.0 | ") Response.Write("||||
| Item | <%=strMovingFrom%> | <%=strMovingTo%> | National Average | <% For i = 0 To (intNoOfHeadlines) x = x + 1 Set objHdl = objLst.item(i) Response.Write("||||
| " & child.text & " | ") case "formatid" formatID = child.text case "cost" Response.Write("" & FormatValue(child.text,formatID) & " | ") End Select next i = i + 1 Set objHdl = objLst.item(i) for each child in objHdl.childNodes Select case lcase(child.nodeName) case "formatid" formatID = child.text case "cost" Response.Write("" & FormatValue(child.text,formatID) & " | ") case "nationalaverage" Response.Write("" & FormatValue(child.text,formatID) & " | ") End Select next Response.Write("||||
|
If you move from <%=strMovingFrom%> to <%=strMovingTo%>:
|
|||||||
| Groceries will cost: | ") boolFound = true case "housing" Response.Write("Housing will cost: | ") boolFound = true case "utilities" Response.Write("Utilities will cost: | ") boolFound = true case "transportation" Response.Write("Transportation will cost: | ") boolFound = true case "health" Response.Write("Health will cost: | ") boolFound = true End Select case "formatid" formatID = child.text case "cost" intFromVal = cdbl(child.text) End Select next i = i + 1 Set objHdl = objLst.item(i) for each child in objHdl.childNodes Select case lcase(child.nodeName) case "formatid" formatID = child.text case "cost" if boolFound = true then intToVal = cdbl(child.text) intDiff = cdbl(intFromVal) - cdbl(intToVal) Response.Write("" & FormatNumber(abs(intDiff / cdbl(intFromVal) * 100), 3) & "% | ") if intToVal < intFromVal then Response.Write("less | ") else Response.Write("more | ") end if end if End Select next Response.Write("