function getSizeImgName (pop) {
  var img = 'http://www.bymap.org/';
  if (pop >= 5000000)
    img += 'G5000.gif';
  else if (pop >= 1000000)
    img += 'G1000.gif';
  else if (pop >= 500000)
    img += 'G500.gif';
  else if (pop >= 250000)
    img += 'G250.gif';
  else if (pop >= 100000)
    img += 'G100.gif';
  else if (pop >= 50000)
    img += 'G50.gif';
  else if (pop >= 20000)
    img += 'G20.gif';
  else if (pop >= 10000)
    img += 'G10.gif';
  else if (pop >= 5000)
    img += 'G5.gif';
  else if (pop >= 1000)
    img += 'G1.gif';
  else
    img += 'G0.gif';
  return img;
}

function getDensityImgName (density) {
  var img = 'http://www.bymap.org/';
  if (density == null)
    img += 'D0.gif';
  else if (density == 0)
    img += 'D0.gif';
  else if (density >= 8000)
    img += 'D1.gif';
  else if (density >= 4000)
    img += 'D2.gif';
  else if (density >= 2000)
    img += 'D3.gif';
  else if (density >= 1000)
    img += 'D4.gif';
  else if (density >= 500)
    img += 'D5.gif';
  else if (density >= 250)
    img += 'D6.gif';
  else if (density >= 125)
    img += 'D7.gif';
  else 
    img += 'D8.gif';
  return img;
}

function getChangeImgName (incr) {
  var img = 'http://www.bymap.org/';
  if (incr == null)
    img += 'C0.gif';
  else if (incr > 0.75)
    img += 'C1.gif';
  else if (incr > 0.2)
    img += 'C2.gif';
  else if (incr > -0.15)
    img += 'C3.gif';
  else if (incr > -0.5)
    img += 'C4.gif';
  else
    img += 'C5.gif';
  return img;
}

function computeWikiCall (marker) {
  if ((marker.wiki != null) && (marker.wiki != ''))
    return marker.wiki;
  else
    return 'http://'+pagelang+'.wikipedia.org/wiki/Special:Search?go=Article&search='+encodeURI(marker.name);
}

function computeGoogleCall(marker, cat) {
  return "http://www.google.com/custom?q="+encodeURI(marker.name+' '+cat)+"&num=20&hl="+pagelang+"&sa=Google Search&client="+google_ad_client+"&forid=1&channel="+google_ad_searchchannel+"&ie=UTF-8&oe=UTF-8&safe=active&"+google_cof
}

function computeZoom (pop) {
  return 13;
}
