//line styles
var style_bridleway = {strokeColor: "#AA0000", strokeOpacity: 0.6, strokeWidth: 5}
var style_boat = {strokeColor: "#00AA00", strokeOpacity: 0.6, strokeWidth: 5}
var style_ruapp = {strokeColor: "#AA00AA", strokeOpacity: 0.6, strokeWidth: 5}
var style_pbway = {strokeColor: "#FF8000", strokeOpacity: 0.8, strokeWidth: 5}
var style_cycle = {strokeColor: "#101010", strokeOpacity: 0.7, strokeWidth: 5}
var style_thin_blue = {strokeColor: "#0000FF", strokeOpacity: 0.6, strokeWidth: 4}

function drawInfoMarker(long, latt, text) {

      var pos = gridProjection.getMapPointFromLonLat(new OpenLayers.LonLat(long, latt));
      var content = "<P CLASS='mapPopupHeading'>" + text + "</P><P CLASS='mapPopupBody'>" + enToLandranger(pos.getEasting(), pos.getNorthing()) +"</P>";
      osMap.createMarker(pos, new OpenSpace.Icon('blob.gif', new OpenLayers.Size(15, 15), new OpenLayers.Pixel(-7, -7)), content);
}

function drawPhotoMarker(long, latt, fullSize, thumbnail, caption) {

      var pos = gridProjection.getMapPointFromLonLat(new OpenLayers.LonLat(long, latt));
      var content = "<P><DIV CLASS='mapPopupBody'><B>Photograph:</B></DIV><BR><DIV CLASS='mapPhotoPopupInfo'>" + caption + "<BR><A HREF=" + fullSize + "><IMG SRC='photos/" + thumbnail + "'></A></DIV></P>";
      osMap.createMarker(pos, new OpenSpace.Icon('photo.gif', new OpenLayers.Size(20, 20), new OpenLayers.Pixel(-10, -10)), content);
}

function addPointToMap(long, latt) {
      //create os point from lat and long
      thispoint = gridProjection.getMapPointFromLonLat(new OpenLayers.LonLat(long, latt))
      //in os format
      points1.push(thispoint);
      //in lat long format
      points.push(new OpenLayers.Geometry.Point(thispoint.lon,thispoint.lat));

}