// Note: If you are already using the Maps API then do not include it again
//       If you are already using the AJAX Search API, then do not include it
//       or its stylesheet again
//

/*
function include_dom(script_filename) {
    var html_doc = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', script_filename);
    html_doc.appendChild(js);
    return false;
}
*/

function LoadMapSearchControl() {

      var options = {
            zoomControl : GSmapSearchControl.ZOOM_CONTROL_ENABLE_ALL,
            title : "581 Avenue of The Americas",
            url : "http://www.kasina.com",
            idleMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+2,
            activeMapZoom : GSmapSearchControl.ACTIVE_MAP_ZOOM+2
            }

      new GSmapSearchControl(
            document.getElementById("mapsearch"),
            "581 Avenue of The Americas, New York",
            options
            );

    }

// <!-- Map Search Control and Stylesheet -->
window._uds_msw_donotrepair = true;

var MapsUrl = "http://maps.google.com/maps?file=api&v=2&key=";
var UdsUrl  = "http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-msw&key=";
var mapSearchUdsUrl = 'http://www.google.com/uds/solutions/mapsearch/gsmapsearch.js?mode=new';
var pageAddr = window.location.href;

// Default
var gMapKey = 'ABQIAAAAaUy1N0US7v5qLysdI1160RTGn7ALqdlYSZo6yqst2HZnBqrxcxRK_qj8eox-zReIgLjrR_Ezv12KSw';

// The Key Embedded in the following script tags is designed to work with
// the following site:
// http://www.kasina.com
if (pageAddr.indexOf('kasina.com') != -1) {
gMapKey = 'ABQIAAAAaUy1N0US7v5qLysdI1160RRF3XfMUunYBZreRlwgM7MygXgL0BTR_SwG4UrHlCM1P1Bvy_7VwYaN2g';
}


// The Key Embedded in the following script tags is designed to work with
// the following site:
// http://dev.belzabar.com
if (pageAddr.indexOf('dev.belzabar.com') != -1) {
  gMapKey = 'ABQIAAAAaUy1N0US7v5qLysdI1160RRMREz3Y8CRH2tlPRWD_lGoWISekRSF6xbjZM8xypubKBUkyV_5H4vTiw';
}

  
if (pageAddr.indexOf('vpn.belzabar.com') != -1) {
  gMapKey = 'ABQIAAAAVHBe7RsXt4hpTPNcEFBP8BQAZONXSodOkdVw-ISjsVolOZFjjxRYaz9tRAkIlHhm-V4cv_qjyme3hw';
}

// Prepare Url
MapsUrl += gMapKey;
UdsUrl  += gMapKey;


// This method does not work in IE
//include_dom(MapsUrl);
//include_dom(UdsUrl);
//include_dom(mapSearchUdsUrl);

document.write("<script type='text/javascript' src='"+ MapsUrl +"' ></script>");
document.write("<script type='text/javascript' src='"+ UdsUrl +"' ></script>");
document.write("<script type='text/javascript' src='" + mapSearchUdsUrl +"' ></script>");




// End

