</li>
                                <li class="property_address"><?php 
                echo $property->address_display;
                ?>
</li>			  
				                <li class="property_price">&pound;<?php 
                echo number_format($property->price, 0, "", ",");
                ?>
 <?php 
                echo $property->price_postfix;
                ?>
</li>
                            </ul>
                            <div class="buttons clearfix">
                                <a href="<?php 
                echo vp_propertyurl($property->vebraid);
                ?>
" class="button">View Details</a>
                            </div>
                        </div>
                    </div>
                    <?php 
            }
            ?>
                <?php 
            break;
    }
} else {
    ?>
            <p>No matching properties found.  Please try alternative search criteria.</p>
        <?php 
function vp_map_pins($tproperties)
{
    global $vp_searchvars;
    $pstr = "var locations = [";
    $first = true;
    $lng = 0;
    $lat = 0;
    $linktext = "";
    foreach ($tproperties as $property) {
        if ($lng != $property->longitude || $lat != $property->latitude) {
            if ($linktext != "") {
                $pstr .= "'" . $linktext . "'";
                $pstr .= "]\r\n";
            }
            if ($first) {
                $first = false;
            } else {
                $pstr .= ",";
            }
            $pstr .= "[";
            $pstr .= "'" . $property->address_custom . "',";
            $pstr .= "'" . $property->latitude . "',";
            $pstr .= "'" . $property->longitude . "',";
            $linktext = "";
            $lng = $property->longitude;
            $lat = $property->latitude;
        }
        $linktext .= str_replace("'", "\\'", "<div class=\"vp_marker_content clearfix\"><a href=\"" . vp_propertyurl($property->vebraid) . "\">" . vp_propertyimage($property->vebraid, 0, "vp_pin_image") . "<br /><div class='vp_pin_details'><em>" . $property->address_display . "</em><br />" . $property->property_type . "</em><span>&pound;" . number_format($property->price, 0, "", ",") . " " . $property->price_postfix . "</span></div><div class='vp_pin_link'>View details</div></a></div>");
    }
    if ($linktext != "") {
        $pstr .= "'" . $linktext . "'";
        $pstr .= "]\r\n";
    }
    $pstr .= "];\r\n";
    if (array_key_exists("lat", $vp_searchvars) && array_key_exists("lng", $vp_searchvars)) {
        $pstr .= "var myLatLng = new google.maps.LatLng(" . $vp_searchvars["lat"] . "," . $vp_searchvars["lng"] . ");\r\n";
    } else {
        $options = get_option("vp_options");
        $pstr .= "var myLatLng = new google.maps.LatLng(" . $options["lat"] . "," . $options["lng"] . ");\r\n";
    }
    $pstr .= "var myRadius = 1609.344 * " . $vp_searchvars["radius"] . "\r\n";
    if ($vp_searchvars["radius"] < 3) {
        $pstr .= "var myZoom=13;\r\n";
    }
    if ($vp_searchvars["radius"] >= 3 && $vp_searchvars["radius"] < 5) {
        $pstr .= "var myZoom=12;\r\n";
    }
    if ($vp_searchvars["radius"] >= 5 && $vp_searchvars["radius"] < 10) {
        $pstr .= "var myZoom=11;\r\n";
    }
    if ($vp_searchvars["radius"] >= 10 && $vp_searchvars["radius"] < 20) {
        $pstr .= "var myZoom=10;\r\n";
    }
    if ($vp_searchvars["radius"] >= 20 && $vp_searchvars["radius"] < 40) {
        $pstr .= "var myZoom=9;\r\n";
    }
    if ($vp_searchvars["radius"] >= 40) {
        $pstr .= "var myZoom=8;\r\n";
    }
    if ($vp_searchvars["location"] == "") {
        $pstr .= "var showRadius=false;\r\n";
    } else {
        $pstr .= "var showRadius=true;\r\n";
    }
    return $pstr;
}