//
// Functions in the file are used by NSSL web site
//
function get_pixel(minpxl, maxpxl, minloc, maxloc, loc) {
  c = (maxpxl - minpxl)/(maxloc - minloc);
  pxl = minpxl+ c * (loc - minloc);
  return(pxl);
}

function nssl_showbox(lon_left,lat_top,lon_right,lat_bot) {
  imgX = getOffsetX(mapName);
  imgY = getOffsetY(mapName);
  pxlx1 = get_pixel(leftMargine,rightMargine,leftLon,rightLon,lon_left);
  pxly2 = get_pixel(topMargine,botMargine,topLat,botLat,lat_bot);
  pxlx2 = get_pixel(leftMargine,rightMargine,leftLon,rightLon,lon_right);
  pxly1 = get_pixel(topMargine,botMargine,topLat,botLat,lat_top);
  boxIt(pxlx1+imgX,pxly1+imgY,pxlx2+imgX,pxly2+imgY);
}

