#!/usr/bin/perl

print "Content-type: text/html\n\n";

require "config.idx";

$long = $ENV{'QUERY_STRING'};
if ($long) {
	@pairs=split(/&/,$long);
	foreach $item(@pairs) {
		($name,$content)=split (/=/,$item,2);
		$content=~tr/+/ /;
		$content=~ s/%(..)/pack("c",hex($1))/ge;
		if ($INPUT{$name}) { $INPUT{$name} = $INPUT{$name}.",".$content; }
		else { $INPUT{$name} = $content; }
	}
}
else {
	read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
	@pairs = split(/&/, $buffer);
	foreach $pair (@pairs) {
		($name, $value) = split(/=/, $pair);
		$value =~ tr/+/ /;
		$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
		if ($INPUT{$name}) { $INPUT{$name} = $INPUT{$name}.",".$value; }
		else { $INPUT{$name} = $value; }
	}
}

if ($INPUT{action} eq "verify") { &verify; }
elsif ($INPUT{'action'} eq "email") { &email; }
else { &html; }

sub verify {

$Preferred_Agent="$INPUT{'Preferred_Agent'}";
$mls="$INPUT{'mls'}";
$city="$INPUT{'city'}";
$state="$INPUT{'state'}";
$zip="$INPUT{'zip'}";
$address="$INPUT{'address'}";
$email="$INPUT{'email'}";
$agent="$INPUT{'agent'}";
$FirstName="$INPUT{'FirstName'}";
$LastName="$INPUT{'LastName'}";
$cAddress="$INPUT{'cAddress'}";
$cState="$INPUT{'cState'}";
$cCity="$INPUT{'cCity'}";
$cZipCode="$INPUT{'cZipCode'}";
$Phone="$INPUT{'Phone'}";
$EmailAddress="$INPUT{'EmailAddress'}";
$Fax="$INPUT{'Fax'}";
$TMonth="$INPUT{'TMonth'}";
$TMonthDay="$INPUT{'TMonthDay'}";
$TTimeHour="$INPUT{'TTimeHour'}";
$TTimeMinute="$INPUT{'TTimeMinute'}";
$TTimeAP="$INPUT{'TTimeAP'}";
$iMovingTime="$INPUT{'iMovingTime'}";
$iContact="$INPUT{'iContact'}";
$IOwnOrRent="$INPUT{'IOwnOrRent'}";
$EmailMessage="$INPUT{'EmailMessage'}";


print <<VERIFY;

<html>
<head>
<title>The ORR Home Selling Team REMAX Real Estate Groups Request Showing For $address</title>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="410">
<tr>
<td colspan="2">
<img src="images/showdetails/property_requestashowing.gif" alt="Request A Showing With The ORR Home Selling Team REMAX Real Estate Groups">
<br>
<font size="2"><font face="Arial"><b>&nbsp;&nbsp;&nbsp;Please verify your information before submitting!</b></font></font><br> </b></font></font><br>
</td>
</tr>
<tr>
<td colspan="2">

<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td width="25%" bgcolor="#E2E2E2"><img src="http://www.munciemls.com/images/photos/thumbnail/meiar$mls.jpg"></td>
<td width="40%" bgcolor="#E2E2E2" valign="top">
<font size="3"><font face="Arial"><b>Subject Property:</b></font></font><br>
<font size="1"><font color="navy"><font face="verdana"><b>$address<br>
$city, $state $zip<br>
MLS #$mls<br></b></font></font></font>
</td>
<td width="35%" bgcolor="#E2E2E2" valign="top">
&nbsp;
</td>
</tr>
</table>

</td>
</tr>
<tr>
<td colspan="2">
<br> 
<FORM method="post" ACTION="showing.idx">
<input type="hidden" name="action" value="email">
<input type="hidden" name="mls" value="$INPUT{mls}">
<input type="hidden" name="city" value="$INPUT{city}">
<input type="hidden" name="state" value="$INPUT{state}">
<input type="hidden" name="zip" value="$INPUT{zip}">
<input type="hidden" name="address" value="$INPUT{address}">
<input type="hidden" name="email" value="$INPUT{email}">
<input type="hidden" name="agent" value="$INPUT{agent}">
<input type="hidden" name="Preferred_Agent" value="$INPUT{Preferred_Agent}">
<input type="hidden" name="FirstName" value="$INPUT{FirstName}">
<input type="hidden" name="LastName" value="$INPUT{LastName}">
<input type="hidden" name="cAddress" value="$INPUT{cAddress}">
<input type="hidden" name="cCity" value="$INPUT{cCity}">
<input type="hidden" name="cState" value="$INPUT{cState}">
<input type="hidden" name="Phone" value="$INPUT{Phone}">
<input type="hidden" name="cZip" value="$INPUT{cZip}">
<input type="hidden" name="EmailAddress" value="$INPUT{EmailAddress}">
<input type="hidden" name="Fax" value="$INPUT{Fax}">
<input type="hidden" name="TMonth" value="$INPUT{TMonth}">
<input type="hidden" name="TMonthDay" value="$INPUT{TMonthDay}">
<input type="hidden" name="TTimeHour" value="$INPUT{TTimeHour}">
<input type="hidden" name="TTimeMinute" value="$INPUT{TTimeMinute}">
<input type="hidden" name="TTimeAP" value="$INPUT{TTimeAP}">
<input type="hidden" name="iMovingTime" value="$INPUT{iMovingTime}">
<input type="hidden" name="iContact" value="$INPUT{iContact}">
<input type="hidden" name="IOwnOrRent" value="$INPUT{IOwnOrRent}">
<input type="hidden" name="EmailMessage" value="$INPUT{EmailMessage}">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>First Name</b></font></font></font></td>
<td width="65%">$FirstName</td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>Last Name</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2">$LastName</td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>Address</b></font></font></font></td>
<td width="65%">$cAddress</td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>City</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2">$cCity</td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>State</b></font></font></font></td>
<td width="65%">$cState</td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>Zip/Postal Code</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2">$cZipCode</td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>Telephone Number</b></font></font></font></td>
<td width="65%">$Phone</td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>Email Address</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2">$EmailAddress</td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><b>Fax Number</b></font></font></td>
<td width="65%">$Fax</td>
</tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" bgcolor="#E2E2E2">
<center>
<font face="Arial"><font size="3"><font color="black"><b>You would like to see this property on:</b></font></font></font><br>
$TMonth $TMonthDay at $TTimeHour $TTimeMinute $TTimeAP</center>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<center>
<font face="Arial"><font size="3"><b>Your showing agent preference:</b></font></font><br>
$Preferred_Agent
</center>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" bgcolor="#E2E2E2">
<center>
<font face="Arial"><font size="3"><b>You are planning to move in:</b></font></font><br>
$iMovingTime
</center>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="100%" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" valign="top">
<center>
<font face="Arial"><font size="3"><font color="black"><b>Please contact me via:</b></font></font></font><br>
$iContact
</center>
</td>
<td width="50%">
<center>
<font face="Arial"><font size="3"><font color="black"><b>Do you own or rent?</b></font></font></font><br>
$IOwnOrRent
</center>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" bgcolor="#E2E2E2">
<font face="Arial"><font size="3"><font color="black"><b>Your Message:</b></font></font><br>
$EmailMessage
</td>
</tr>
<tr>
<td colspan="2">
<center><INPUT TYPE=SUBMIT VALUE="Submit Showing"></center>
</td>
</tr>
</table>
</FORM>
</td>
</tr>

</table>
</body>
</html>

VERIFY


}

