#!/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; }
	}
}




my $pasth = $dbh->prepare("select MLSNUM,Class,Type,Area,Price,AddressNumber,AddressDirection,AddressStreet,Address2,City,State,Zip,Status,SaleRent,GarageType,Blank16,Blank17,Blank18,Blank19,AgentID,AgentName,AgentPhone,ListingOffice1ID,ListingOffice1Name,ListingOffice1Phone,CoAgentID,CoAgentName,CoAgentPhone,ListingOffice2ID,ListingOffice2Name,ListingOffice2Phone,Blank32,Blank33,PhotoVideo,Blank35,Blank36,LinkedMLSNUM,Blank38,Blank39,Blank40,Township,County,Subdivision,Zoning,Legal,Blank46,Irregular,DitchFee,Acres,PricePerAcres,YRBuilt,Blank52,TotalSqFt,MainLevelSqFt,LowerLevelSqFt,UpperLevel1SqFt,UpperLevel2SqFt,Source,BasementSqFt,BasementFinSqFt,BasementUnFinSqFt,ElementarySchool,MiddleSchool,HighSchool,Unit1LivingRoom,Unit1DiningRoom,Unit1Kitchen,Unit1MasterBedroom,Unit1Bedroom2,Unit1Bath,Unit1UtilityRoom,Unit1OtherRoom,Unit1Range,Unit1Refrigerator,Unit1Dishwasher,Unit1GarbageDisposal,Unit1WaterHeater,Blank78,Unit1Parking,Unit1MonthlyRent,Unit1LeaseStatus,Unit2LivingRoom,Unit2DiningRoom,Unit2Kitchen,Unit2MasterBedroom,Unit2Bedroom2,Unit2Bath,Unit2UtilityRoom,Unit2OtherRoom,Unit2Range,Unit2Refrigerator,Unit2Dishwasher,Unit2GarbageDisposal,Unit2WaterHeater,Blank95,Unit2Parking,Unit2MonthlyRent,Unit2LeaseStatus,Unit3LivingRoom,Unit3DiningRoom,Unit3Kitchen,Unit3MasterBedroom,Unit3Bedroom2,Unit3Bath,Unit3UtilityRoom,Unit3OtherRoom,Unit3Range,Unit3Refrigerator,Unit3Dishwasher,Unit3GarbageDisposal,Unit3WaterHeater,Blank112,Unit3Parking,Unit3MonthlyRent,Unit3LeaseStatus,Unit4LivingRoom,Unit4DiningRoom,Unit4Kitchen,Unit4MasterBedroom,Unit4Bedroom2,Unit4Bath,Unit4UtilityRoom,Unit4OtherRoom,Unit4Range,Unit4Refrigerator,Unit4Dishwasher,Unit4GarbageDisposal,Unit4WaterHeater,Blank129,Unit4Parking,Unit4MonthlyRent,Unit4LeaseStatus,Unit5LivingRoom,Unit5DiningRoom,Unit5Kitchen,Unit5MasterBedroom,Unit5Bedroom2,Unit5Bath,Unit5UtilityRoom,Unit5OtherRoom,Unit5Range,Unit5Refrigerator,Unit5Dishwasher,Unit5GarbageDisposal,Unit5WaterHeater,Blank146,Unit5Parking,Unit5MonthlyRent,Unit5LeaseStatus,Unit6LivingRoom,Unit6DiningRoom,Unit6Kitchen,Unit6MasterBedroom,Unit6Bedroom2,Unit6Bath,Unit6UtilityRoom,Unit6OtherRoom,Unit6Range,Unit6Refrigerator,Unit6Dishwasher,Unit6GarbageDisposal,Unit6WaterHeater,Blank163,Unit6Parking,Unit6MonthlyRent,Unit6LeaseStatus,Unit7LivingRoom,Unit7DiningRoom,Unit7Kitchen,Unit7MasterBedroom,Unit7Bedroom2,Unit7Bath,Unit7UtilityRoom,Unit7OtherRoom,Unit7Range,Unit7Refrigerator,Unit7Dishwasher,Unit7GarbageDisposal,Unit7WaterHeater,Blank180,Unit7Parking,Unit7MonthlyRent,Unit7LeaseStatus,Unit8LivingRoom,Unit8DiningRoom,Unit8Kitchen,Unit8MasterBedroom,Unit8Bedroom2,Unit8Bath,Unit8UtilityRoom,Unit8OtherRoom,Unit8Range,Unit8Refrigerator,Unit8Dishwasher,Unit8GarbageDisposal,Unit8WaterHeater,Blank197,Unit8Parking,Unit8MonthlyRent,Unit8LeaseStatus,Gas,Electric,Water,Sewer,Taxes,Maintenance,Insurance,Trash,Other,Blank210,Reserved,Blank212,Directions,Blank214,Blank215,TaxIDNUM,LandValue,ImproveValue,EstimatedAnnualTax,Blank220,DitchFee2,OtherExp,OtherExpPerQMY,BlueRiverFee,GasMonth,ElectricMonth,WaterMonth,SewerMonth,AssocDues,AssocDuesPerQMY,Auction,AuctionDate,Assumption,Remarks,Blank235,Contract,Blank237,Blank238,Blank239,Blank240,Blank241,Blank242,Blank243,Blank244,Blank245,Blank246,Blank247,Blank248,Blank249,Blank250,Blank251,Blank252,Blank253,Blank254,Blank255,Blank256,Blank257,Blank258,Blank259,TheFeaturesDB from listings_inv3 where MLSNUM = '$INPUT{mlsnumber}'");
$pasth->execute;

