<% Response.Buffer=true %> <% this_page_id = contact_page_id dim your_name dim your_comments dim your_contact dim submitted dim return_page_id dim returnString dim emailToAddress dim emailFromAddress dim emailSubject dim emailMessage your_name = request("your_name") if len(your_name) < 1 then your_name = "Your name here" end if your_comments = request("your_comments") if len(your_comments) < 1 then your_comments = "Your question or comment here" end if your_contact = request("your_contact") if len(your_contact) < 1 then your_contact = "Your email or phone number here" end if return_page_id = request("page_id") submitted = request("submitted") if len(submitted) < 1 then submitted = false end if returnString = "contactUs.asp?page_id=" & return_page_id & "&your_name=" & your_name & "&your_comments=" & your_comments & "&your_contact=" & your_contact emailToAddress = contactUsFormEmailAddress emailFromAddress = "admin@" & websiteDomainName emailSubject = "Alliances for Africa - Contact us form" createPageObject() pageObj.getPageContent() writeHTMLTop() writeActiveBreadcrumb() response.write("
" & VbCrLf) writeLeftCol() response.write("
" & VbCrLf) response.write("
" & VbCrLf) response.write("

" & pageObj.p_title & "

" & VbCrLf) pageObj.writePageContent("") if submitted then if your_name = "" or your_name = "Your name here" then response.redirect( returnString & "&errorMsg=NoName") end if if your_contact = "" or your_contact = "Your email or phone number here" then response.redirect( returnString & "&errorMsg=NoContact") end if if your_comments = "" or your_comments = "Your question or comment here" then response.redirect( returnString & "&errorMsg=NoComment") end if emailMessage = ""&_ "Hello," & VbCrLf & VbCrLf &_ "My name is: " & your_name & VbCrLf & VbCrLf &_ "My question or comment is: " & your_comments & VbCrLf & VbCrLf &_ "You can contact me on : " & your_contact & VbCrLf & VbCrLf &_ "Thanks" call sendEmail(emailFromAddress,emailToAddress,emailSubject,emailMessage) response.write("

Thank you for your enquiry, we will be in touch soon.

" & VbCrLf) else response.write("" & VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) if not len(errorMsg) = 0 then call writeContactUsErrorMessages() response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("
" & VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("
" & VbCrLf) response.write("
" & VbCrLf) response.write("" & VbCrLf) response.write("" & VbCrLf) response.write("
" & VbCrLf) response.write("

" & VbCrLf) response.write("
" & VbCrLf) end if response.write("

Print this page | Back to top

" & VbCrLf) response.write("
" & VbCrLf) response.write("
" & VbCrLf) response.write("
" & VbCrLf) writeHTMLBottom() function writeContactUsErrorMessages() select case errorMsg case "NoName" response.write("

Please enter your name

" & VbCrLf) case "NoComment" response.write("

Please enter your question or comment

" & VbCrLf) case "NoContact" response.write("

Please enter your email or phone number

" & VbCrLf) end select end function %>