sub email {

$sendto = "$INPUT{EmailAddress}";

open(MAIL,"|/usr/sbin/sendmail -t");
print MAIL "To: messages\@ORRHomes.com\n";
print MAIL "To: ryan\@ORRHomes.com\n";
print MAIL "From: showings\@munciemls.com\n";
print MAIL "Subject: \*\*Online Showing Request Recieved!\*\*\n\n";
print MAIL "NEW SHOWING REQUESTED ONLINE!\nBelow is a copy of the showing request.\n\n\nPreferred Agent $INPUT{Preferred_Agent}:\nProperty Address:\n$INPUT{address}\n$INPUT{city}, $INPUT{state} $INPUT{zip}\nMLS Number: $INPUT{mls}\nListing Agent: $INPUT{agent}\n\nYou will be showing the propety to:\n$INPUT{FirstName} $INPUT{LastName}\n$INPUT{cAddress}\n$INPUT{cCity}, $INPUT{cState} $INPUT{cZip}\nPhone: $INPUT{Phone}\nFax: $INPUT{Fax}\n$INPUT{EmailAddress}\n\nRequested Time Of Showing\n$INPUT{TMonth} $INPUT{TMonthDay} at $INPUT{TTimeHour}:$INPUT{TTimeMinute} $INPUT{TTimeAP}\n\nPlanning to moving in: $INPUT{iMovingTime}\nContact By: $INPUT{iContact}\nCurrently: $INPUT{IOwnOrRent}\n\nMessage Sent:\n$INPUT{EmailMessage}\n\n\n\n";
close(MAIL);

open(MAIL,"|/usr/sbin/sendmail -t");
print MAIL "To: $sendto\n";
print MAIL "From: info\@orrhomes.com\n";
print MAIL "Subject: \*\*Online Showing Request received from MuncieMLS.com!\*\*\n";
print MAIL "THANK YOU FOR YOUR RECENT ONLINE INQUIRY WITH The ORR Home Selling Team REMAX Real Estate Groups!\nBelow is a copy of your showing request.  An The ORR Home Selling Team REMAX Real Estate Groups Representative will be contacting you shortly!  Please do not show up to the property until confirmation from agent is received.\n\n\nPreferred Agent $INPUT{Preferred_Agent}:\nProperty Address:\n$INPUT{address}\n$INPUT{city}, $INPUT{state} $INPUT{zip}\nMLS Number: $INPUT{mls}\n\n\nYour information:\n$INPUT{FirstName} $INPUT{LastName}\n$INPUT{cAddress}\n$INPUT{cCity}, $INPUT{cState} $INPUT{cZip}\nPhone: $INPUT{Phone}\nFax: $INPUT{Fax}\n$INPUT{EmailAddress}\n\nRequested Time Of Showing\n$INPUT{TMonth} $INPUT{TMonthDay} at $INPUT{TTimeHour}:$INPUT{TTimeMinute} $INPUT{TTimeAP}\n\nPlanning to moving in: $INPUT{iMovingTime}\n$INPUT{iContact}\n$INPUT{IOwnOrRent}\n\nMessage Sent:\n$INPUT{EmailMessage}\n\n-------------------------------------------------\nThis Message was Sent from http://www.ORRHomes.com\nWhen Buying Or Selling Call The ORR Team First!\n-------------------------------------------------\n\n\n";
close(MAIL);


print <<HTML2;

<html>

<head>
<title>The ORR Home Selling Team REMAX Real Estate Groups Showing Request Sent!</title>
</head>

<body>
<img src="images/showdetails/property_requestashowing.gif" alt="Request A Showing With The ORR Home Selling Team REMAX Real Estate Groups"><br>
<font face="Arial"><font size="3"><b>
$INPUT{FirstName}, Your Request Has Been Successfully Submitted!</b><br>
<i>An Agent Will Contact You Shortly</i><br><br>
<center><A HREF='javascript:self.close();'>Close Window And Return To The ORR Home Selling Team REMAX Real Estate Groups Online!</A></center>
</font></font>


</body>

</html>

HTML2
}