while (($MLSNUM,$Class,$Type,$Area,$Price,$AddressNumber,$AddressDirection,$AddressStreet,$Address2,$City,$State,$Zip,$Status,$SaleRent,$GarageType,$Blank16,$Blank17,$Blank18,$Blank19,$AgentID,$AgentName,$AgentPhone,$ListingOffice1ID,$ListingOffice1Name,$ListingOffice1Phone,$CoAgentID,$CoAgentName,$CoAgentPhone,$ListingOffice2ID,$ListingOffice2Name,$ListingOffice2Phone,$Blank32,$Blank33,$PhotoVideo,$Blank35,$Blank36,$LinkedMLSNUM,$Blank38,$Blank39,$Blank40,$Township,$County,$Subdivision,$Zoning,$Legal,$Blank46,$Irregular,$DitchFee,$Acres,$PricePerAcres,$YRBuilt,$Blank52,$TotalSqFt,$MainLevelSqFt,$LowerLevelSqFt,$UpperLevel1SqFt,$UpperLevel2SqFt,$Source,$BasementSqFt,$BasementFinSqFt,$BasementUnFinSqFt,$ElementarySchool,$MiddleSchool,$HighSchool,$Unit1LivingRoom,$Unit1DiningRoom,$Unit1Kitchen,$Unit1MasterBedroom,$Unit1Bedroom2,$Unit1Bath,$Unit1UtilityRoom,$Unit1OtherRoom,$Unit1Range,$Unit1Refrigerator,$Unit1Dishwasher,$Unit1GarbageDisposal,$Unit1WaterHeater,$Blank78,$Unit1Parking,$Unit1MonthlyRent,$Unit1LeaseStatus,$Unit2LivingRoom,$Unit2DiningRoom,$Unit2Kitchen,$Unit2MasterBedroom,$Unit2Bedroom2,$Unit2Bath,$Unit2UtilityRoom,$Unit2OtherRoom,$Unit2Range,$Unit2Refrigerator,$Unit2Dishwasher,$Unit2GarbageDisposal,$Unit2WaterHeater,$Blank95,$Unit2Parking,$Unit2MonthlyRent,$Unit2LeaseStatus,$Unit3LivingRoom,$Unit3DiningRoom,$Unit3Kitchen,$Unit3MasterBedroom,$Unit3Bedroom2,$Unit3Bath,$Unit3UtilityRoom,$Unit3OtherRoom,$Unit3Range,$Unit3Refrigerator,$Unit3Dishwasher,$Unit3GarbageDisposal,$Unit3WaterHeater,$Blank112,$Unit3Parking,$Unit3MonthlyRent,$Unit3LeaseStatus,$Unit4LivingRoom,$Unit4DiningRoom,$Unit4Kitchen,$Unit4MasterBedroom,$Unit4Bedroom2,$Unit4Bath,$Unit4UtilityRoom,$Unit4OtherRoom,$Unit4Range,$Unit4Refrigerator,$Unit4Dishwasher,$Unit4GarbageDisposal,$Unit4WaterHeater,$Blank129,$Unit4Parking,$Unit4MonthlyRent,$Unit4LeaseStatus,$Unit5LivingRoom,$Unit5DiningRoom,$Unit5Kitchen,$Unit5MasterBedroom,$Unit5Bedroom2,$Unit5Bath,$Unit5UtilityRoom,$Unit5OtherRoom,$Unit5Range,$Unit5Refrigerator,$Unit5Dishwasher,$Unit5GarbageDisposal,$Unit5WaterHeater,$Blank146,$Unit5Parking,$Unit5MonthlyRent,$Unit5LeaseStatus,$Unit6LivingRoom,$Unit6DiningRoom,$Unit6Kitchen,$Unit6MasterBedroom,$Unit6Bedroom2,$Unit6Bath,$Unit6UtilityRoom,$Unit6OtherRoom,$Unit6Range,$Unit6Refrigerator,$Unit6Dishwasher,$Unit6GarbageDisposal,$Unit6WaterHeater,$Blank163,$Unit6Parking,$Unit6MonthlyRent,$Unit6LeaseStatus,$Unit7LivingRoom,$Unit7DiningRoom,$Unit7Kitchen,$Unit7MasterBedroom,$Unit7Bedroom2,$Unit7Bath,$Unit7UtilityRoom,$Unit7OtherRoom,$Unit7Range,$Unit7Refrigerator,$Unit7Dishwasher,$Unit7GarbageDisposal,$Unit7WaterHeater,$Blank180,$Unit7Parking,$Unit7MonthlyRent,$Unit7LeaseStatus,$Unit8LivingRoom,$Unit8DiningRoom,$Unit8Kitchen,$Unit8MasterBedroom,$Unit8Bedroom2,$Unit8Bath,$Unit8UtilityRoom,$Unit8OtherRoom,$Unit8Range,$Unit8Refrigerator,$Unit8Dishwasher,$Unit8GarbageDisposal,$Unit8WaterHeater,$Blank197,$Unit8Parking,$Unit8MonthlyRent,$Unit8LeaseStatus,$Gas,$Electric,$Water,$Sewer,$Taxes,$Maintenance,$Insurance,$Trash,$Other,$Blank210,$Reserved,$Blank212,$Directions,$Blank214,$Blank215,$TaxIDNUM,$LandValue,$ImproveValue,$EstimatedAnnualTax,$Blank220,$DitchFee2,$OtherExp,$OtherExpPerQMY,$BlueRiverFee,$GasMonth,$ElectricMonth,$WaterMonth,$SewerMonth,$AssocDues,$AssocDuesPerQMY,$Auction,$AuctionDate,$Assumption,$Remarks,$Blank235,$Contract,$Blank237,$Blank238,$Blank239,$Blank240,$Blank241,$Blank242,$Blank243,$Blank244,$Blank245,$Blank246,$Blank247,$Blank248,$Blank249,$Blank250,$Blank251,$Blank252,$Blank253,$Blank254,$Blank255,$Blank256,$Blank257,$Blank258,$Blank259,$TheFeaturesDB) = $pasth->fetchrow_array()) {


@thefeatures = split(/\|/,$TheFeaturesDB);
$startcount = "0";
foreach $one (@thefeatures) {
$yasth = $dbh->prepare("select featurename,categoryname from features where codenum = '$one'");

$yasth->execute;
while (($featurename,$categoryname) = $yasth->fetchrow_array()) {
	$categoryname = lc($categoryname);
	$featurename = lc($featurename);

	$categoryname =~ s/CHR1/\'/gi;
	$categoryname =~ s/CHR2/\"/gi;

	$showfeaturestable .= "<td nowrap><img src=images/dot.gif>$categoryname <b>$featurename</b></td>";

if ($startcount eq "2") {
$showfeaturestable .= "</tr><tr>";
$startcount = "0";
}
else {
$startcount++;
}


}
} 


$TotalSqFt = &commas($TotalSqFt);


$preprice = $Price;

	$principal = "$Price";
	$interest = 6.5;
	$monthlyinterest = ($interest)/1200;
	$termyear = 30;
	$numberofmonths = $termyear*12;
	
	$temp = 1 + $monthlyinterest;
	
	$expon = 1;
	for ($p = 0; $p < $numberofmonths; $p++)
	{
		$expon = $temp * $expon;
	}
	
	$expon = 1 / $expon;
	$expon = 1 - $expon;
	$expon = $monthlyinterest / $expon;
	
	$monthlypayment = $principal * $expon;

	$monthlypayment=sprintf("%.2f",$monthlypayment);
	$monthlypayment = &commas($monthlypayment);

	$Price = &commas($Price);

	$monthlypayment = &commas($monthlypayment);
	$mortgagetax = $EstimatedAnnualTax;
	$EstimatedAnnualTax = &commas($EstimatedAnnualTax);


if ($SaleRent eq "S") {
$SaleRent = "For Sale";
}
else {
$SaleRent = "For Rent";
}

if ($Address2) {
$Address2 = "$Address2<br>";
}
else {
}

if ($ListingOffice1ID eq "48") {
$printoffice = "<table border=0 cellpadding=0 cellspacing=0><tr><td><img src=images/era_showlogo.gif></td><td><b>Offered By:</b><br><a href=\"http://www.munciemls.com/agents.idx?action=showagent&agent=$AgentID\">$AgentName</a><br>$ListingOffice1Name<br>765-741-9111</td></tr></table>"
}
else {
$printoffice = "<b>Offered By</b><br>$AgentName<br>$ListingOffice1Name<br>"
}

$searchstrings = "City=$INPUT{City}&County=$INPUT{County}&MinPrice=$INPUT{MinPrice}&MaxPrice=$INPUT{MaxPrice}&MinBed=$INPUT{MinBed}&MinBath=$INPUT{MinBath}&Acreage=$INPUT{Acreage}&YBuilt=$INPUT{YBuilt}&MinSF=$INPUT{MinSF}&MaxSF=$INPUT{MaxSF}&Address=$INPUT{Address}&Remarks=$INPUT{Remarks}&Show=$INPUT{Show}&sortby=$INPUT{sortby}&orderby=$INPUT{orderby}&Page=$INPUT{Page}";

if ($ENV{QUERY_STRING} =~ /City/) {
$showresultsback = "<a href=\"search_inv.idx?$searchstrings\">Return To Search Results</a>";
}
else {
$showresultsback = "";
}


if (($Unit1LivingRoom eq "X" || $Unit1LivingRoom eq "-" || $Unit1LivingRoom eq "") && ($Unit1DiningRoom eq "X" || $Unit1DiningRoom eq "-" || $Unit1DiningRoom eq "") && ($Unit1Kitchen eq "X" || $Unit1Kitchen eq "-" || $Unit1Kitchen eq "") && ($Unit1MasterBedroom eq "X" || $Unit1MasterBedroom eq "-" || $Unit1MasterBedroom eq "") && ($Unit1Bedroom2 eq "X" || $Unit1Bedroom2 eq "-" || $Unit1Bedroom2 eq "") && ($Unit1Bath eq "X" || $Unit1Bath eq "-" || $Unit1Bath eq "") && ($Unit1UtilityRoom eq "X" || $Unit1UtilityRoom eq "-" || $Unit1UtilityRoom eq "") && ($Unit1OtherRoom eq "X" || $Unit1OtherRoom eq "-" || $Unit1OtherRoom eq "") && ($Unit1Range eq "X" || $Unit1Range eq "-" || $Unit1Range eq "") && ($Unit1Refrigerator eq "X" || $Unit1Refrigerator eq "-" || $Unit1Refrigerator eq "") && ($Unit1Dishwasher eq "X" || $Unit1Dishwasher eq "-" || $Unit1Dishwasher eq "") && ($Unit1GarbageDisposal eq "X" || $Unit1GarbageDisposal eq "-" || $Unit1GarbageDisposal eq "") && ($Unit1WaterHeater eq "X" || $Unit1WaterHeater eq "-" || $Unit1WaterHeater eq "") && ($Unit1Furnace eq "X" || $Unit1Furnace eq "-" || $Unit1Furnace eq "") && ($Unit1Parking eq "X" || $Unit1Parking eq "-" || $Unit1Parking eq "") && ($Unit1MonthlyRent eq "X" || $Unit1MonthlyRent eq "-" || $Unit1MonthlyRent eq "") && ($Unit1LeaseStatus eq "X" || $Unit1LeaseStatus eq "-" || $Unit1LeaseStatus eq "")) {

$Unit1Header = "&nbsp;";
}
else {
$Unit1Header = "Unit \#1";
}

if ($Unit1LivingRoom eq "X" || $Unit1LivingRoom eq "\-" || $Unit1LivingRoom eq "") {
$cUnit1LivingRoom = "";
}
else {
$cUnit1LivingRoom = "Living Room <b>$Unit1LivingRoom</b><br>";
}


if ($Unit1DiningRoom eq "X" || $Unit1DiningRoom eq "\-" || $Unit1DiningRoom eq "") {
$cUnit1DiningRoom = "";
}
else {
$cUnit1DiningRoom = "Dining Room <b>$Unit1DiningRoom</b><br>";
}


if ($Unit1Kitchen eq "X" || $Unit1Kitchen eq "\-" || $Unit1Kitchen eq "") {
$cUnit1Kitchen = "";
}
else {
$cUnit1Kitchen = "Kitchen <b>$Unit1Kitchen</b><br>";
}


if ($Unit1MasterBedroom eq "X" || $Unit1MasterBedroom eq "\-" || $Unit1MasterBedroom eq "") {
$cUnit1MasterBedroom = "";
}
else {
$cUnit1MasterBedroom = "Master Bedroom <b>$Unit1MasterBedroom</b><br>";
}

if ($Unit1Bedroom2 eq "X" || $Unit1Bedroom2 eq "\-" || $Unit1Bedroom2 eq "") {
$cUnit1Bedroom2 = "";
}
else {
$cUnit1Bedroom2 = "Bedroom 2 <b>$Unit1Bedroom2</b><br>";
}

if ($Unit1Bath eq "X" || $Unit1Bath eq "\-" || $Unit1Bath eq "") {
$cUnit1Bath = "";
}
else {
$cUnit1Bath = "Bathroom <b>$Unit1Bath</b><br>";
}

if ($Unit1UtilityRoom eq "X" || $Unit1UtilityRoom eq "\-" || $Unit1UtilityRoom eq "") {
$cUnit1UtilityRoom = "";
}
else {
$cUnit1UtilityRoom = "Utility Room <b>$Unit1UtilityRoom</b><br>";
}

if ($Unit1OtherRoom eq "X" || $Unit1OtherRoom eq "\-" || $Unit1OtherRoom eq "") {
$cUnit1OtherRoom = "";
}
else {
$cUnit1OtherRoom = "Other Room 1 <b>$Unit1OtherRoom</b><br>";
}

if ($Unit1Range eq "X" || $Unit1Range eq "\-" || $Unit1Range eq "") {
$cUnit1Range = "";
}
else {
$cUnit1Range = "Range <b>$Unit1Range</b><br>";
}

if ($Unit1Refrigerator eq "X" || $Unit1Refrigerator eq "\-" || $Unit1Refrigerator eq "") {
$cUnit1Refrigerator = "";
}
else {
$cUnit1Refrigerator = "Refrigerator <b>$Unit1Refrigerator</b><br>";
}

if ($Unit1Dishwasher eq "X" || $Unit1Dishwasher eq "\-" || $Unit1Dishwasher eq "") {
$cUnit1Dishwasher = "";
}
else {
$cUnit1Dishwasher = "Dishwasher <b>$Unit1Dishwasher</b><br>";
}

if ($Unit1GarbageDisposal eq "X" || $Unit1GarbageDisposal eq "\-" || $Unit1GarbageDisposal eq "") {
$cUnit1GarbageDisposal = "";
}
else {
$cUnit1GarbageDisposal = "Garbage Disposal <b>$Unit1GarbageDisposal</b><br>";
}

if ($Unit1WaterHeater eq "X" || $Unit1WaterHeater eq "\-" || $Unit1WaterHeater eq "") {
$cUnit1WaterHeater = "";
}
else {
$cUnit1WaterHeater = "Water Heater <b>$Unit1WaterHeater</b><br>";
}

if ($Unit1Furnace eq "X" || $Unit1Furnace eq "\-" || $Unit1Furnace eq "") {
$cUnit1Furnace = "";
}
else {
$cUnit1Furnace = "Furnace <b>$Unit1Furnace</b><br>";
}

if ($Unit1Parking eq "X" || $Unit1Parking eq "\-" || $Unit1Parking eq "") {
$cUnit1Parking = "";
}
else {
$cUnit1Parking = "Parking <b>$Unit1Parking</b><br>";
}

if ($Unit1MonthlyRent eq "X" || $Unit1MonthlyRent eq "\-" || $Unit1MonthlyRent eq "") {
$cUnit1MonthlyRent = "";
}
else {
$cUnit1MonthlyRent = "Monthly Rent <b>\$$Unit1MonthlyRent</b><br>";
}

if ($Unit1LeaseStatus eq "X" || $Unit1LeaseStatus eq "\-" || $Unit1LeaseStatus eq "") {
$cUnit1LeaseStatus = "";
}
elsif ($Unit1LeaseStatus eq "M/M") {
$cUnit1LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit1LeaseStatus = "Lease Status <b>$Unit1LeaseStatus</b><br>";
}

if (($Unit2LivingRoom eq "X" || $Unit2LivingRoom eq "-" || $Unit2LivingRoom eq "") && ($Unit2DiningRoom eq "X" || $Unit2DiningRoom eq "-" || $Unit2DiningRoom eq "") && ($Unit2Kitchen eq "X" || $Unit2Kitchen eq "-" || $Unit2Kitchen eq "") && ($Unit2MasterBedroom eq "X" || $Unit2MasterBedroom eq "-" || $Unit2MasterBedroom eq "") && ($Unit2Bedroom2 eq "X" || $Unit2Bedroom2 eq "-" || $Unit2Bedroom2 eq "") && ($Unit2Bath eq "X" || $Unit2Bath eq "-" || $Unit2Bath eq "") && ($Unit2UtilityRoom eq "X" || $Unit2UtilityRoom eq "-" || $Unit2UtilityRoom eq "") && ($Unit2OtherRoom eq "X" || $Unit2OtherRoom eq "-" || $Unit2OtherRoom eq "") && ($Unit2Range eq "X" || $Unit2Range eq "-" || $Unit2Range eq "") && ($Unit2Refrigerator eq "X" || $Unit2Refrigerator eq "-" || $Unit2Refrigerator eq "") && ($Unit2Dishwasher eq "X" || $Unit2Dishwasher eq "-" || $Unit2Dishwasher eq "") && ($Unit2GarbageDisposal eq "X" || $Unit2GarbageDisposal eq "-" || $Unit2GarbageDisposal eq "") && ($Unit2WaterHeater eq "X" || $Unit2WaterHeater eq "-" || $Unit2WaterHeater eq "") && ($Unit2Furnace eq "X" || $Unit2Furnace eq "-" || $Unit2Furnace eq "") && ($Unit2Parking eq "X" || $Unit2Parking eq "-" || $Unit2Parking eq "") && ($Unit2MonthlyRent eq "X" || $Unit2MonthlyRent eq "-" || $Unit2MonthlyRent eq "") && ($Unit2LeaseStatus eq "X" || $Unit2LeaseStatus eq "-" || $Unit2LeaseStatus eq "")) {

$Unit2Header = "&nbsp;";
}
else {
$Unit2Header = "Unit \#2";
}

if ($Unit2LivingRoom eq "X" || $Unit2LivingRoom eq "\-" || $Unit2LivingRoom eq "") {
$cUnit2LivingRoom = "";
}
else {
$cUnit2LivingRoom = "Living Room <b>$Unit2LivingRoom</b><br>";
}


if ($Unit2DiningRoom eq "X" || $Unit2DiningRoom eq "\-" || $Unit2DiningRoom eq "") {
$cUnit2DiningRoom = "";
}
else {
$cUnit2DiningRoom = "Dining Room <b>$Unit2DiningRoom</b><br>";
}


if ($Unit2Kitchen eq "X" || $Unit2Kitchen eq "\-" || $Unit2Kitchen eq "") {
$cUnit2Kitchen = "";
}
else {
$cUnit2Kitchen = "Kitchen <b>$Unit2Kitchen</b><br>";
}


if ($Unit2MasterBedroom eq "X" || $Unit2MasterBedroom eq "\-" || $Unit2MasterBedroom eq "") {
$cUnit2MasterBedroom = "";
}
else {
$cUnit2MasterBedroom = "Master Bedroom <b>$Unit2MasterBedroom</b><br>";
}

if ($Unit2Bedroom2 eq "X" || $Unit2Bedroom2 eq "\-" || $Unit2Bedroom2 eq "") {
$cUnit2Bedroom2 = "";
}
else {
$cUnit2Bedroom2 = "Bedroom 2 <b>$Unit2Bedroom2</b><br>";
}

if ($Unit2Bath eq "X" || $Unit2Bath eq "\-" || $Unit2Bath eq "") {
$cUnit2Bath = "";
}
else {
$cUnit2Bath = "Bathroom <b>$Unit2Bath</b><br>";
}

if ($Unit2UtilityRoom eq "X" || $Unit2UtilityRoom eq "\-" || $Unit2UtilityRoom eq "") {
$cUnit2UtilityRoom = "";
}
else {
$cUnit2UtilityRoom = "Utility Room <b>$Unit2UtilityRoom</b><br>";
}

if ($Unit2OtherRoom eq "X" || $Unit2OtherRoom eq "\-" || $Unit2OtherRoom eq "") {
$cUnit2OtherRoom = "";
}
else {
$cUnit2OtherRoom = "Other Room 1 <b>$Unit2OtherRoom</b><br>";
}

if ($Unit2Range eq "X" || $Unit2Range eq "\-" || $Unit2Range eq "") {
$cUnit2Range = "";
}
else {
$cUnit2Range = "Range <b>$Unit2Range</b><br>";
}

if ($Unit2Refrigerator eq "X" || $Unit2Refrigerator eq "\-" || $Unit2Refrigerator eq "") {
$cUnit2Refrigerator = "";
}
else {
$cUnit2Refrigerator = "Refrigerator <b>$Unit2Refrigerator</b><br>";
}

if ($Unit2Dishwasher eq "X" || $Unit2Dishwasher eq "\-" || $Unit2Dishwasher eq "") {
$cUnit2Dishwasher = "";
}
else {
$cUnit2Dishwasher = "Dishwasher <b>$Unit2Dishwasher</b><br>";
}

if ($Unit2GarbageDisposal eq "X" || $Unit2GarbageDisposal eq "\-" || $Unit2GarbageDisposal eq "") {
$cUnit2GarbageDisposal = "";
}
else {
$cUnit2GarbageDisposal = "Garbage Disposal <b>$Unit2GarbageDisposal</b><br>";
}

if ($Unit2WaterHeater eq "X" || $Unit2WaterHeater eq "\-" || $Unit2WaterHeater eq "") {
$cUnit2WaterHeater = "";
}
else {
$cUnit2WaterHeater = "Water Heater <b>$Unit2WaterHeater</b><br>";
}

if ($Unit2Furnace eq "X" || $Unit2Furnace eq "\-" || $Unit2Furnace eq "") {
$cUnit2Furnace = "";
}
else {
$cUnit2Furnace = "Furnace <b>$Unit2Furnace</b><br>";
}

if ($Unit2Parking eq "X" || $Unit2Parking eq "\-" || $Unit2Parking eq "") {
$cUnit2Parking = "";
}
else {
$cUnit2Parking = "Parking <b>$Unit2Parking</b><br>";
}

if ($Unit2MonthlyRent eq "X" || $Unit2MonthlyRent eq "\-" || $Unit2MonthlyRent eq "") {
$cUnit2MonthlyRent = "";
}
else {
$cUnit2MonthlyRent = "Monthly Rent <b>\$$Unit2MonthlyRent</b><br>";
}

if ($Unit2LeaseStatus eq "X" || $Unit2LeaseStatus eq "\-" || $Unit2LeaseStatus eq "") {
$cUnit2LeaseStatus = "";
}
elsif ($Unit2LeaseStatus eq "M/M") {
$cUnit2LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit2LeaseStatus = "Lease Status <b>$Unit2LeaseStatus</b><br>";
}

if (($Unit3LivingRoom eq "X" || $Unit3LivingRoom eq "-" || $Unit3LivingRoom eq "") && ($Unit3DiningRoom eq "X" || $Unit3DiningRoom eq "-" || $Unit3DiningRoom eq "") && ($Unit3Kitchen eq "X" || $Unit3Kitchen eq "-" || $Unit3Kitchen eq "") && ($Unit3MasterBedroom eq "X" || $Unit3MasterBedroom eq "-" || $Unit3MasterBedroom eq "") && ($Unit3Bedroom2 eq "X" || $Unit3Bedroom2 eq "-" || $Unit3Bedroom2 eq "") && ($Unit3Bath eq "X" || $Unit3Bath eq "-" || $Unit3Bath eq "") && ($Unit3UtilityRoom eq "X" || $Unit3UtilityRoom eq "-" || $Unit3UtilityRoom eq "") && ($Unit3OtherRoom eq "X" || $Unit3OtherRoom eq "-" || $Unit3OtherRoom eq "") && ($Unit3Range eq "X" || $Unit3Range eq "-" || $Unit3Range eq "") && ($Unit3Refrigerator eq "X" || $Unit3Refrigerator eq "-" || $Unit3Refrigerator eq "") && ($Unit3Dishwasher eq "X" || $Unit3Dishwasher eq "-" || $Unit3Dishwasher eq "") && ($Unit3GarbageDisposal eq "X" || $Unit3GarbageDisposal eq "-" || $Unit3GarbageDisposal eq "") && ($Unit3WaterHeater eq "X" || $Unit3WaterHeater eq "-" || $Unit3WaterHeater eq "") && ($Unit3Furnace eq "X" || $Unit3Furnace eq "-" || $Unit3Furnace eq "") && ($Unit3Parking eq "X" || $Unit3Parking eq "-" || $Unit3Parking eq "") && ($Unit3MonthlyRent eq "X" || $Unit3MonthlyRent eq "-" || $Unit3MonthlyRent eq "") && ($Unit3LeaseStatus eq "X" || $Unit3LeaseStatus eq "-" || $Unit3LeaseStatus eq "")) {

$Unit3Header = "&nbsp;";
}
else {
$Unit3Header = "Unit \#3";
}

if ($Unit3LivingRoom eq "X" || $Unit3LivingRoom eq "\-" || $Unit3LivingRoom eq "") {
$cUnit3LivingRoom = "";
}
else {
$cUnit3LivingRoom = "Living Room <b>$Unit3LivingRoom</b><br>";
}


if ($Unit3DiningRoom eq "X" || $Unit3DiningRoom eq "\-" || $Unit3DiningRoom eq "") {
$cUnit3DiningRoom = "";
}
else {
$cUnit3DiningRoom = "Dining Room <b>$Unit3DiningRoom</b><br>";
}


if ($Unit3Kitchen eq "X" || $Unit3Kitchen eq "\-" || $Unit3Kitchen eq "") {
$cUnit3Kitchen = "";
}
else {
$cUnit3Kitchen = "Kitchen <b>$Unit3Kitchen</b><br>";
}


if ($Unit3MasterBedroom eq "X" || $Unit3MasterBedroom eq "\-" || $Unit3MasterBedroom eq "") {
$cUnit3MasterBedroom = "";
}
else {
$cUnit3MasterBedroom = "Master Bedroom <b>$Unit3MasterBedroom</b><br>";
}

if ($Unit3Bedroom2 eq "X" || $Unit3Bedroom2 eq "\-" || $Unit3Bedroom2 eq "") {
$cUnit3Bedroom2 = "";
}
else {
$cUnit3Bedroom2 = "Bedroom 2 <b>$Unit3Bedroom2</b><br>";
}

if ($Unit3Bath eq "X" || $Unit3Bath eq "\-" || $Unit3Bath eq "") {
$cUnit3Bath = "";
}
else {
$cUnit3Bath = "Bathroom <b>$Unit3Bath</b><br>";
}

if ($Unit3UtilityRoom eq "X" || $Unit3UtilityRoom eq "\-" || $Unit3UtilityRoom eq "") {
$cUnit3UtilityRoom = "";
}
else {
$cUnit3UtilityRoom = "Utility Room <b>$Unit3UtilityRoom</b><br>";
}

if ($Unit3OtherRoom eq "X" || $Unit3OtherRoom eq "\-" || $Unit3OtherRoom eq "") {
$cUnit3OtherRoom = "";
}
else {
$cUnit3OtherRoom = "Other Room 1 <b>$Unit3OtherRoom</b><br>";
}

if ($Unit3Range eq "X" || $Unit3Range eq "\-" || $Unit3Range eq "") {
$cUnit3Range = "";
}
else {
$cUnit3Range = "Range <b>$Unit3Range</b><br>";
}

if ($Unit3Refrigerator eq "X" || $Unit3Refrigerator eq "\-" || $Unit3Refrigerator eq "") {
$cUnit3Refrigerator = "";
}
else {
$cUnit3Refrigerator = "Refrigerator <b>$Unit3Refrigerator</b><br>";
}

if ($Unit3Dishwasher eq "X" || $Unit3Dishwasher eq "\-" || $Unit3Dishwasher eq "") {
$cUnit3Dishwasher = "";
}
else {
$cUnit3Dishwasher = "Dishwasher <b>$Unit3Dishwasher</b><br>";
}

if ($Unit3GarbageDisposal eq "X" || $Unit3GarbageDisposal eq "\-" || $Unit3GarbageDisposal eq "") {
$cUnit3GarbageDisposal = "";
}
else {
$cUnit3GarbageDisposal = "Garbage Disposal <b>$Unit3GarbageDisposal</b><br>";
}

if ($Unit3WaterHeater eq "X" || $Unit3WaterHeater eq "\-" || $Unit3WaterHeater eq "") {
$cUnit3WaterHeater = "";
}
else {
$cUnit3WaterHeater = "Water Heater <b>$Unit3WaterHeater</b><br>";
}

if ($Unit3Furnace eq "X" || $Unit3Furnace eq "\-" || $Unit3Furnace eq "") {
$cUnit3Furnace = "";
}
else {
$cUnit3Furnace = "Furnace <b>$Unit3Furnace</b><br>";
}

if ($Unit3Parking eq "X" || $Unit3Parking eq "\-" || $Unit3Parking eq "") {
$cUnit3Parking = "";
}
else {
$cUnit3Parking = "Parking <b>$Unit3Parking</b><br>";
}

if ($Unit3MonthlyRent eq "X" || $Unit3MonthlyRent eq "\-" || $Unit3MonthlyRent eq "") {
$cUnit3MonthlyRent = "";
}
else {
$cUnit3MonthlyRent = "Monthly Rent <b>\$$Unit3MonthlyRent</b><br>";
}

if ($Unit3LeaseStatus eq "X" || $Unit3LeaseStatus eq "\-" || $Unit3LeaseStatus eq "") {
$cUnit3LeaseStatus = "";
}
elsif ($Unit3LeaseStatus eq "M/M") {
$cUnit3LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit3LeaseStatus = "Lease Status <b>$Unit3LeaseStatus</b><br>";
}

if (($Unit4LivingRoom eq "X" || $Unit4LivingRoom eq "-" || $Unit4LivingRoom eq "") && ($Unit4DiningRoom eq "X" || $Unit4DiningRoom eq "-" || $Unit4DiningRoom eq "") && ($Unit4Kitchen eq "X" || $Unit4Kitchen eq "-" || $Unit4Kitchen eq "") && ($Unit4MasterBedroom eq "X" || $Unit4MasterBedroom eq "-" || $Unit4MasterBedroom eq "") && ($Unit4Bedroom2 eq "X" || $Unit4Bedroom2 eq "-" || $Unit4Bedroom2 eq "") && ($Unit4Bath eq "X" || $Unit4Bath eq "-" || $Unit4Bath eq "") && ($Unit4UtilityRoom eq "X" || $Unit4UtilityRoom eq "-" || $Unit4UtilityRoom eq "") && ($Unit4OtherRoom eq "X" || $Unit4OtherRoom eq "-" || $Unit4OtherRoom eq "") && ($Unit4Range eq "X" || $Unit4Range eq "-" || $Unit4Range eq "") && ($Unit4Refrigerator eq "X" || $Unit4Refrigerator eq "-" || $Unit4Refrigerator eq "") && ($Unit4Dishwasher eq "X" || $Unit4Dishwasher eq "-" || $Unit4Dishwasher eq "") && ($Unit4GarbageDisposal eq "X" || $Unit4GarbageDisposal eq "-" || $Unit4GarbageDisposal eq "") && ($Unit4WaterHeater eq "X" || $Unit4WaterHeater eq "-" || $Unit4WaterHeater eq "") && ($Unit4Furnace eq "X" || $Unit4Furnace eq "-" || $Unit4Furnace eq "") && ($Unit4Parking eq "X" || $Unit4Parking eq "-" || $Unit4Parking eq "") && ($Unit4MonthlyRent eq "X" || $Unit4MonthlyRent eq "-" || $Unit4MonthlyRent eq "") && ($Unit4LeaseStatus eq "X" || $Unit4LeaseStatus eq "-" || $Unit4LeaseStatus eq "")) {

$Unit4Header = "&nbsp;";
}
else {
$Unit4Header = "Unit \#4";
}

if ($Unit4LivingRoom eq "X" || $Unit4LivingRoom eq "\-" || $Unit4LivingRoom eq "") {
$cUnit4LivingRoom = "";
}
else {
$cUnit4LivingRoom = "Living Room <b>$Unit4LivingRoom</b><br>";
}


if ($Unit4DiningRoom eq "X" || $Unit4DiningRoom eq "\-" || $Unit4DiningRoom eq "") {
$cUnit4DiningRoom = "";
}
else {
$cUnit4DiningRoom = "Dining Room <b>$Unit4DiningRoom</b><br>";
}


if ($Unit4Kitchen eq "X" || $Unit4Kitchen eq "\-" || $Unit4Kitchen eq "") {
$cUnit4Kitchen = "";
}
else {
$cUnit4Kitchen = "Kitchen <b>$Unit4Kitchen</b><br>";
}


if ($Unit4MasterBedroom eq "X" || $Unit4MasterBedroom eq "\-" || $Unit4MasterBedroom eq "") {
$cUnit4MasterBedroom = "";
}
else {
$cUnit4MasterBedroom = "Master Bedroom <b>$Unit4MasterBedroom</b><br>";
}

if ($Unit4Bedroom2 eq "X" || $Unit4Bedroom2 eq "\-" || $Unit4Bedroom2 eq "") {
$cUnit4Bedroom2 = "";
}
else {
$cUnit4Bedroom2 = "Bedroom 2 <b>$Unit4Bedroom2</b><br>";
}

if ($Unit4Bath eq "X" || $Unit4Bath eq "\-" || $Unit4Bath eq "") {
$cUnit4Bath = "";
}
else {
$cUnit4Bath = "Bathroom <b>$Unit4Bath</b><br>";
}

if ($Unit4UtilityRoom eq "X" || $Unit4UtilityRoom eq "\-" || $Unit4UtilityRoom eq "") {
$cUnit4UtilityRoom = "";
}
else {
$cUnit4UtilityRoom = "Utility Room <b>$Unit4UtilityRoom</b><br>";
}

if ($Unit4OtherRoom eq "X" || $Unit4OtherRoom eq "\-" || $Unit4OtherRoom eq "") {
$cUnit4OtherRoom = "";
}
else {
$cUnit4OtherRoom = "Other Room 1 <b>$Unit4OtherRoom</b><br>";
}

if ($Unit4Range eq "X" || $Unit4Range eq "\-" || $Unit4Range eq "") {
$cUnit4Range = "";
}
else {
$cUnit4Range = "Range <b>$Unit4Range</b><br>";
}

if ($Unit4Refrigerator eq "X" || $Unit4Refrigerator eq "\-" || $Unit4Refrigerator eq "") {
$cUnit4Refrigerator = "";
}
else {
$cUnit4Refrigerator = "Refrigerator <b>$Unit4Refrigerator</b><br>";
}

if ($Unit4Dishwasher eq "X" || $Unit4Dishwasher eq "\-" || $Unit4Dishwasher eq "") {
$cUnit4Dishwasher = "";
}
else {
$cUnit4Dishwasher = "Dishwasher <b>$Unit4Dishwasher</b><br>";
}

if ($Unit4GarbageDisposal eq "X" || $Unit4GarbageDisposal eq "\-" || $Unit4GarbageDisposal eq "") {
$cUnit4GarbageDisposal = "";
}
else {
$cUnit4GarbageDisposal = "Garbage Disposal <b>$Unit4GarbageDisposal</b><br>";
}

if ($Unit4WaterHeater eq "X" || $Unit4WaterHeater eq "\-" || $Unit4WaterHeater eq "") {
$cUnit4WaterHeater = "";
}
else {
$cUnit4WaterHeater = "Water Heater <b>$Unit4WaterHeater</b><br>";
}

if ($Unit4Furnace eq "X" || $Unit4Furnace eq "\-" || $Unit4Furnace eq "") {
$cUnit4Furnace = "";
}
else {
$cUnit4Furnace = "Furnace <b>$Unit4Furnace</b><br>";
}

if ($Unit4Parking eq "X" || $Unit4Parking eq "\-" || $Unit4Parking eq "") {
$cUnit4Parking = "";
}
else {
$cUnit4Parking = "Parking <b>$Unit4Parking</b><br>";
}

if ($Unit4MonthlyRent eq "X" || $Unit4MonthlyRent eq "\-" || $Unit4MonthlyRent eq "") {
$cUnit4MonthlyRent = "";
}
else {
$cUnit4MonthlyRent = "Monthly Rent <b>\$$Unit4MonthlyRent</b><br>";
}

if ($Unit4LeaseStatus eq "X" || $Unit4LeaseStatus eq "\-" || $Unit4LeaseStatus eq "") {
$cUnit4LeaseStatus = "";
}
elsif ($Unit4LeaseStatus eq "M/M") {
$cUnit4LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit4LeaseStatus = "Lease Status <b>$Unit4LeaseStatus</b><br>";
}

if (($Unit5LivingRoom eq "X" || $Unit5LivingRoom eq "-" || $Unit5LivingRoom eq "") && ($Unit5DiningRoom eq "X" || $Unit5DiningRoom eq "-" || $Unit5DiningRoom eq "") && ($Unit5Kitchen eq "X" || $Unit5Kitchen eq "-" || $Unit5Kitchen eq "") && ($Unit5MasterBedroom eq "X" || $Unit5MasterBedroom eq "-" || $Unit5MasterBedroom eq "") && ($Unit5Bedroom2 eq "X" || $Unit5Bedroom2 eq "-" || $Unit5Bedroom2 eq "") && ($Unit5Bath eq "X" || $Unit5Bath eq "-" || $Unit5Bath eq "") && ($Unit5UtilityRoom eq "X" || $Unit5UtilityRoom eq "-" || $Unit5UtilityRoom eq "") && ($Unit5OtherRoom eq "X" || $Unit5OtherRoom eq "-" || $Unit5OtherRoom eq "") && ($Unit5Range eq "X" || $Unit5Range eq "-" || $Unit5Range eq "") && ($Unit5Refrigerator eq "X" || $Unit5Refrigerator eq "-" || $Unit5Refrigerator eq "") && ($Unit5Dishwasher eq "X" || $Unit5Dishwasher eq "-" || $Unit5Dishwasher eq "") && ($Unit5GarbageDisposal eq "X" || $Unit5GarbageDisposal eq "-" || $Unit5GarbageDisposal eq "") && ($Unit5WaterHeater eq "X" || $Unit5WaterHeater eq "-" || $Unit5WaterHeater eq "") && ($Unit5Furnace eq "X" || $Unit5Furnace eq "-" || $Unit5Furnace eq "") && ($Unit5Parking eq "X" || $Unit5Parking eq "-" || $Unit5Parking eq "") && ($Unit5MonthlyRent eq "X" || $Unit5MonthlyRent eq "-" || $Unit5MonthlyRent eq "") && ($Unit5LeaseStatus eq "X" || $Unit5LeaseStatus eq "-" || $Unit5LeaseStatus eq "")) {

$Unit5Header = "&nbsp;";
}
else {
$Unit5Header = "Unit \#5";
}

if ($Unit5LivingRoom eq "X" || $Unit5LivingRoom eq "\-" || $Unit5LivingRoom eq "") {
$cUnit5LivingRoom = "";
}
else {
$cUnit5LivingRoom = "Living Room <b>$Unit5LivingRoom</b><br>";
}


if ($Unit5DiningRoom eq "X" || $Unit5DiningRoom eq "\-" || $Unit5DiningRoom eq "") {
$cUnit5DiningRoom = "";
}
else {
$cUnit5DiningRoom = "Dining Room <b>$Unit5DiningRoom</b><br>";
}


if ($Unit5Kitchen eq "X" || $Unit5Kitchen eq "\-" || $Unit5Kitchen eq "") {
$cUnit5Kitchen = "";
}
else {
$cUnit5Kitchen = "Kitchen <b>$Unit5Kitchen</b><br>";
}


if ($Unit5MasterBedroom eq "X" || $Unit5MasterBedroom eq "\-" || $Unit5MasterBedroom eq "") {
$cUnit5MasterBedroom = "";
}
else {
$cUnit5MasterBedroom = "Master Bedroom <b>$Unit5MasterBedroom</b><br>";
}

if ($Unit5Bedroom2 eq "X" || $Unit5Bedroom2 eq "\-" || $Unit5Bedroom2 eq "") {
$cUnit5Bedroom2 = "";
}
else {
$cUnit5Bedroom2 = "Bedroom 2 <b>$Unit5Bedroom2</b><br>";
}

if ($Unit5Bath eq "X" || $Unit5Bath eq "\-" || $Unit5Bath eq "") {
$cUnit5Bath = "";
}
else {
$cUnit5Bath = "Bathroom <b>$Unit5Bath</b><br>";
}

if ($Unit5UtilityRoom eq "X" || $Unit5UtilityRoom eq "\-" || $Unit5UtilityRoom eq "") {
$cUnit5UtilityRoom = "";
}
else {
$cUnit5UtilityRoom = "Utility Room <b>$Unit5UtilityRoom</b><br>";
}

if ($Unit5OtherRoom eq "X" || $Unit5OtherRoom eq "\-" || $Unit5OtherRoom eq "") {
$cUnit5OtherRoom = "";
}
else {
$cUnit5OtherRoom = "Other Room 1 <b>$Unit5OtherRoom</b><br>";
}

if ($Unit5Range eq "X" || $Unit5Range eq "\-" || $Unit5Range eq "") {
$cUnit5Range = "";
}
else {
$cUnit5Range = "Range <b>$Unit5Range</b><br>";
}

if ($Unit5Refrigerator eq "X" || $Unit5Refrigerator eq "\-" || $Unit5Refrigerator eq "") {
$cUnit5Refrigerator = "";
}
else {
$cUnit5Refrigerator = "Refrigerator <b>$Unit5Refrigerator</b><br>";
}

if ($Unit5Dishwasher eq "X" || $Unit5Dishwasher eq "\-" || $Unit5Dishwasher eq "") {
$cUnit5Dishwasher = "";
}
else {
$cUnit5Dishwasher = "Dishwasher <b>$Unit5Dishwasher</b><br>";
}

if ($Unit5GarbageDisposal eq "X" || $Unit5GarbageDisposal eq "\-" || $Unit5GarbageDisposal eq "") {
$cUnit5GarbageDisposal = "";
}
else {
$cUnit5GarbageDisposal = "Garbage Disposal <b>$Unit5GarbageDisposal</b><br>";
}

if ($Unit5WaterHeater eq "X" || $Unit5WaterHeater eq "\-" || $Unit5WaterHeater eq "") {
$cUnit5WaterHeater = "";
}
else {
$cUnit5WaterHeater = "Water Heater <b>$Unit5WaterHeater</b><br>";
}

if ($Unit5Furnace eq "X" || $Unit5Furnace eq "\-" || $Unit5Furnace eq "") {
$cUnit5Furnace = "";
}
else {
$cUnit5Furnace = "Furnace <b>$Unit5Furnace</b><br>";
}

if ($Unit5Parking eq "X" || $Unit5Parking eq "\-" || $Unit5Parking eq "") {
$cUnit5Parking = "";
}
else {
$cUnit5Parking = "Parking <b>$Unit5Parking</b><br>";
}

if ($Unit5MonthlyRent eq "X" || $Unit5MonthlyRent eq "\-" || $Unit5MonthlyRent eq "") {
$cUnit5MonthlyRent = "";
}
else {
$cUnit5MonthlyRent = "Monthly Rent <b>\$$Unit5MonthlyRent</b><br>";
}

if ($Unit5LeaseStatus eq "X" || $Unit5LeaseStatus eq "\-" || $Unit5LeaseStatus eq "") {
$cUnit5LeaseStatus = "";
}
elsif ($Unit5LeaseStatus eq "M/M") {
$cUnit5LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit5LeaseStatus = "Lease Status <b>$Unit5LeaseStatus</b><br>";
}

if (($Unit6LivingRoom eq "X" || $Unit6LivingRoom eq "-" || $Unit6LivingRoom eq "") && ($Unit6DiningRoom eq "X" || $Unit6DiningRoom eq "-" || $Unit6DiningRoom eq "") && ($Unit6Kitchen eq "X" || $Unit6Kitchen eq "-" || $Unit6Kitchen eq "") && ($Unit6MasterBedroom eq "X" || $Unit6MasterBedroom eq "-" || $Unit6MasterBedroom eq "") && ($Unit6Bedroom2 eq "X" || $Unit6Bedroom2 eq "-" || $Unit6Bedroom2 eq "") && ($Unit6Bath eq "X" || $Unit6Bath eq "-" || $Unit6Bath eq "") && ($Unit6UtilityRoom eq "X" || $Unit6UtilityRoom eq "-" || $Unit6UtilityRoom eq "") && ($Unit6OtherRoom eq "X" || $Unit6OtherRoom eq "-" || $Unit6OtherRoom eq "") && ($Unit6Range eq "X" || $Unit6Range eq "-" || $Unit6Range eq "") && ($Unit6Refrigerator eq "X" || $Unit6Refrigerator eq "-" || $Unit6Refrigerator eq "") && ($Unit6Dishwasher eq "X" || $Unit6Dishwasher eq "-" || $Unit6Dishwasher eq "") && ($Unit6GarbageDisposal eq "X" || $Unit6GarbageDisposal eq "-" || $Unit6GarbageDisposal eq "") && ($Unit6WaterHeater eq "X" || $Unit6WaterHeater eq "-" || $Unit6WaterHeater eq "") && ($Unit6Furnace eq "X" || $Unit6Furnace eq "-" || $Unit6Furnace eq "") && ($Unit6Parking eq "X" || $Unit6Parking eq "-" || $Unit6Parking eq "") && ($Unit6MonthlyRent eq "X" || $Unit6MonthlyRent eq "-" || $Unit6MonthlyRent eq "") && ($Unit6LeaseStatus eq "X" || $Unit6LeaseStatus eq "-" || $Unit6LeaseStatus eq "")) {

$Unit6Header = "&nbsp;";
}
else {
$Unit6Header = "Unit \#6";
}

if ($Unit6LivingRoom eq "X" || $Unit6LivingRoom eq "\-" || $Unit6LivingRoom eq "") {
$cUnit6LivingRoom = "";
}
else {
$cUnit6LivingRoom = "Living Room <b>$Unit6LivingRoom</b><br>";
}


if ($Unit6DiningRoom eq "X" || $Unit6DiningRoom eq "\-" || $Unit6DiningRoom eq "") {
$cUnit6DiningRoom = "";
}
else {
$cUnit6DiningRoom = "Dining Room <b>$Unit6DiningRoom</b><br>";
}


if ($Unit6Kitchen eq "X" || $Unit6Kitchen eq "\-" || $Unit6Kitchen eq "") {
$cUnit6Kitchen = "";
}
else {
$cUnit6Kitchen = "Kitchen <b>$Unit6Kitchen</b><br>";
}


if ($Unit6MasterBedroom eq "X" || $Unit6MasterBedroom eq "\-" || $Unit6MasterBedroom eq "") {
$cUnit6MasterBedroom = "";
}
else {
$cUnit6MasterBedroom = "Master Bedroom <b>$Unit6MasterBedroom</b><br>";
}

if ($Unit6Bedroom2 eq "X" || $Unit6Bedroom2 eq "\-" || $Unit6Bedroom2 eq "") {
$cUnit6Bedroom2 = "";
}
else {
$cUnit6Bedroom2 = "Bedroom 2 <b>$Unit6Bedroom2</b><br>";
}

if ($Unit6Bath eq "X" || $Unit6Bath eq "\-" || $Unit6Bath eq "") {
$cUnit6Bath = "";
}
else {
$cUnit6Bath = "Bathroom <b>$Unit6Bath</b><br>";
}

if ($Unit6UtilityRoom eq "X" || $Unit6UtilityRoom eq "\-" || $Unit6UtilityRoom eq "") {
$cUnit6UtilityRoom = "";
}
else {
$cUnit6UtilityRoom = "Utility Room <b>$Unit6UtilityRoom</b><br>";
}

if ($Unit6OtherRoom eq "X" || $Unit6OtherRoom eq "\-" || $Unit6OtherRoom eq "") {
$cUnit6OtherRoom = "";
}
else {
$cUnit6OtherRoom = "Other Room 1 <b>$Unit6OtherRoom</b><br>";
}

if ($Unit6Range eq "X" || $Unit6Range eq "\-" || $Unit6Range eq "") {
$cUnit6Range = "";
}
else {
$cUnit6Range = "Range <b>$Unit6Range</b><br>";
}

if ($Unit6Refrigerator eq "X" || $Unit6Refrigerator eq "\-" || $Unit6Refrigerator eq "") {
$cUnit6Refrigerator = "";
}
else {
$cUnit6Refrigerator = "Refrigerator <b>$Unit6Refrigerator</b><br>";
}

if ($Unit6Dishwasher eq "X" || $Unit6Dishwasher eq "\-" || $Unit6Dishwasher eq "") {
$cUnit6Dishwasher = "";
}
else {
$cUnit6Dishwasher = "Dishwasher <b>$Unit6Dishwasher</b><br>";
}

if ($Unit6GarbageDisposal eq "X" || $Unit6GarbageDisposal eq "\-" || $Unit6GarbageDisposal eq "") {
$cUnit6GarbageDisposal = "";
}
else {
$cUnit6GarbageDisposal = "Garbage Disposal <b>$Unit6GarbageDisposal</b><br>";
}

if ($Unit6WaterHeater eq "X" || $Unit6WaterHeater eq "\-" || $Unit6WaterHeater eq "") {
$cUnit6WaterHeater = "";
}
else {
$cUnit6WaterHeater = "Water Heater <b>$Unit6WaterHeater</b><br>";
}

if ($Unit6Furnace eq "X" || $Unit6Furnace eq "\-" || $Unit6Furnace eq "") {
$cUnit6Furnace = "";
}
else {
$cUnit6Furnace = "Furnace <b>$Unit6Furnace</b><br>";
}

if ($Unit6Parking eq "X" || $Unit6Parking eq "\-" || $Unit6Parking eq "") {
$cUnit6Parking = "";
}
else {
$cUnit6Parking = "Parking <b>$Unit6Parking</b><br>";
}

if ($Unit6MonthlyRent eq "X" || $Unit6MonthlyRent eq "\-" || $Unit6MonthlyRent eq "") {
$cUnit6MonthlyRent = "";
}
else {
$cUnit6MonthlyRent = "Monthly Rent <b>\$$Unit6MonthlyRent</b><br>";
}

if ($Unit6LeaseStatus eq "X" || $Unit6LeaseStatus eq "\-" || $Unit6LeaseStatus eq "") {
$cUnit6LeaseStatus = "";
}
elsif ($Unit6LeaseStatus eq "M/M") {
$cUnit6LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit6LeaseStatus = "Lease Status <b>$Unit6LeaseStatus</b><br>";
}

if (($Unit7LivingRoom eq "X" || $Unit7LivingRoom eq "-" || $Unit7LivingRoom eq "") && ($Unit7DiningRoom eq "X" || $Unit7DiningRoom eq "-" || $Unit7DiningRoom eq "") && ($Unit7Kitchen eq "X" || $Unit7Kitchen eq "-" || $Unit7Kitchen eq "") && ($Unit7MasterBedroom eq "X" || $Unit7MasterBedroom eq "-" || $Unit7MasterBedroom eq "") && ($Unit7Bedroom2 eq "X" || $Unit7Bedroom2 eq "-" || $Unit7Bedroom2 eq "") && ($Unit7Bath eq "X" || $Unit7Bath eq "-" || $Unit7Bath eq "") && ($Unit7UtilityRoom eq "X" || $Unit7UtilityRoom eq "-" || $Unit7UtilityRoom eq "") && ($Unit7OtherRoom eq "X" || $Unit7OtherRoom eq "-" || $Unit7OtherRoom eq "") && ($Unit7Range eq "X" || $Unit7Range eq "-" || $Unit7Range eq "") && ($Unit7Refrigerator eq "X" || $Unit7Refrigerator eq "-" || $Unit7Refrigerator eq "") && ($Unit7Dishwasher eq "X" || $Unit7Dishwasher eq "-" || $Unit7Dishwasher eq "") && ($Unit7GarbageDisposal eq "X" || $Unit7GarbageDisposal eq "-" || $Unit7GarbageDisposal eq "") && ($Unit7WaterHeater eq "X" || $Unit7WaterHeater eq "-" || $Unit7WaterHeater eq "") && ($Unit7Furnace eq "X" || $Unit7Furnace eq "-" || $Unit7Furnace eq "") && ($Unit7Parking eq "X" || $Unit7Parking eq "-" || $Unit7Parking eq "") && ($Unit7MonthlyRent eq "X" || $Unit7MonthlyRent eq "-" || $Unit7MonthlyRent eq "") && ($Unit7LeaseStatus eq "X" || $Unit7LeaseStatus eq "-" || $Unit7LeaseStatus eq "")) {

$Unit7Header = "&nbsp;";
}
else {
$Unit7Header = "Unit \#7";
}

if ($Unit7LivingRoom eq "X" || $Unit7LivingRoom eq "\-" || $Unit7LivingRoom eq "") {
$cUnit7LivingRoom = "";
}
else {
$cUnit7LivingRoom = "Living Room <b>$Unit7LivingRoom</b><br>";
}


if ($Unit7DiningRoom eq "X" || $Unit7DiningRoom eq "\-" || $Unit7DiningRoom eq "") {
$cUnit7DiningRoom = "";
}
else {
$cUnit7DiningRoom = "Dining Room <b>$Unit7DiningRoom</b><br>";
}


if ($Unit7Kitchen eq "X" || $Unit7Kitchen eq "\-" || $Unit7Kitchen eq "") {
$cUnit7Kitchen = "";
}
else {
$cUnit7Kitchen = "Kitchen <b>$Unit7Kitchen</b><br>";
}


if ($Unit7MasterBedroom eq "X" || $Unit7MasterBedroom eq "\-" || $Unit7MasterBedroom eq "") {
$cUnit7MasterBedroom = "";
}
else {
$cUnit7MasterBedroom = "Master Bedroom <b>$Unit7MasterBedroom</b><br>";
}

if ($Unit7Bedroom2 eq "X" || $Unit7Bedroom2 eq "\-" || $Unit7Bedroom2 eq "") {
$cUnit7Bedroom2 = "";
}
else {
$cUnit7Bedroom2 = "Bedroom 2 <b>$Unit7Bedroom2</b><br>";
}

if ($Unit7Bath eq "X" || $Unit7Bath eq "\-" || $Unit7Bath eq "") {
$cUnit7Bath = "";
}
else {
$cUnit7Bath = "Bathroom <b>$Unit7Bath</b><br>";
}

if ($Unit7UtilityRoom eq "X" || $Unit7UtilityRoom eq "\-" || $Unit7UtilityRoom eq "") {
$cUnit7UtilityRoom = "";
}
else {
$cUnit7UtilityRoom = "Utility Room <b>$Unit7UtilityRoom</b><br>";
}

if ($Unit7OtherRoom eq "X" || $Unit7OtherRoom eq "\-" || $Unit7OtherRoom eq "") {
$cUnit7OtherRoom = "";
}
else {
$cUnit7OtherRoom = "Other Room 1 <b>$Unit7OtherRoom</b><br>";
}

if ($Unit7Range eq "X" || $Unit7Range eq "\-" || $Unit7Range eq "") {
$cUnit7Range = "";
}
else {
$cUnit7Range = "Range <b>$Unit7Range</b><br>";
}

if ($Unit7Refrigerator eq "X" || $Unit7Refrigerator eq "\-" || $Unit7Refrigerator eq "") {
$cUnit7Refrigerator = "";
}
else {
$cUnit7Refrigerator = "Refrigerator <b>$Unit7Refrigerator</b><br>";
}

if ($Unit7Dishwasher eq "X" || $Unit7Dishwasher eq "\-" || $Unit7Dishwasher eq "") {
$cUnit7Dishwasher = "";
}
else {
$cUnit7Dishwasher = "Dishwasher <b>$Unit7Dishwasher</b><br>";
}

if ($Unit7GarbageDisposal eq "X" || $Unit7GarbageDisposal eq "\-" || $Unit7GarbageDisposal eq "") {
$cUnit7GarbageDisposal = "";
}
else {
$cUnit7GarbageDisposal = "Garbage Disposal <b>$Unit7GarbageDisposal</b><br>";
}

if ($Unit7WaterHeater eq "X" || $Unit7WaterHeater eq "\-" || $Unit7WaterHeater eq "") {
$cUnit7WaterHeater = "";
}
else {
$cUnit7WaterHeater = "Water Heater <b>$Unit7WaterHeater</b><br>";
}

if ($Unit7Furnace eq "X" || $Unit7Furnace eq "\-" || $Unit7Furnace eq "") {
$cUnit7Furnace = "";
}
else {
$cUnit7Furnace = "Furnace <b>$Unit7Furnace</b><br>";
}

if ($Unit7Parking eq "X" || $Unit7Parking eq "\-" || $Unit7Parking eq "") {
$cUnit7Parking = "";
}
else {
$cUnit7Parking = "Parking <b>$Unit7Parking</b><br>";
}

if ($Unit7MonthlyRent eq "X" || $Unit7MonthlyRent eq "\-" || $Unit7MonthlyRent eq "") {
$cUnit7MonthlyRent = "";
}
else {
$cUnit7MonthlyRent = "Monthly Rent <b>\$$Unit7MonthlyRent</b><br>";
}

if ($Unit7LeaseStatus eq "X" || $Unit7LeaseStatus eq "\-" || $Unit7LeaseStatus eq "") {
$cUnit7LeaseStatus = "";
}
elsif ($Unit7LeaseStatus eq "M/M") {
$cUnit7LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit7LeaseStatus = "Lease Status <b>$Unit7LeaseStatus</b><br>";
}

if (($Unit8LivingRoom eq "X" || $Unit8LivingRoom eq "-" || $Unit8LivingRoom eq "") && ($Unit8DiningRoom eq "X" || $Unit8DiningRoom eq "-" || $Unit8DiningRoom eq "") && ($Unit8Kitchen eq "X" || $Unit8Kitchen eq "-" || $Unit8Kitchen eq "") && ($Unit8MasterBedroom eq "X" || $Unit8MasterBedroom eq "-" || $Unit8MasterBedroom eq "") && ($Unit8Bedroom2 eq "X" || $Unit8Bedroom2 eq "-" || $Unit8Bedroom2 eq "") && ($Unit8Bath eq "X" || $Unit8Bath eq "-" || $Unit8Bath eq "") && ($Unit8UtilityRoom eq "X" || $Unit8UtilityRoom eq "-" || $Unit8UtilityRoom eq "") && ($Unit8OtherRoom eq "X" || $Unit8OtherRoom eq "-" || $Unit8OtherRoom eq "") && ($Unit8Range eq "X" || $Unit8Range eq "-" || $Unit8Range eq "") && ($Unit8Refrigerator eq "X" || $Unit8Refrigerator eq "-" || $Unit8Refrigerator eq "") && ($Unit8Dishwasher eq "X" || $Unit8Dishwasher eq "-" || $Unit8Dishwasher eq "") && ($Unit8GarbageDisposal eq "X" || $Unit8GarbageDisposal eq "-" || $Unit8GarbageDisposal eq "") && ($Unit8WaterHeater eq "X" || $Unit8WaterHeater eq "-" || $Unit8WaterHeater eq "") && ($Unit8Furnace eq "X" || $Unit8Furnace eq "-" || $Unit8Furnace eq "") && ($Unit8Parking eq "X" || $Unit8Parking eq "-" || $Unit8Parking eq "") && ($Unit8MonthlyRent eq "X" || $Unit8MonthlyRent eq "-" || $Unit8MonthlyRent eq "") && ($Unit8LeaseStatus eq "X" || $Unit8LeaseStatus eq "-" || $Unit8LeaseStatus eq "")) {

$Unit8Header = "&nbsp;";
}
else {
$Unit8Header = "Unit \#8";
}

if ($Unit8LivingRoom eq "X" || $Unit8LivingRoom eq "\-" || $Unit8LivingRoom eq "") {
$cUnit8LivingRoom = "";
}
else {
$cUnit8LivingRoom = "Living Room <b>$Unit8LivingRoom</b><br>";
}


if ($Unit8DiningRoom eq "X" || $Unit8DiningRoom eq "\-" || $Unit8DiningRoom eq "") {
$cUnit8DiningRoom = "";
}
else {
$cUnit8DiningRoom = "Dining Room <b>$Unit8DiningRoom</b><br>";
}


if ($Unit8Kitchen eq "X" || $Unit8Kitchen eq "\-" || $Unit8Kitchen eq "") {
$cUnit8Kitchen = "";
}
else {
$cUnit8Kitchen = "Kitchen <b>$Unit8Kitchen</b><br>";
}


if ($Unit8MasterBedroom eq "X" || $Unit8MasterBedroom eq "\-" || $Unit8MasterBedroom eq "") {
$cUnit8MasterBedroom = "";
}
else {
$cUnit8MasterBedroom = "Master Bedroom <b>$Unit8MasterBedroom</b><br>";
}

if ($Unit8Bedroom2 eq "X" || $Unit8Bedroom2 eq "\-" || $Unit8Bedroom2 eq "") {
$cUnit8Bedroom2 = "";
}
else {
$cUnit8Bedroom2 = "Bedroom 2 <b>$Unit8Bedroom2</b><br>";
}

if ($Unit8Bath eq "X" || $Unit8Bath eq "\-" || $Unit8Bath eq "") {
$cUnit8Bath = "";
}
else {
$cUnit8Bath = "Bathroom <b>$Unit8Bath</b><br>";
}

if ($Unit8UtilityRoom eq "X" || $Unit8UtilityRoom eq "\-" || $Unit8UtilityRoom eq "") {
$cUnit8UtilityRoom = "";
}
else {
$cUnit8UtilityRoom = "Utility Room <b>$Unit8UtilityRoom</b><br>";
}

if ($Unit8OtherRoom eq "X" || $Unit8OtherRoom eq "\-" || $Unit8OtherRoom eq "") {
$cUnit8OtherRoom = "";
}
else {
$cUnit8OtherRoom = "Other Room 1 <b>$Unit8OtherRoom</b><br>";
}

if ($Unit8Range eq "X" || $Unit8Range eq "\-" || $Unit8Range eq "") {
$cUnit8Range = "";
}
else {
$cUnit8Range = "Range <b>$Unit8Range</b><br>";
}

if ($Unit8Refrigerator eq "X" || $Unit8Refrigerator eq "\-" || $Unit8Refrigerator eq "") {
$cUnit8Refrigerator = "";
}
else {
$cUnit8Refrigerator = "Refrigerator <b>$Unit8Refrigerator</b><br>";
}

if ($Unit8Dishwasher eq "X" || $Unit8Dishwasher eq "\-" || $Unit8Dishwasher eq "") {
$cUnit8Dishwasher = "";
}
else {
$cUnit8Dishwasher = "Dishwasher <b>$Unit8Dishwasher</b><br>";
}

if ($Unit8GarbageDisposal eq "X" || $Unit8GarbageDisposal eq "\-" || $Unit8GarbageDisposal eq "") {
$cUnit8GarbageDisposal = "";
}
else {
$cUnit8GarbageDisposal = "Garbage Disposal <b>$Unit8GarbageDisposal</b><br>";
}

if ($Unit8WaterHeater eq "X" || $Unit8WaterHeater eq "\-" || $Unit8WaterHeater eq "") {
$cUnit8WaterHeater = "";
}
else {
$cUnit8WaterHeater = "Water Heater <b>$Unit8WaterHeater</b><br>";
}

if ($Unit8Furnace eq "X" || $Unit8Furnace eq "\-" || $Unit8Furnace eq "") {
$cUnit8Furnace = "";
}
else {
$cUnit8Furnace = "Furnace <b>$Unit8Furnace</b><br>";
}

if ($Unit8Parking eq "X" || $Unit8Parking eq "\-" || $Unit8Parking eq "") {
$cUnit8Parking = "";
}
else {
$cUnit8Parking = "Parking <b>$Unit8Parking</b><br>";
}

if ($Unit8MonthlyRent eq "X" || $Unit8MonthlyRent eq "\-" || $Unit8MonthlyRent eq "") {
$cUnit8MonthlyRent = "";
}
else {
$cUnit8MonthlyRent = "Monthly Rent <b>\$$Unit8MonthlyRent</b><br>";
}

if ($Unit8LeaseStatus eq "X" || $Unit8LeaseStatus eq "\-" || $Unit8LeaseStatus eq "") {
$cUnit8LeaseStatus = "";
}
elsif ($Unit8LeaseStatus eq "M/M") {
$cUnit8LeaseStatus = "Lease Status <b>Month To Month</b><br>";
}
else {
$cUnit8LeaseStatus = "Lease Status <b>$Unit8LeaseStatus</b><br>";
}

$LandValue = &commas($LandValue);
$ImproveValue = &commas($ImproveValue);



&pull_photo_data_for_property_details_page($MLSNUM,4);  # routine at the bottom of config.idx


if ($totalpictures > 1) {
$showgallery = "<font face=\"Arial, Helvetica, sans-serif\"><font size=\"3\">photo<b>gallery</b></font></font><br><img src=\"images/line_spacer.gif\" height=\"3\" width=\"1\"><br><table border=\"0\" cellpadding=\"0\" cellspacing=\"1\"><tr>$showthumbs</tr></table><br>";
}
else {
$showgallery = "";
}


if ($INPUT{gate} eq "email") {
$checksave = "";
}
else {
$checksave = "<a href=\"javascript:save=window.open('save.idx?mlsnumber=$MLSNUM&type=inv','save','width=320, height=325, scrollbars=no'); save.focus();\"><img src=\"images/actions/savethishome.gif\" border=0></a><br>";
}


print <<"STARTOFTHEPAGE";

<html><head><title>MuncieMLS.com</title>
<script Language="JavaScript">
testurl = new Array($bigcount);

$buildscript



			function showupdate(photoIndex, photoDisplayType)
			{
			document['picture'].src = testurl[photoIndex];
			
			return;
			}
			
</script>



STARTOFTHEPAGE

&header;



print <<"STARTPAGECONTENT";
<td valign="top" width="581">
<table border="0" cellpadding="0" cellspacing="0" width="581">
<tr>
<td colspan="2">
<img src="images/headers/investmentproperty_details.gif" height="33" width="581" alt="Investment Property Details"><Br>
</td>
</tr>
<td valign="top">&nbsp;</td>
<td valign="top" align="right">
<img src="images/line_spacer.gif" alt="" width="4" height="1">$showresultsback <br><br>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="581">
<tr>
<td width="341" valign="top">
<table border="0" cellpadding="6" cellspacing="0" width="341">
<tr>
<td width="335" valign="top">
	<img src="$showpicture" name=picture><br>
<img src="images/line_spacer.gif" height="3" width="1"><br>
<center>
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td colspan="3" valign="top">
<font face="Arial, Helvetica, sans-serif"><font size="3">visitor<b>actions</b></font></font><br>
<img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/black_fill.gif" height="1" width="335"><br>
<img src="images/line_spacer.gif" height="1" width="1"><br>
</td>
</tr>
<tr>
<td valign="top" width="150">
<center>
<a href="http://www.gettherightloan.com/loan.cgi"><img src="images/actions/applyforloan.gif" border=0></a><br>
<a href="javascript:email=window.open('email.idx?action=listingmain&mlsnumber=$MLSNUM&type=_investment','email','width=375, height=450, scrollbars=no'); email.focus();"><img src="images/actions/emailthishome.gif" border=0></a><br>
<a href="http://www.mapquest.com/maps/map.adp?country=US&address=$AddressNumber $AddressDirection $AddressStreet&city=$City&State=$State&zipcode=$Zip" target="_new"><img src="images/actions/mapproperty.gif" border="0"></a><br>
</center>
</td>
<td valign="top" width="150">
<center>
<a href="javascript:requestshowing=window.open('showing.idx?mls=$MLSNUM&address=$AddressNumber $AddressDirection $AddressStreet&city=$City&state=IN&zip=$Zip','requestshowing','width=465, height=540, scrollbars=yes'); requestshowing.focus();"><img src="images/actions/requestashowing.gif" border=0></a><br>
<a href="javascript:printversion=window.open('showdetails_investment_print.idx?mlsnumber=$MLSNUM','printversion','width=635, height=540, scrollbars=yes'); printversion.focus();"><img src="images/actions/printer.gif" border="0" alt="Printer Friendly Version"></a><br>
$checksave
</center>
</td>
</tr>
</table>
</center>
<img src="images/line_spacer.gif" height="5" width="1"><br>
<font face="Arial, Helvetica, sans-serif"><font size="3">property<b>remarks</b></font></font><br>
<img src="images/line_spacer.gif" height="3" width="1"><br>
<img src="images/black_fill.gif" height="1" width="335"><br>
<img src="images/line_spacer.gif" height="1" width="11">$Remarks-$Blank235 <br>
<img src="images/line_spacer.gif" height="3" width="1"><br>
<img src="images/line_spacer.gif" height="3" width="1"><br>
<img src="images/black_fill.gif" height="1" width="335"><br>
<img src="images/line_spacer.gif" height="3" width="1"><br>
<center>
<table border="0" cellpadding="0" cellspacing="0" width="335">
<tr>
<td valign="top" width="50%">
<img src=images/dot.gif>GarageCapacity <b>$GarageCapacity</b><Br>
<img src=images/dot.gif>CarportCapacity <b>$CarportCapacity</b><Br>
<img src=images/dot.gif>FloodPlane <b>$FloodPlain</b><Br>
<img src=images/dot.gif>Security Gate <b>$SecurityGate</b><Br>
</td>
<td valign="top" width="50%">
<img src=images/dot.gif>Irregular <b>$Irregular</b><br>
<img src=images/dot.gif>Land Value <b>\$$LandValue</b><br>
<img src=images/dot.gif>Improv. Value <b>\$$ImproveValue</b><br>
</td>
</tr>
</table>
</center>

</td>
</tr>
</table>
</td>
<td width="240" valign="top" bgcolor="#E2E2E2">
<table border="0" cellpadding="6" cellspacing="0" width="100%">
<tr>
<td valign="top">
<font face="Arial, Helvetica, sans-serif"><font size="4">property<b>overview</b></font></font><br>
$Type $Status $SaleRent<br>
$AddressNumber $AddressDirection $AddressStreet<br>
$Address2
$ShowCity{$City}, IN $Zip<br>
MLS <b>#$MLSNUM</b><br>
<font color="#990000"><b>\$$Price</b> / <b>\$$monthlypayment*</b> Monthly</font><br><a href="javascript:mortgagechange=window.open('mortgagechange.idx?price=$preprice&mlsnum=$MLSNUM&mortgagetax=$EstimatedAnnualTax','mortgagechange','width=384, height=385, scrollbars=yes'); mortgagechange.focus();">[Change Assumptions]</a><br>
<br>
$printoffice
<br>
<table border="0" cellpadding="3" cellspacing="1" border="1" bgcolor="navy">
<tr>
<td valign="top" bgcolor="navy"><font color="white"><b>Unique Listing Address</b></font></td>
</tr>
<td valign="top" bgcolor="#E2E2E2">
 <a href="http://$MLSNUM.MuncieMLS.com">http://$MLSNUM.MuncieMLS.com</a>
</td>
</tr>
</table>
<br>
$showgallery
<br>
<font face="Arial, Helvetica, sans-serif"><font size="3">property<b>details</b></font></font><br>
<img src="images/line_spacer.gif" height="3" width="1"><br>
<img src="images/dot.gif">Number Of Units <b>$NUMUnits</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">County <b>$County</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Township <b>$Township</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Area <b>$Area</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Subdivision <b>$Subdivision</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Acres <b>$Acres</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Year Built <b>$YRBuilt</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Square Feet <b>$TotalSqFt</b>&nbsp<a href="javascript:sqftdetails('sqdetails.idx?mlsnumber=$MLSNUM');">[Details]</a><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Elem. School <b>$ElementarySchool</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">Middle School <b>$MiddleSchool</b><br><img src="images/line_spacer.gif" height="1" width="1"><br>
<img src="images/dot.gif">High School <b>$HighSchool</b><br><img src=images/line_spacer.gif height=1 width=1><br>
<img src="images/dot.gif">Est. Annual Taxes <b>\$$EstimatedAnnualTax</b><img src="images/line_spacer.gif" height="1" width="1"><br>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="15">
<img src="images/dot.gif">
</td><td valign="top" width="100%">Directions: <b>$Directions&nbsp;$DirectionsContinued</b><br></td></tr></table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="581">
<tr>
<td valign="top" width="6"><img src="images/line_spacer.gif" height="1" width="6"><br></td>
<td valign="top" width="576">
<font face="Arial, Helvetica, sans-serif"><font size="3">unit<b>breakdown</b></font></font><br>
<img src="images/line_spacer.gif" height="2" width="1"><br>
<img src="images/black_fill.gif" height="2" width="576"><br>
<img src="images/line_spacer.gif" height="2" width="1"><br>
<table border="0" cellpadding="1" cellspacing="0" width="576">
              <tr bgcolor="#999999"> 
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit1Header</b></font></td>
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit2Header</b></font></td>
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit3Header</b></font></td>
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit4Header</b></font></td>
              </tr>
              <tr> 
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit1LivingRoom
				$cUnit1DiningRoom
				$cUnit1Kitchen
				$cUnit1MasterBedroom
				$cUnit1Bedroom2
				$cUnit1Bath
				$cUnit1UtilityRoom
				$cUnit1OtherRoom
				$cUnit1Range
				$cUnit1Refrigerator
				$cUnit1Dishwasher
				$cUnit1GarbageDisposal
				$cUnit1WaterHeater
				$cUnit1Furnace	
				$cUnit1Parking
				$cUnit1MonthlyRent
				$cUnit1LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit2LivingRoom
				$cUnit2DiningRoom
				$cUnit2Kitchen
				$cUnit2MasterBedroom
				$cUnit2Bedroom2
				$cUnit2Bath
				$cUnit2UtilityRoom
				$cUnit2OtherRoom
				$cUnit2Range
				$cUnit2Refrigerator
				$cUnit2Dishwasher
				$cUnit2GarbageDisposal
				$cUnit2WaterHeater
				$cUnit2Furnace	
				$cUnit2Parking
				$cUnit2MonthlyRent
				$cUnit2LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit3LivingRoom
				$cUnit3DiningRoom
				$cUnit3Kitchen
				$cUnit3MasterBedroom
				$cUnit3Bedroom2
				$cUnit3Bath
				$cUnit3UtilityRoom
				$cUnit3OtherRoom
				$cUnit3Range
				$cUnit3Refrigerator
				$cUnit3Dishwasher
				$cUnit3GarbageDisposal
				$cUnit3WaterHeater
				$cUnit3Furnace	
				$cUnit3Parking
				$cUnit3MonthlyRent
				$cUnit3LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit4LivingRoom
				$cUnit4DiningRoom
				$cUnit4Kitchen
				$cUnit4MasterBedroom
				$cUnit4Bedroom2
				$cUnit4Bath
				$cUnit4UtilityRoom
				$cUnit4OtherRoom
				$cUnit4Range
				$cUnit4Refrigerator
				$cUnit4Dishwasher
				$cUnit4GarbageDisposal
				$cUnit4WaterHeater
				$cUnit4Furnace	
				$cUnit4Parking
				$cUnit4MonthlyRent
				$cUnit4LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
              </tr>
              <tr bgcolor="#999999"> 
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit5Header</b></font></td>
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit6Header</b></font></td>
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit7Header</b></font></td>
                <td valign="top"><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><b>$Unit8Header</b></font></td>
              </tr>
	      <tr>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit5LivingRoom
				$cUnit5DiningRoom
				$cUnit5Kitchen
				$cUnit5MasterBedroom
				$cUnit5Bedroom2
				$cUnit5Bath
				$cUnit5UtilityRoom
				$cUnit5OtherRoom
				$cUnit5Range
				$cUnit5Refrigerator
				$cUnit5Dishwasher
				$cUnit5GarbageDisposal
				$cUnit5WaterHeater
				$cUnit5Furnace	
				$cUnit5Parking
				$cUnit5MonthlyRent
				$cUnit5LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit6LivingRoom
				$cUnit6DiningRoom
				$cUnit6Kitchen
				$cUnit6MasterBedroom
				$cUnit6Bedroom2
				$cUnit6Bath
				$cUnit6UtilityRoom
				$cUnit6OtherRoom
				$cUnit6Range
				$cUnit6Refrigerator
				$cUnit6Dishwasher
				$cUnit6GarbageDisposal
				$cUnit6WaterHeater
				$cUnit6Furnace	
				$cUnit6Parking
				$cUnit6MonthlyRent
				$cUnit6LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit7LivingRoom
				$cUnit7DiningRoom
				$cUnit7Kitchen
				$cUnit7MasterBedroom
				$cUnit7Bedroom2
				$cUnit7Bath
				$cUnit7UtilityRoom
				$cUnit7OtherRoom
				$cUnit7Range
				$cUnit7Refrigerator
				$cUnit7Dishwasher
				$cUnit7GarbageDisposal
				$cUnit7WaterHeater
				$cUnit7Furnace	
				$cUnit7Parking
				$cUnit7MonthlyRent
				$cUnit7LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
                <td valign="top">
			<table border="0" cellpadding="4" cellspacing="0" width="100%">
			<tr>
			<td valign="top" width="100%">
				$cUnit8LivingRoom
				$cUnit8DiningRoom
				$cUnit8Kitchen
				$cUnit8MasterBedroom
				$cUnit8Bedroom2
				$cUnit8Bath
				$cUnit8UtilityRoom
				$cUnit8OtherRoom
				$cUnit8Range
				$cUnit8Refrigerator
				$cUnit8Dishwasher
				$cUnit8GarbageDisposal
				$cUnit8WaterHeater
				$cUnit8Furnace	
				$cUnit8Parking
				$cUnit8MonthlyRent
				$cUnit8LeaseStatus
			</td>
			</tr>
			</table>
 		</td>
	      </tr>
            </table>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="581">
<tr>
<td valign="top" width="6"><img src="images/line_spacer.gif" height="1" width="6"><br></td>
<td valign="top" width="576">
<font face="Arial, Helvetica, sans-serif"><font size="3">property<b>features</b></font></font><br>
<img src="images/line_spacer.gif" height="2" width="1"><br>
<img src="images/black_fill.gif" height="2" width="576"><br>
<img src="images/line_spacer.gif" height="2" width="1"><br>
<table border=0 cellpadding=0 cellspacing=0 width=100%><tr>
$showfeaturestable</tr>
</table>
</td>
</tr>
</table>



$makestuff

</body>
</html>


STARTPAGECONTENT
}

@variables = ($Cook{userid},$INPUT{mlsnumber});
$sql_query = "INSERT INTO hits values (?,?,'res',now())";
my $zzaasth = $dbh->do($sql_query, undef, @variables);

my $uasth = $dbh->do("update users set lastlogin = now() where userid = '$Cook{userid}'");

$dbh->disconnect;


&footer;

sub commas {
	local($_)=@_;
	1 while s/(.*\d)(\d\d\d)/$1,$2/;
	$_;
}

