function initDyno() {
    document.getElementById('divt1').style.display='none';
    document.getElementById('divt2').style.display='none';
    document.getElementById('aux01').style.visibility='visible';
    document.getElementById('resultsList').style.visibility='hidden';
}
function toggleT(elid) {
    id = document.getElementById(elid);
    if (id.style.display == "none") {
        id.style.display = "block";
    } else {
        id.style.display = "none";
    }
}
function toggleR(elid1,elid2) {
    id = document.getElementById(elid1);
    id2 = document.getElementById(elid2);
    if (id.style.visibility == "hidden") {
        id.style.visibility = "visible";
        id2.style.visibility = "hidden";
    } else {
        id.style.visibility = "hidden";
        id2.style.visibility = "visible";
    }
}
function setSelectedIndexToZero(elid) {
    id = document.getElementById(elid);
    id.selectedIndex = 0;
}
function toggleSearchAreas() {

}
function arrayBounds(ary) {
    // compute the bounds for an array of markers
    var bounds = new GLatLngBounds();
    if (ary && ary.length > 0) {
        for (var i = 0; i < ary.length; i++) {
            var marker = ary[i];
            if (marker) {
                bounds.extend(marker.getPoint());
            }
        }
    }
    return bounds;
}
function reCenterMap(boundsMarkers) {
    var bounds = arrayBounds(boundsMarkers);
    var center_lat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2.0;
    var center_lng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2.0;
    var center = new GLatLng(center_lat,center_lng)
    var zoom = map.getBoundsZoomLevel(bounds);
    map.setCenter(center,zoom);
}


