%@ LANGUAGE="VBSCRIPT"%>
<%
OPTION EXPLICIT
If Not Response.IsClientConnected Then
Session.Abandon
End If
Dim strLink, strFormType, nFormType, strHeader, e, bInvalid
Dim strContact, strIText, i, nClaims, nPercent, strRedirect
If IsNull(Request.QueryString("type")) Then
strFormType = Request.Form("type")
Else
strFormType = Request.QueryString("type")
End If
strHeader = "Request for "
If strFormType = "Firm" then
strHeader = strHeader & "Real Estate Company"
ElseIf strFormType = "Appraiser" then
strHeader = strHeader & "Appraiser's"
Else
strHeader = strHeader & "Individual Agent's"
End If
strHeader = strHeader & " E & O Insurance Quotation"
strRedirect = "../thankyou.asp?type=" & strFormType
' build query string in case the user wants to correct entries
strLink = "?"
For Each e In Request.Form
If strLink = "?" Then
strLink = strLink & e & "=" & Server.URLEncode(Request.Form(e))
Else
strLink = strLink & "&" & e & "=" & Server.URLEncode(Request.Form(e))
End If
Next
' strLink = strLink & "&type=" & strFormType
If Request("hdnProcess") <> "" Then
' Data entered already
bInvalid = False
' do validation - need first name, last name, org, email, phone number, maiden name, and username/password
If Request.Form("contact") = "" Then
bInvalid = True
strIText = strIText & "
You didn't enter your Name."
End If
If Request.Form("company") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a Company Name."
End If
If Request.Form("address") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter an Address."
End If
If Request.Form("city") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a City."
End If
If Request.Form("county") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a County."
End If
If Request.Form("state") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a State."
End If
If Request.Form("zip") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a Zip/Postal Code."
End If
If Request.Form("areac") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter an Area Code."
End If
If Request.Form("tele#") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a Telephone Number."
End If
If Request.Form("fax#") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a Fax Number."
End If
If Request.Form("email") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter an Email Address."
Else
If Not IsEmail(Request.Form("email")) then
bInvalid = True
strIText = strIText & "You entered an invalid Email Address."
End If
End If
If strFormType = "Firm" then
If Request.Form("broker") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter a Broker Name."
End If
If Request.Form("established") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Date Established."
End If
End If
If Request.Form("licensed") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Date Licensed."
End If
If strFormType = "Firm" then
If Request.Form("#lic") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Total Number of Licensees."
End If
If Request.Form("#full") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Number of Full-time Licensees."
End If
If Request.Form("#part") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Number of Part-time Licensees."
End If
End If
If strFormType <> "Agent" then
If Request.Form("carrier") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Name of your Present Carrier."
End If
If Request.Form("renewal") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter your Present Carrier's Renewal Date."
End If
If Request.Form("limits") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter your Present Carrier's Limits of Coverage."
End If
If Request.Form("deduct") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter your Present Carrier's Deductible."
End If
If Request.Form("yrscont") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the Years of Continuous Coverage with your Present Carrier."
End If
End If
If strFormType <> "Appraiser" then
If Request.Form("total$") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter last year's Total Commissions."
End If
If Request.Form("resid") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter last year's Residential Commissions."
End If
If Request.Form("commercial") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter last year's Commercial Commissions."
End If
If Request.Form("propmgmt") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter last year's Property Management Commissions."
End If
End If
If strFormType <> "Agent" then
If Request.Form("appraise") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter last year's Appraisals Revenue."
End If
If Request.Form("respct") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter your Appraisals Residential Percentage."
End If
If Request.Form("commpct") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter your Appraisals Commercial Percentage."
End If
End If
If strFormType = "Appraiser" then
If Request.Form("avgval") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter your the Average Value of Appraisals."
End If
End If
If strFormType <> "Appraiser" then
If Request.Form("percent") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter last year's Home Warranty Percentage."
End If
End If
If CInt(Request.Form("claims")) > 0 Then
If Request.Form("claimstxt") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter an explanation for claims in the last 5 years."
End If
End If
If strFormType = "Firm" Then
If Request.Form("glins") = "Yes" then
If Request.Form("glinsco") = "" Then
bInvalid = True
strIText = strIText & "You didn't enter the name of your General Liability Insurance Carrier."
End If
End If
End If
If bInvalid = True Then
%>
Data Entry Problem
<%=strFormType%>
<%=Request.Form("glins")%>
<%=strLink%>
<%
Else
Response.Redirect "Email/SendEmail.asp" & strLink
End If
Else
%>
RESSI: Insurance Specialist to the Real Estate Industry!
Real Estate Support Systems, Inc.
|
|
|
ERRORS & OMISSIONS, PROFESSIONAL LIABILITY INSURANCE
|
About RESSI |
|
|
<%=strHeader%>
|
|
<%
End If ' End of If hdnProcess <> ''
Function IsEmail(sCheckEmail)
Dim sEmail, nAtLoc
IsEmail = True
sEmail = Trim(sCheckEmail)
nAtLoc = InStr(1, sEmail, "@")
If Not (nAtLoc > 1 And (InStrRev(sEmail, ".") > nAtLoc + 1)) then
' "@" must exist, and last "." in string must follow the "@"
IsEmail = False
ElseIf InStr(nAtLoc + 1, sEmail, "@") > nAtLoc then
' String can't have more than one "@"
IsEmail = False
ElseIf Mid(sEmail, nAtLoc + 1, 1) = "." then
' String can't have "." immediately following "@"
IsEmail = False
ElseIf InStr(1, Right(sEmail,2), ".") > 0 then
' String must have at least a two-character top-level domain
IsEmail = False
End If
End Function
Function fChecked(value1, value2, default)
If IsEmpty(value2) or IsNull(value2) Then
If value1 = default then
fChecked = "checked"
End If
Elseif value1 = value2 then
fChecked = "checked"
Else
fChecked = ""
End If
End Function
%>