

var iii='a';


function initializeMap(map,pos,zoom) {
  if(!pos)
    var startLatlng = new google.maps.LatLng(50.063882,19.044922);      //startowe plożenie mapy
  else
    var startLatlng = pos;      //startowe plożenie mapy
  var mapOptions = {       //opcje mapy
    zoom: zoom,
    center: startLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

  return map;
}


function CreatePolylineWithHTMLInfo(map,options,div,url)
{
  var line= currentTrial = new google.maps.Polyline(options);
  google.maps.event.addListener(line, 'click',  function(event){jQuery(div).load(url);});
  line.setMap(map);
  return line;
}


function CreatePolylineWithInfoWindow(map,options,url)
{
  var line= currentTrial = new google.maps.Polyline(options);
  google.maps.event.addListener(line, 'click',  function(event){
  infoWindow = new google.maps.InfoWindow();
 //var markerLatLng = marker.getPosition();
  jQuery.get(url, function(data){
   infoWindow.setContent(data);
  });
  infoWindow.setPosition(event.latLng);
  infoWindow.open(map);


  });
  line.setMap(map);
  return line;
}

function TrialColor(color)
{
  if(color=='czarny') return '#000000';
  if(color=='czerwony') return '#dd0000';
  if(color=='zielony') return '#00bb00';
  if(color=='niebieski') return '#0000ee';
  //if(color=='żółty') return '#e5ff00';
  if(color=='żółty') return '#f2ff7a';
  return '#000000';
}
