/* Google Map Script */
      
var gMap;                     // the map object
var marker;                   // represents a marker object on image
var gContainer = "";          // id of containing DIV of map
var zoom = 15;                // default map zoom level
var latitude = 0;             // latitude of coord
var longitude = 0;            // longitude of coord
/* newcastle branch */
//var latitude = -32.8901;     
//var longitude = 151.7145;    


//var latitude = -32.5495;//-32.5690;
//var longitude = 151.1414;//151.1649; 

function init( latitude_, longitude_ )
{
  try
  {
    if (GBrowserIsCompatible( ))
    {  
      gMap = new GMap2(document.getElementById( gContainer ));
      gMap.setCenter(new GLatLng( latitude_, longitude_ ), zoom );
      gMap.addControl(new GSmallMapControl());
      
      var point = new GLatLng( latitude_, longitude_ );
      marker = new GMarker( point );
      
      AddMarker( marker );
      //infoWindow( );
    }
  }
  catch( ex )
  {
    
  }
}

function Point( lat_, lng_ )
{
  return new GLatLng( lat_, lng_ );
}

function SetCentre( latitude_, longitude_)
{
  gMap.panTo(new GLatLng(latitude_, longitude_) );
} 
   
function infoWindow( text_ )
{
  gMap.openInfoWindow(gMap.getCenter(), document.createTextNode( text ));
}

function RemoveMarker( marker_ )
{
  if ( marker_ )
    gMap.removeOverlay( marker_ );
  marker_ = null;
}

function AddMarker( marker_ )
{
  gMap.addOverlay( marker_ );
}  