sub html {

    @days   = ('Sunday','Monday','Tuesday','Wednesday',
               'Thursday','Friday','Saturday');
    @months = ('January','February','March','April','May','June','July',
	         'August','September','October','November','December');

    ($sec,$min,$hour,$mday,$mon,$year,$wday) = (localtime(time))[0,1,2,3,4,5,6];
    $time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
if ($hour eq "13") {
$hour = "1";
$pm = "y";
}if ($hour eq "14") {
$hour = "2";
$pm = "y";
}if ($hour eq "15") {
$hour = "3";
$pm = "y";
}if ($hour eq "16") {
$hour = "4";
$pm = "y";
}if ($hour eq "17") {
$hour = "5";
$pm = "y";
}if ($hour eq "18") {
$hour = "6";
$pm = "y";
}if ($hour eq "19") {
$hour = "7";
$pm = "y";
}if ($hour eq "20") {
$hour = "8";
$pm = "y";
}if ($hour eq "21") {
$hour = "9";
$pm = "y";
}if ($hour eq "22") {
$hour = "10";
$pm = "y";
}if ($hour eq "23") {
$hour = "11";
$pm = "y";
}if ($hour eq "24") {
$hour = "12";
$pm = "y";
}
$time = sprintf("%02d:%02d",$hour,$min);
$tdate = "$days[$wday], $months[$mon] $mday, $year";
#$mon = $mon + 1;



if ($pm eq "y") {
$tm = "pm";
}
else {
$tm = "am";
}

if ($mday < "10") {
$mday = "0$mday";
}

if ($mon eq "12") {
$mon = "1";
}
else {
$mon++;
}

$newyear = $year+1900;
$actdate = "$mon\/$mday\/$newyear";

if (-e "/home/muncieml/public_html/images/photos/thumbnail/meiar$INPUT{mls}.jpg") {
$showpicture = "images/photos/thumbnail/meiar$INPUT{mls}.jpg";
}
else {
$showpicture = "images/photos/search_nophoto.gif";
}


open(ADB,"/home/eagleon/public_html/agents.db");
@adb = <ADB>;
close(ADB);

$buildpull = "<select name=Preferred_Agent><option value=\"a&nbsp;top&nbsp;producing&nbsp;agent\">Select Agent</option><option value=\"a&nbsp;top&nbsp;producing&nbsp;agent\">Please Choose For Me</option><option value=>==================</option>";


use DBI;
my $dsn = "DBI:mysql:database=$d_name;host=localhost";
my $dbh = DBI->connect($dsn, $d_username, $d_pass, {RaiseError => 1}) || die $DBI::errstr;

my $pasth = $dbh->prepare("select firstname, lastname from agents");
$pasth->execute;
while (($firstname,$lastname) = $pasth->fetchrow_array()) {

$buildpull .= "<option value=\"$firstname&nbsp;$lastname\">$firstname $lastname";
}
$buildpull .= "</select>";

print <<HTML2;

<table border="0" cellpadding="0" cellspacing="0" width="410">
<tr>
<td colspan="2">
<img src="images/showdetails/property_requestashowing.gif" alt="Request A Showing With The ORR Home Selling Team REMAX Real Estate Groups">
<br>
<font size="2"><font face="Arial"><b>&nbsp;&nbsp;&nbsp;Please fill out the info below to request a showing.</b></font></font><br> </b></font></font><br>
</td>
</tr>
<tr>
<td colspan="2">

<html>
<head>
<title>The ORR Home Selling Team REMAX Real Estate Groups Request Showing For $INPUT{address}</title>
</head>
<body>
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td width="25%" bgcolor="#E2E2E2"><img src="$showpicture"></td>
<td width="40%" bgcolor="#E2E2E2" valign="top">
<font size="3"><font face="Arial"><b>Subject Property:</b></font></font><br>
<font size="1"><font color="navy"><font face="verdana"><b>$INPUT{address}<br>
$INPUT{city}, $INPUT{state} $INPUT{zip}<br>
MLS #$INPUT{mls}<br></b></font></font></font>
</td>
<td width="35%" bgcolor="#E2E2E2" valign="top">
&nbsp;
</td>
</tr>
</table>

</td>
</tr>
<tr>
<td colspan="2">
<br> 
<FORM method="post" ACTION="showing.idx">
<input type="hidden" name="action" value="verify">
<input type="hidden" name="mls" value="$INPUT{mls}">
<input type="hidden" name="city" value="$INPUT{city}">
<input type="hidden" name="state" value="$INPUT{state}">
<input type="hidden" name="zip" value="$INPUT{zip}">
<input type="hidden" name="address" value="$INPUT{address}">
<input type="hidden" name="email" value="$INPUT{email}">
<input type="hidden" name="agent" value="$INPUT{agent}">

<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>First Name</b></font></font></font></td>
<td width="65%"><INPUT TYPE=TEXT SIZE=25 NAME="FirstName"></td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>Last Name</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2"><INPUT TYPE=TEXT SIZE=25 NAME="LastName"></td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>Address</b></font></font></font></td>
<td width="65%"><INPUT TYPE=TEXT SIZE=25 NAME="cAddress"></td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>City</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2"><INPUT TYPE=TEXT SIZE=25 NAME="cCity"></td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>State</b></font></font></font></td>
<td width="65%"><SELECT NAME="cState">
                <OPTION>Alabama</OPTION>
                <OPTION>Alaska</OPTION>
                <OPTION>Arizona</OPTION>
                <OPTION>Arkansas</OPTION>
                <OPTION>California</OPTION>
                <OPTION>Connecticut</OPTION>
                <OPTION>Colorado</OPTION>
                <OPTION>Delaware</OPTION>
                <OPTION>District of Columbia</OPTION>
                <OPTION>Florida</OPTION>
                <OPTION>Georgia</OPTION>
                <OPTION>Hawaii</OPTION>
                <OPTION>Idaho</OPTION>
                <OPTION>Illinois</OPTION>
                <OPTION selected>Indiana</OPTION>
                <OPTION>Iowa</OPTION>
                <OPTION>Kansas</OPTION>
                <OPTION>Kentucky</OPTION>
                <OPTION>Louisiana</OPTION>
                <OPTION>Maine</OPTION>
                <OPTION>Maryland</OPTION>
                <OPTION>Massachusetts</OPTION>
                <OPTION>Michigan</OPTION>
                <OPTION>Minnesota</OPTION>
                <OPTION>Mississippi</OPTION>
                <OPTION>Missouri</OPTION>
                <OPTION>Montana</OPTION>
                <OPTION>Nebraska</OPTION>
                <OPTION>New Hampshire</OPTION>
                <OPTION>New Jersey</OPTION>
                <OPTION>New Mexico</OPTION>
                <OPTION>New York</OPTION>
                <OPTION>Nevada</OPTION>
                <OPTION>North Carolina</OPTION>
                <OPTION>North Dakota</OPTION>
                <OPTION>Ohio</OPTION>
                <OPTION>Oklahoma</OPTION>
                <OPTION>Oregon</OPTION>
                <OPTION>Pennsylvania</OPTION>
                <OPTION>Rhode Island</OPTION>
                <OPTION>South Carolina</OPTION>
                <OPTION>South Dakota</OPTION>
                <OPTION>Tennessee</OPTION>
                <OPTION>Texas</OPTION>
                <OPTION>Utah</OPTION>
                <OPTION>Vermont</OPTION>
                <OPTION>Virginia</OPTION>
                <OPTION>Washington</OPTION>
                <OPTION>West Virginia</OPTION>
                <OPTION>Wisconsin</OPTION>
                <OPTION>Wyoming</OPTION>
         
                </SELECT></td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>Zip/Postal Code</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2"><INPUT TYPE=TEXT SIZE=25 NAME="cZipCode"></td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><font color="black"><b>Telephone Number</b><br><font size="1">used to verify appointment</font></font></font></font></td>
<td width="65%"><INPUT TYPE=TEXT SIZE=25 NAME="Phone"></td>
</tr>
<tr>
<td width="35%" bgcolor="#E2E2E2"><font face="Arial"><font size="2"><font color="black"><b>Email Address</b></font></font></font></td>
<td width="65%" bgcolor="#E2E2E2"><INPUT TYPE=TEXT SIZE=25 NAME="EmailAddress"></td>
</tr>
<tr>
<td width="35%"><font face="Arial"><font size="2"><b>Fax Number</b></font></font></td>
<td width="65%"><INPUT TYPE=TEXT SIZE=25 NAME="Fax"></td>
</tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" bgcolor="#E2E2E2">
<center>
<font face="Arial"><font size="3"><font color="black"><b>When would you like to see this property?</b></font></font></font><br>
<SELECT NAME=TMonth SIZE=1>
		<OPTION value="$months[$mon]">$months[$mon]</option>
		<option value="Not Selected">----</option>
                <OPTION value="January">January</option>
                <OPTION value="February">February</option>
                <OPTION value="March">March</option>
                <OPTION value="April">April</option>
                <OPTION value="May">May</option>
                <OPTION value="June">June</option>
                <OPTION value="July">July</option>
                <OPTION value="August">August</option>
                <OPTION value="September">September</option>
                <OPTION value="October">October</option>
                <OPTION value="November">November</option>
                <OPTION value="December">December</option>
</select>
<SELECT NAME=TMonthDay SIZE=1>
		<OPTION value="$mday">$mday</option>
		<option value="No Selected">----</option>
                <OPTION value="01">01</option>
                <OPTION value="02">02</option>
                <OPTION value="03">03</option>
                <OPTION value="04">04</option>
                <OPTION value="05">05</option>
                <OPTION value="06">06</option>
                <OPTION value="07">07</option>
                <OPTION value="08">08</option>
                <OPTION value="09">09</option>
                <OPTION value="10">10</option>
                <OPTION value="11">11</option>
                <OPTION value="12">12</option>
                <OPTION value="13">13</option>
                <OPTION value="14">14</option>
                <OPTION value="15">15</option>
                <OPTION value="16">16</option>
                <OPTION value="17">17</option>
                <OPTION value="18">18</option>
                <OPTION value="19">19</option>
                <OPTION value="20">20</option>
                <OPTION value="21">21</option>
                <OPTION value="22">22</option>
                <OPTION value="23">23</option>
                <OPTION value="24">24</option>
                <OPTION value="25">25</option>
                <OPTION value="26">26</option>
                <OPTION value="27">27</option>
                <OPTION value="28">28</option>
                <OPTION value="29">29</option>
                <OPTION value="30">30</option>
                <OPTION value="31">31</option>
</select> at 
<select name="TTimeHour" size="1">
	<Option value="1">1</option>
	<Option value="2">2</option>
	<Option value="3">3</option>
	<Option value="4">4</option>
	<Option value="5">5</option>
	<Option value="6">6</option>
	<Option value="7">7</option>
	<Option value="8">8</option>
	<Option value="9">9</option>
	<Option value="10">10</option>
	<Option value="11">11</option>
	<Option value="12">12</option>
</select>:
<select name="TTimeMinute" size="1">
	<Option value="15">15</option>
	<Option value="30">30</option>
	<Option value="45">45</option>
	<Option value="00" selected>00</option>
</select>&nbsp;
<select name="TTimeAP" size="1">
	<Option value="PM" selected>PM</option>
	<Option value="AM">AM</option>
</select>
</center>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<center>
<font face="Arial"><font size="3"><b>Please select your showing agent preference:</b></font></font><br>
$buildpull
</center>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" bgcolor="#E2E2E2">
<center>
<font face="Arial"><font size="3"><b>When are you planning to move?</b></font></font><br>
<SELECT NAME=iMovingTime SIZE=1>
      <OPTION VALUE = "">Please Select A Time</option>
      <OPTION VALUE = "">---------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
                <OPTION value="0-3 Months">0-3 months</option>
                <OPTION value="3-6 Months">3-6 months</option>          
      <OPTION value="6-12 Months">6-12 months</option>
      <OPTION value="12+ Months">12+ months</option>
      </SELECT>
</center>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="100%" colspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" valign="top">
<center>
<font face="Arial"><font size="3"><font color="black"><b>Please contact me via:</b></font></font></font><br>
<INPUT TYPE=RADIO NAME=iContact VALUE="Contact Me By E-Mail"> E-Mail&nbsp;&nbsp;&nbsp;<INPUT TYPE=RADIO NAME=iContact VALUE="Contact Me By Phone"> Phone
</center>
</td>
<td width="50%">
<center>
<font face="Arial"><font size="3"><font color="black"><b>Do you own or rent?</b></font></font></font><br>
<INPUT TYPE=RADIO NAME=IOwnOrRent VALUE="I Currently Own"> Own&nbsp;&nbsp;&nbsp;<INPUT TYPE=RADIO NAME=IOwnOrRent VALUE="I Currently Rent">Rent
</center>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2" width="100%" bgcolor="#E2E2E2">
<font face="Arial"><font size="3"><font color="black"><b>Message To Agent:</b></font></font><br>
<TEXTAREA ROWS=5 COLS=50 NAME=EmailMessage WRAP=PHYSICAL></TEXTAREA>
</td>
</tr>
<tr>
<td colspan="2">
<center><INPUT TYPE=SUBMIT VALUE="Continue To Next Page"></center>
</td>
</tr>
</table>
</FORM>
</td>
</tr>

</table>
</body>
</html>
HTML2

}
