MSV FM

dot.antimicrobial@66.96.161.157: ~ $
Path : /hermes/sb_web/web/web/web/b2432/agentrobin.com/
File Upload :
Current < : /hermes/sb_web/web/web/web/b2432/agentrobin.com/Calcs.pl

#!/perl64/bin

# Get the environment variables passe to the script

use CGI qw/:standard :html3 :netscape/;
#use Win32::ODBC;
use Env;


$DSN="YFDH";

require "./AR_Common.pl";

@Cities=("Danville","San Ramon", "Blackhawk", "Alamo", "Dublin", "Pleasanton", "Walnut Creek", "Lafayette");

$CCount = @Cities;


$SSTR = "<SELECT Name=City>";
for ($a = 0; $a <= $CCount-1; $a++) {
	$SSTR = $SSTR . "<OPTION Value=$Cities[$a]>$Cities[$a]</OPTION>";		
} 

$SSTR= $SSTR . "</SELECT>";
$cgi = new CGI;

@authorized=('99.65.75.', '192.168.1.0');

$RHost = $ENV{$REMOTE_HOST};
$RAddr = $ENV{$REMOTE_ADDR};
$Host = $ENV{$HTTP_HOST};
@values = split(/:/, $ENV{QUERY_STRING});

$sub1=@values[0];
$sub1 =~ tr/+/ /;
$sub1 =~ s/%([1-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

$calc="1";
$process = "n";

$trulia = "n";

if ($sub1 eq "") { $trulia = "y"; }


if ($sub1 eq "") { $calc="1"; } else { $calc = $sub1; }
if ($sub1 eq "processcalc1") { $calc="1"; $process="y"; }
if ($sub1 eq "processcalc2") { $calc="2"; $process="y"; }
if ($sub1 eq "processcalc3") { $calc="3"; $process="y"; }
if ($sub1 eq "processcalc4") { $calc="4"; $process="y"; }
#if ($sub1 eq "signup") { $calc="10"; $process="y1"; }


printheader();
google_analytics();
under_image_gra(173);
print "<DIV style='position: relative; top:-301px; margin: 0 auto; width: 1024px; height: 1000px; border-style: solid; border-width: 0px; float: middle;'>\n";


place_heading();
make_menu();
bread_crumb_box();

if ($process eq "y1") {
	for $key($cgi->param()) {
		$input{$key} = $cgi->param($key);
	}

	for $key(keys %input) {
		if ($key eq "Price") { $Price = $input{$key}; }
		if ($key eq "City") { $City = $input{$key}; }
		if ($key eq "EMail") { $EMail = $input{$key}; }
		if ($key eq "CName") { $CName = $input{$key}; }

#		print $key,"=",$input{$key},"<br>\n";
	}
}	


if ($process eq "y") {
	for $key($cgi->param()) {
		$input{$key} = $cgi->param($key);
	}
	for $key(keys %input) {
		if ($key eq "Tax") { $Tax = $input{$key}; }
		if ($key eq "Ins") { $Ins = $input{$key}; }
		if ($key eq "Price") { $Price = $input{$key}; }
		if ($key eq "MPayment") { $MPayment = $input{$key}; }
		if ($key eq "Years") { $Years = $input{$key}; }
		if ($key eq "Down") { $Down = $input{$key}; }
		if ($key eq "IR") { $IR = $input{$key}; }
		if ($key eq "City") { $City = $input{$key}; }
		if ($key eq "EMail") { $EMail = $input{$key}; }
		if ($key eq "CName") { $CName = $input{$key}; }
		if ($key eq "Income") { $Income = $input{$key}; }
		if ($key eq "Debt") { $Debt = $input{$key}; }

#		print $key,"=",$input{$key},"<br>\n";
	}

#### Calc for Option1 

	$TPay = $Years*12;
	$Loan = $Price-$Down;
	$YIns = int( (($Ins/100) * $Price)/12);
	$YTax = int((($Tax/100) * $Price)/12);
	$MIR = ($IR/100)/12;
	$top = $MIR * ((1+$MIR)**$TPay);
	$bot = ((1+$MIR)**$TPay)-1;

	$Payment  = int($Loan * ($top/$bot));
	$Total = int($Payment+$YTax+$YIns);

#### Cal for Option 2

	$TempP = $MPayment;
	$TPrice = int($TempP/($top/$bot));
	$TPrice = $TPrice +$Down;

}	


	if ($calc eq "10") {
#		signup();
		printending();
		exit();
	}


print "<div class='arbox' style=\"position: absolute;top: 180px;left: 0px;width: 606px;height:500px; border: 0px black solid;\">\n";
#print "<div style=\"position: absolute;top: 0px;left: 0px;width: 606px;height:500px; border: 1px black solid; background: #F3E2B4;\">\n";
	print "<div class='topround' style=\"position: absolute;top: 0px;left: 0px;width: 605px;height:30px; border: 1px black solid; background: black;\"><SPAN style=\"font-family: helvetica; font-size: 1.1em; color: rgb(196,169,126);\">Useful Real Estate Tools and Calculators</SPAN></div>\n";

	print "<div class='bottomround' style=\"position: absolute;top: 30px;left: 0px;width: 605px;height:470px; border: 1px black solid; background: #F1F0EF;\">\n";

	if ($calc eq "1") {

		print "<div style=\"position: absolute;top: 0px;left: 0px;width: 151px;height:35px; border: 0px black solid; background: #F1F0EF; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?1\">Mortgage Payment using PITI</A></SPAN></div>\n";
		print "<div style=\"position: absolute;top: 0px;left: 151px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?2\">Max House Price based on Payment</A></SPAN></div>\n";
		print "<div style=\"position: absolute;top: 0px;left: 302px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?3\">Max Affordable House Price</A></SPAN></div>\n";
#		print "<div style=\"position: absolute;top: 0px;left: 453px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?4\">Amortization Schedule</A></SPAN></div>\n";
		calc1();
	}

	if ($calc eq "2") {

		print "<div style=\"position: absolute;top: 0px;left: 0px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?1\">Mortgage Payment using PITI</A></SPAN></div>\n";
		print "<div style=\"position: absolute;top: 0px;left: 154px;width: 151px;height:35px; border: 0px black solid; background: #F1F0EF; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?2\">Max House Price based on Payment</SPAN></A></div>\n";
		print "<div style=\"position: absolute;top: 0px;left: 302px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?3\">Max Affordable House Price</A></SPAN></div>\n";
#		print "<div style=\"position: absolute;top: 0px;left: 453px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?4\">Amortization Schedule</A></SPAN></div>\n";
		calc2();
		$Price = $TPrice;
	}
	if ($calc eq "3") {

		print "<div style=\"position: absolute;top: 0px;left: 0px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?1\">Mortgage Payment using PITI</A></SPAN></div>\n";
		print "<div style=\"position: absolute;top: 0px;left: 151px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?2\">Max House Price based on Payment</SPAN></A></div>\n";
		print "<div style=\"position: absolute;top: 0px;left: 306px;width: 151px;height:35px; border: 0px black solid; background: #F1F0EF; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?3\">Max Affordable House Price</A></SPAN></div>\n";
#		print "<div style=\"position: absolute;top: 0px;left: 453px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?4\">Amortization Schedule</A></SPAN></div>\n";
		calc3();
	}
#	if ($calc eq "4") {
#
#		print "<div style=\"position: absolute;top: 0px;left: 0px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?1\">Mortgage Payment using PITI</A></SPAN></div>\n";
#		print "<div style=\"position: absolute;top: 0px;left: 151px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?2\">Max House Price based on Payment</SPAN></A></div>\n";
#		print "<div style=\"position: absolute;top: 0px;left: 302px;width: 151px;height:35px; border: 1px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?3\">Max Affordable House Price</A></SPAN></div>\n";
#		print "<div style=\"position: absolute;top: 0px;left: 457px;width: 151px;height:35px; border: 0px black solid; background: #F1F0EF; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><A HREF=\"$baseurl/Calcs.pl?4\">Amortization Schedule</A></SPAN></div>\n";
#	}

	if ($calc eq "10") {

#		signup();
	}

	print "</div>\n";

	currate2();
	lineit();
	if ($Price ne "") { checkhouse(); }


print "</div>\n";

	if ($Price ne "") { rightad();}
	if ($Price eq "" && $trulia eq "y") { trulia();}


print "</DIV>\n";
footer_info('0px','850px','234px','570px','0px 0px 0px 0px','rgb(0,28,85)','MS1_bak.jpg','ROBIN BROOKS');

printending();


exit(0);

##############################################################################
################### GENERIC PAGE SETUP HEADING AND METADATA ###################
##############################################################################

sub printheader {

	print "Content-type: text/html\n\n";
	print "<!DOCTYPE html '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>";
	print "<HTML xmlns='http://www.w3.org/1999/xhtml'>\n";
	print "<HEAD>\n";
	print "<TITLE>AgentRobin.com - Finding Your Familys Dream Home $Host</title>\n";


	print "<meta name=\"description\" content=\"AgentRobin Tri-valley Real Estate \">\n";
	print "<meta name=\"keywords\" content=\"AgentRobin, Robin, Brooks, virtual, search, danville, san ramon, alamo, dublin, pleasanton, walnut creek, real estate pivot, real estate data, home, homes, homes for sale, real estate, real estate for sale, property, properties, listings, property listings, realtor, agent, Danville Real Estate, San Ramon Real Estate, CA, Condo, Bay Area, East Bay Real Estate, Land, Buyers, Sellers , Contra Costa County, Alameda County,townhouse,California, Keller Williams, Keller Williams Danville\">\n";

#	print "<meta name=\"google-site-verification\" content=\"83oxOEfA77QGbvHBMuileU1zkUzfW5L3O2jAqYCmAqk\" />\n";
#	print "<meta name=\"google-site-verification\" content=\"jMQcqm4fvV9Kk8vYUwUtKX6c27ls4AzpKLy_if_WTQo\" />\n";

	print "<link type='text/css' href='$baseurl/Default_files/AgentRobin_CSS.CSS' rel='stylesheet'>\n";

	print "<link rel='stylesheet' type='text/css' href='$baseurl/CSS/AR_Menu.css'/>\n";
	print "<!--[START-LJ]--><script type='text/javascript' src='$baseurl/scripts/AR_Menu.js'></script><!--[END-LJ]-->\n";


#	jsvalidate();

        print "</head>\n";
	print "<body>\n";
}




################### GENERIC PAGE SETUP ENDING ###################

sub printending {
	print "</body>\n";
	print "</html>\n";
}


sub calc1() {

	print "<FORM Name=CALC1 Method=POST Action=\"/Calcs.pl?processcalc1\">\n";
	print "<INPUT TYPE=HIDDEN NAME=\"CFORM\" VALUE=1>\n";


	print "<div style=\"position: absolute;top: 60px;left: 10px;width: 300px;height:220px; border: 1px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\">\n";

	print "<div style=\"position: absolute;top: 30px;left: 10px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">House Price</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 55px;left: 10px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Downpayment</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 80px;left: 10px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Years to Payoff</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 105px;left: 10px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Interest Rate</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 130px;left: 10px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Tax Rate</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 155px;left: 10px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Insurance Rate</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 28px;left: 110px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Price SIZE=10 Value=$Price></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 51px;left: 110px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Down SIZE=10 Value=$Down></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 74px;left: 110px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Years SIZE=10 Value=$Years></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 97px;left: 110px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=IR SIZE=10 Value=$IR>\%</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 120px;left: 110px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Tax SIZE=10 Value=1.2 READONLY>\% (est.)</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 143px;left: 110px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Ins SIZE=10 Value=.4 READONLY>\% (est.)</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 180px;left: 10px;width: 280px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=SUBMIT Value=Calculate!></SPAN></DIV>\n";


	print "</div>\n";

	print "</FORM>\n";


	print "<div style=\"position: absolute;top: 60px;left: 330px;width: 260px;height:220px; border: 1px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\n";

	print "<B>\n";
	print "<div style=\"position: absolute;top: 30px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Mortgage P+I</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 55px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Tax (T)</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 80px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Insurance (I)</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 112px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Total Monthly (PITI)</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 150px;left: 10px;width: 240px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\"><B>*PITI</B> - Principle + Interest + Taxes + Insurance</SPAN></DIV>\n";


	print "<div style=\"position: absolute;top: 30px;left: 150px;width: 55px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\$ $Payment</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 55px;left: 150px;width: 55px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\$ $YTax</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 80px;left: 150px;width: 55px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\$ $YIns</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 90px;left: 150px;width: 55px;height:20px; border: 0px black solid; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">_______</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 112px;left: 150px;width: 55px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\$ $Total</SPAN></DIV>\n";
	print "</b>\n";




	print "</div>\n";


}


sub calc2() {

	print "<FORM Method=POST Action=\"/Calcs.pl?processcalc2\">\n";
	print "<INPUT TYPE=HIDDEN NAME=CFORM VALUE=2>\n";


	print "<div style=\"position: absolute;top: 60px;left: 10px;width: 300px;height:220px; border: 1px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\">\n";

	print "<div style=\"position: absolute;top: 30px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Monthly Payment</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 55px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Down Payment</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 80px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Years to Payoff</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 105px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Interest Rate</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 130px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Tax Rate</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 155px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Insurance Rate</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 28px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=MPayment SIZE=10 Value=$MPayment></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 53px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Down SIZE=10 Value=$Down></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 78px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Years SIZE=10 Value=$Years></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 103px;left: 140px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=IR SIZE=10 Value=$IR>\%</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 128px;left: 140px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Tax SIZE=10 Value=1.2 READONLY>\% (est.)</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 152px;left: 140px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Ins SIZE=10 Value=.4 DISABLED>\% (est.)</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 180px;left: 10px;width: 280px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=SUBMIT Value=Calculate!></SPAN></DIV>\n";


	print "</div>\n";

	print "</FORM>\n";


	print "<div style=\"position: absolute;top: 60px;left: 330px;width: 260px;height:220px; border: 1px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\n";

	if (length($TPrice) == 5) { $TTPrice = "\$ " . substr($TPrice,0,2) . "," . substr($TPrice,2,3); }
	if (length($TPrice) == 6) { $TTPrice = "\$ " . substr($TPrice,0,3) . "," . substr($TPrice,3,3); }
	if (length($TPrice) == 7) { $TTPrice = "\$ " . substr($TPrice,0,1) . "," . substr($TPrice,1,3) . "," . substr($TPrice,4,3); }

	$YTax = int($TPrice*(1.2/100/12));
	$YIns = int($TPrice*(.4/100/12));
	print "<B>\n";
	print "<div style=\"position: absolute;top: 15px;left: 10px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Maximum Home Price</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 35px;left: 50px;width: 155px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">$TTPrice</SPAN></DIV>\n";
	print "</B>\n";
	lineit2();
### Print Breakdown

	print "<div style=\"position: absolute;top: 70px;left: 20px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Principal+Interest</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 90px;left: 20px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Taxes</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 110px;left: 20px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Insurance</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 70px;left: 146px;width: 40px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">$MPayment</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 90px;left: 146px;width: 40px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">$YTax</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 110px;left: 146px;width: 40px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: right;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">$YIns</SPAN></DIV>\n";

	lineit3();

	$NMPayment = int($MPayment * .7759155);
	$TPrice1 = int($NMPayment/($top/$bot));
	$TPrice1 = $TPrice1 +$Down;

	if (length($TPrice1) == 5) { $TTPrice1 = "\$ " . substr($TPrice1,0,2) . "," . substr($TPrice1,2,3); }
	if (length($TPrice1) == 6) { $TTPrice1 = "\$ " . substr($TPrice1,0,3) . "," . substr($TPrice1,3,3); }
	if (length($TPrice1) == 7) { $TTPrice1 = "\$ " . substr($TPrice1,0,1) . "," . substr($TPrice1,1,3) . "," . substr($TPrice1,4,3); }

	

	print "<div style=\"position: absolute;top: 150px;left: 10px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\"><B>Tax and Ins Adjusted Est.</B></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 180px;left: 50px;width: 155px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\"><B>$TTPrice1</B></SPAN></DIV>\n";

	print "</b>\n";




	print "</div>\n";


}

sub calc3() {

	$FERatio = ($Income / 12) * .28;
	$BERatio = ($Income / 12) * .36;
	$TDebt = ($Income / 12) * .08;
	$Message = "";



	if ($Debt <= $TDebt) {
		$MPayment = $FERatio;
		print "$TDebt - $Debt\n";
		if ($TDebt == 0) {
			$Message = "";
		} else {
			$Message = "Debt Down / Housing Up";
		}
	} else {
		$MPayment = $BERatio - $Debt;
		$Message = "Debt UP / Housing DOWN";
	}


	if ($top == 0 || $bot == 0) {
		$TPrice = 0;
		$TTPrice = 0;
	} else {
		$TempP = $MPayment;
		$TPrice = int($TempP/($top/$bot));
		$TPrice = $TPrice +$Down;
		print "MPAY $MPayment\n";
	}

	if (length($TPrice) == 5) { $TTPrice = "\$ " . substr($TPrice,0,2) . "," . substr($TPrice,2,3); }
	if (length($TPrice) == 6) { $TTPrice = "\$ " . substr($TPrice,0,3) . "," . substr($TPrice,3,3); }
	if (length($TPrice) == 7) { $TTPrice = "\$ " . substr($TPrice,0,1) . "," . substr($TPrice,1,3) . "," . substr($TPrice,4,3); }



	print "<FORM Method=POST Action=\"/Calcs.pl?processcalc3\">\n";
	print "<INPUT TYPE=HIDDEN NAME=CFORM VALUE=2>\n";


	print "<div style=\"position: absolute;top: 60px;left: 10px;width: 300px;height:220px; border: 1px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\">\n";

	print "<div style=\"position: absolute;top: 5px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Annual Income</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 30px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Monthly Debt</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 55px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Down Payment</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 80px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Years to Payoff</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 105px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Interest Rate</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 130px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Tax Rate</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 155px;left: 10px;width: 130px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\">Insurance Rate</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 3px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Income SIZE=10 Value=$Income></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 28px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Debt SIZE=10 Value=$Debt></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 53px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Down SIZE=10 Value=$Down></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 78px;left: 140px;width: 100px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Years SIZE=10 Value=$Years></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 103px;left: 140px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=IR SIZE=10 Value=$IR>\%</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 128px;left: 140px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Tax SIZE=10 Value=1.2 READONLY>\% (est.)</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 153px;left: 140px;width: 150px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=TEXT NAME=Ins SIZE=10 Value=.4 READONLY>\% (est.)</SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 180px;left: 10px;width: 280px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: 1em; font-color:black;\"><INPUT TYPE=SUBMIT Value=Calculate!></SPAN></DIV>\n";


	print "</div>\n";

	print "</FORM>\n";


	print "<div style=\"position: absolute;top: 60px;left: 330px;width: 260px;height:220px; border: 1px black solid; background: #DCD4CD; text-align: left;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">\n";



	print "<div style=\"position: absolute;top: 5px;left: 10px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\">Using 28\%/36\% <A HREF=\"$baseurl/docs/DebtIncome.htm\">Debt-Income Ratio</A></SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 50px;left: 10px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\"><B>Maximum Home Price</B></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 75px;left: 50px;width: 155px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\"><B>$TTPrice</B></SPAN></DIV>\n";


	print "<div style=\"position: absolute;top: 110px;left: 5px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\"><B>$Message</B></SPAN></DIV>\n";

	print "<div style=\"position: absolute;top: 140px;left: 5px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Max Total Debt Payment : $BERatio</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 160px;left: 5px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Less Other Debt Payment: $Debt</SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 190px;left: 5px;width: 250px;height:20px; border: 0px black solid; background: #DCD4CD; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .9em; font-color:black;\">Remaining for Mortgage : $MPayment</SPAN></DIV>\n";




	print "</div>\n";


}


sub currentrate() {

	print "<div style=\"position: absolute;top: 360px;left: 0px;width: 210px;height:303px; border: 0px black solid; background: #F1F0EF;\">\n";

print "
<div style=\"border:1px solid #000000; visibility:show; width:200px; FONT-WEIGHT:normal; FONT-SIZE:11pt; COLOR:#433232; FONT-FAMILY:Arial,Veranda,Helvetica,sans-serif; TEXT-DECORATION:none; padding-top:5px;padding-bottom:5px;padding-left:5px;padding-right:5px; text-align:center; background-color:#F8F8F8\" >
<a style=\"color:#1a345a; TEXT-DECORATION:none;\" >Current Interest Rates</a>
<br><br><a href=\"http://www.escapesomewhere.com\"><img src=\"http://www.escapesomewhere.com/mort_images/mortgagerates_allrates.png\" border=0 bordercolor=#CCCCCC></a>
<BR><a href=\"http://www.escapesomewhere.com/mortgageinterestrates.html\">Historical Mortgage Rates</a></font>
</div>\n";

print "</DIV>\n";

}


sub currate2() {

	print "<div style=\"position: absolute;top: 340px;left: 11px;width: 300px;height:120px; border: 0px black solid; background: #F1F0EF;\">\n";

	print "<link rel=\"stylesheet\" href=\"http://www.bankrate.com/free-content/css/bankrate-fcc-rate-averages.css\" type=\"text/css\"><div id=\"rateAveragesheaderDiv2\" class=\"BankrateFCC_oa-boxhead-container-small\" style=\"display:block\"><div id=\"rateAveragesheaderTitle2\" class=\"BankrateFCC_oa-boxhead\">Mortgage Rate Averages</div><a href=\"http://www.bankrate.com/free-content/mortgage/rate-averages/\" target=\"_blank\"><img id = \"raheaderLogo2\" src=\"http://www.bankrate.com/images/free-content/widget-logo.gif\" border=\"0\" align=\"right\" width=\"116\" height=\"23\" alt=\"Free mortgage rate averages by Bankrate.com\"></a></div><input id=\"rateAveragesVal\" type =\"text\" value=\"1,Arial,300,2,2\" style=\"display:none\" /><script language=\"Javascript\" src=\"http://js.bankrate.com/rate-averages/free-rate-averages-widget.js\" type=\"text/javascript\"></script><div id=\"rateAveragesfooterDiv2\" class=\"BankrateFCC_oa-footer-container small\" style=\"display:block\">View <a href=\"http://www.bankrate.com/national-mortgage-rates/\" title=\"Mortgage rate averages by Bankrate.com\" class=\"BankrateFCC_a\" target=\"_blank\">mortgage rate</a> averages from banks and lenders.</div><script type=\"text/javascript\">rateAveragesinit();</script>\n";

	print "</DIV>\n";

}


sub checkhouse() {

	$minprice = $Price-50000;
	$maxprice = $Price+50000;

	print "<div style=\"position: absolute;top: 340px;left: 331px;width: 260px;height:55px; border: 1px #D2DFFF solid; background: #004276;\">\n";
	print "<FORM Name=\"HSearch\" Method=GET ACTION=\"$baseurl/property.pl?\" target=\"_parent\">\n";
	print "<INPUT TYPE=HIDDEN Name=HLFunction Value=PropertySearch>";

	print "<div style=\"position: absolute;top: 0px;left: 0px;width: 260px;height:20px; border: 0px black solid; background: #FFFFFF; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #004276; valign: middle;\"><B>Search Homes at this price! (+/- \$50,000)</B></SPAN></DIV>\n";
	print "<div style=\"position: absolute;top: 26px;left: 5px;width: 255px;height:20px; border: 0px black solid; \"><SPAN style=\"font-family: helvetica; font-size: .8em; font-color:black;\">$SSTR</SPAN><IMG SRC=\"/Images/space3.png\"><INPUT Type=SUbmit Value=\"Search Now!\"></DIV>\n";

	print "<INPUT TYPE=HIDDEN Name=minbed Value=1>";
	print "<INPUT TYPE=HIDDEN Name=maxbed Value=9>";
	print "<INPUT TYPE=HIDDEN Name=minbath Value=0>";
	print "<INPUT TYPE=HIDDEN Name=maxbath Value=Any>";
	print "<INPUT TYPE=HIDDEN Name=minprice Value=$minprice>";
	print "<INPUT TYPE=HIDDEN Name=maxprice Value=$maxprice>\n";
	print "</FORM>\n";

	print "</DIV>\n";

}




sub rightad() {

	$minprice = $Price-50000;
	$maxprice = $Price+50000;

	print "<div style=\"position: absolute;top: 180px;left: 620px;width: 200px;height:510px; border: 0px black solid; \">\n";

		print "<div style=\"position: absolute;top: 0px;left: 10px;width: 180px;height:200px; border: 1px black solid; background: #004276;\">\n";
			print "<FORM Name=\"Signup\" Method=post onsubmit=\"return validateForm();\" Action=\"$baseurl/Calcs.pl?signup\">\n";
			print "<INPUT TYPE=HIDDEN Name=HLFunction Value=SignUp>";
			print "<INPUT TYPE=HIDDEN Name=Price Value=$Price>";

			print "<div style=\"position: absolute;top: 0px;left: 0px;width: 180px;height:30px; border: 0px black solid; background: #FFFFFF; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #004276; valign: middle;\"><B>Track Tri-Valley Homes in this Price Range..</B></SPAN></DIV>\n";


			print "<div style=\"position: absolute;top: 35px;left: 5px;width: 180px;height:15px; border: 0px black solid; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #FFFFFF; valign: middle;\"><B>E-Mail Address</B></SPAN></DIV>\n";
			print "<div style=\"position: absolute;top: 52px;left: 5px;width: 180px;height:15px; border: 0px black solid; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #004276; valign: middle;\"><B><INPUT Type=Text Name=EMail SIZE=20></B></SPAN></DIV>\n";

			print "<div style=\"position: absolute;top: 80px;left: 5px;width: 180px;height:15px; border: 0px black solid; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #FFFFFF; valign: middle;\"><B>Name</B></SPAN></DIV>\n";
			print "<div style=\"position: absolute;top: 97px;left: 5px;width: 180px;height:15px; border: 0px black solid; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #004276; valign: middle;\"><B><INPUT Type=Text Name=CName SIZE=12></B></SPAN></DIV>\n";

			print "<div style=\"position: absolute;top: 125px;left: 5px;width: 180px;height:15px; border: 0px black solid; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #FFFFFF; valign: middle;\"><B>Community</B></SPAN></DIV>\n";
			print "<div style=\"position: absolute;top: 142px;left: 5px;width: 180px;height:15px; border: 0px black solid; text-align: left;\"><SPAN style=\"font-family: arial; font-size: .7em; color: #004276; valign: middle;\">$SSTR</B></SPAN></DIV>\n";

			print "<div style=\"position: absolute;top: 172px;left: 5px;width: 180px;height:20px; border: 0px black solid; text-align: center;\"><SPAN style=\"font-family: helvetica; font-size: .6em; color: #FFFFFF;\"><INPUT TYPE=\"Submit\" Value=\"Signup!\"></SPAN></DIV>\n";

			print "</FORM>\n";
		print "</DIV>\n";

	print "</DIV>\n";

}


sub trulia() {

	$minprice = $Price-50000;
	$maxprice = $Price+50000;

	print "<div style=\"position: absolute;top: 180px;left: 620px;width: 200px;height:510px; border: 0px black solid; \">\n";

	print "<div id=\"truliaWidgetVoices\" style=\"background-color:#ffffff;\">    <script language=\"javascript\" src=\"http://synd.trulia.com/voices/my_answers/1662237-3-180-qa.js\"></script>    <div class=\"twvFooter\">        <div class=\"twvSeeAll\"><a href=\"http://synd.trulia.com/voices\" target=\"truliahome\">Real Estate Advice &amp; Opinions</a></div>        <div class=\"twvGetThis\">Placeholder</div>        <div class=\"twvPoweredBy\"><a href=\"http://www.trulia.com/\">                <img src=\"http://static.trulia-cdn.com/images/widgets/voices_small_logo.gif\" border=\"0\" align=\"absbottom\" alt=\"Real Estate\" />            </a>        </div>        <div class=\"twvEnd\"></div>    </div></div>\n";
	print "</DIV>\n";

}


sub lineit() {

	print "<div style=\"position: absolute;top: 327px;left: 5px;width: 595px;height:1px; border: 0px black solid; background: #000000;\">\n";	
	print "</DIV>\n";

}


sub lineit2() {

	print "<div style=\"position: absolute;top: 60px;left: 5px;width: 240px;height:1px; border: 0px black solid; background: #000000;\">\n";	
	print "</DIV>\n";

}

sub lineit3() {

	print "<div style=\"position: absolute;top: 135px;left: 5px;width: 240px;height:1px; border: 0px black solid; background: #000000;\">\n";	
	print "</DIV>\n";

}
sub jsvalidate() {

	print "<script type=\"text/javascript\">\n";


	print "function validateForm()\n";
	print "{\n";

	print "  alert(\"Not a valid e-mail address\");\n";
	print "var x=document.forms[\"Signup\"][\"EMail\"].value\n";
	print "var atpos=x.indexOf(\"@\");\n";
	print "var dotpos=x.lastIndexOf(\".\");\n";
	print "if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)\n";
	print "  {\n";
	print "  alert(\"Not a valid e-mail address\");\n";
	print "  return false;\n";
	print "  }\n";
	print "</script>\n";

}

sub bread_crumb_box() {

	$font = "font-family: Segoe UI; font-weight: 200; font-size: 10pt; color: white;";

	print "   <DIV style='position: absolute; left: 10px; top: 145px; height: 15px; width: 1100px; border-style: inset; border-width: 0px; text-align: left;'>\n";
		print "           <SPAN style='$font'><A style='color: white;' HREF='http://www.danvillelive.com/home.pl'>Home</A></SPAN>\n";
		print "           <SPAN style='$font';>>> Tools</SPAN>\n";
		print "           <SPAN style='$font'><A style='color: white;' HREF='http://www.danvillelive.com/Calcs.pl?'>>> Calculators</A></SPAN>\n";
	print "   </DIV>\n";


}