﻿/// <reference path="VEJS/VeJavaScriptIntellisenseHelper.js" />

function pageLoad()
{
    bestview = false;
    var latitude = 40;
    var longitude = -8;
    var zoom = 8;
    var hdfLatitude = document.getElementById("ctl00_ContentPlaceHolderMain_ListingReport1_lvEvents_ctrl0_hdfEventLatitude");
    var hdfLongitude = document.getElementById("ctl00_ContentPlaceHolderMain_ListingReport1_lvEvents_ctrl0_hdfEventLongitude");

    if (hdfLatitude != null && hdfLongitude != null) {
        latitude = hdfLatitude.value.replace(/,/g,'.');
        longitude = hdfLongitude.value.replace(/,/g, '.');
        zoom = 13;
    }
   
    RB_initMapLatLon("myMap",latitude,longitude,zoom);
}

function Hide(obb) {
    window.alert(obb);
// obb.visible = false;
}
function centerMapOnEvent()
{
    var latitude = 0;
    var longitude = 0;

    var hdfLatitude = document.getElementById("ctl00_ContentPlaceHolderMain_ListingReport1_lvEvents_ctrl0_hdfEventLatitude");
    var hdfLongitude = document.getElementById("ctl00_ContentPlaceHolderMain_ListingReport1_lvEvents_ctrl0_hdfEventLongitude");
  
    if(hdfLatitude == null || hdfLongitude == null)
        return;
        
    latitude = hdfLatitude.value;
    longitude = hdfLongitude.value;
    
    RB_centerZoomMap(latitude,longitude,13);
    
}