	// Show alignment arrows and icons first
	// so that they do not obscure.

		if (PlotAligns) // the same for both raw and mean
		{  
		  is_al = align->found ;

		  Dm = pf->DataMean ;
		  
		  switch(align->body)
		  {
		  case 3: bitmap = bmMercury ; break ;
		  case 4: bitmap = bmVenus   ; break ;
		  case 5: bitmap = bmMars    ; break ;
		  case 6: bitmap = bmJupiter ; break ;
		  case 7: bitmap = bmSaturn  ; break ;
		  case 8: bitmap = bmUranus  ; break ;
		  case 9: bitmap = bmNeptune ; break ;
		  case 11:bitmap = bmSun     ; break ;
		  }

 		  SelectObject(hmemDC, bitmap) ;
		  //
		  // alignment-count and indices now match
		  // and begin at 1 (one), and "none found"
		  // is indicated by a zero count.
		  //
		  // so, if we have at least one...
		  if (is_al > 0)
		  for ( i = 1, first_al_to_show = 0 ; i <= is_al ; i++ )
		  {
			  // display only in-period alignments
			  if ((Dcnt = Date_Time[UsePlanet][i]->daycount) >= 0.0)
			  {
			  if (!first_al_to_show) first_al_to_show = i ;
			  xp = ep2xp(Date_Time[UsePlanet][i]->epal) ;

			  if (xp >= xlmar && xp < (xlmar + wd))
			  {
			  // put bitmaps just below top of chart
			  yp = D.top + 1 ;

			  BitBlt(hdc,
				     xp - 5,
					 yp,
					 11, 17,
					 hmemDC, 0, 0, SRCCOPY) ;

			  // note the positions of the icons

			  SetRect(&rcalig[i], xp - 5, yp, xp + 5, yp + 17 ) ;

			  // and form rectangles in the interstices

			  if ( i > first_al_to_show )
			  SetRect(&rcinter_al[i], rcalig[i-1].right,
				                      yp,
									  rcalig[i].left,
									  rcalig[i].bottom) ;

			  // put another set of icons just above the bottom of the chart
			  yp = D.bottom - 20 ;

			  BitBlt(hdc,
				     xp - 5,
					 yp,
					 11, 17,
					 hmemDC, 0, 0, SRCCOPY) ;

			  if (wantAlIconLinks)
			  {
				  HPEN Op ;
				  Op = SelectObject(hdc, blackPen) ;
				  yp = D.bottom - 25 ;
				  MoveToEx(hdc, xp, yp, NULL) ;
				  yp = D.top + 22 ;
				  LineTo(hdc, xp, yp) ;
				  SelectObject(hdc, Op) ;
			  }
			 }
			}
		  }
       }

	if (modPlotAligns)
		{  
		  is_al = align->found ;

		  Dm = pf->DataMean ;
		  
		  switch(align->body)
		  {
		  case 3: modbitmap = bmphMercury ; break ;
		  case 4: modbitmap = bmphVenus   ; break ;
		  case 5: modbitmap = bmphMars    ; break ;
		  case 6: modbitmap = bmphJupiter ; break ;
		  case 7: modbitmap = bmphSaturn  ; break ;
		  case 8: modbitmap = bmphUranus  ; break ;
		  case 9: modbitmap = bmphNeptune ; break ;
		  case 11:modbitmap = bmphSun     ; break ;
		  }

 		  SelectObject(hmemDC, modbitmap) ;
		  //
		  // alignment-count and indices now match
		  // and begin at 1 (one), and "none found"
		  // is indicated by a zero count.
		  //
		  // so, if we have at least one...
		  if (is_al > 0)
		  for ( i = 0, first_al_to_show = 0 ; i <= is_al ; i++ )
		  {
			  // display only in-period alignments
			  if ((Dcnt = modDate_Time[align->body][i]->daycount) >= 0.0)
			  {
				  double r[5] ;
			  if (!first_al_to_show) first_al_to_show = i ;

			  xp = ep2xp(PredShift(align->body, i, r)) ;

			  if (xp >= xlmar && xp < (xlmar + wd))
			  {
			  // put bitmaps just below top of chart
			  yp = D.top + 1 ;

			  BitBlt(hdc,
				     xp - 5,
					 yp,
					 11, 17,
					 hmemDC, 0, 0, SRCCOPY) ;

			  // note the positions of the icons

			  SetRect(&rcmodalig[i], xp - 5, yp, xp + 5, yp + 17 ) ;

			  // and form rectangles in the interstices

			  if ( i > first_al_to_show )
			  SetRect(&rcmodinter_al[i], rcmodalig[i-1].right,
				                      yp,
									  rcmodalig[i].left,
									  rcmodalig[i].bottom) ;

			  // put another set of icons just above the bottom of the chart
			  yp = D.bottom - 20 ;

			  BitBlt(hdc,
				     xp - 5,
					 yp,
					 11, 17,
					 hmemDC, 0, 0, SRCCOPY) ;

			  if (wantModAlIconLinks)
			  {
				  HPEN Op ;
				  Op = SelectObject(hdc, bluePen) ;
				  yp = D.bottom - 25 ;
				  MoveToEx(hdc, xp, yp, NULL) ;
				  yp = D.top + 22 ;
				  LineTo(hdc, xp, yp) ;
				  SelectObject(hdc, Op) ;
			  }
			 }
			}
		  }
       }

	if (wantPredSh)
	{
		  if ((is_al = align->found) > 0)
		  for ( i = 0 ; i < is_al ; i++ )
		  {
			double r[5] ;
			xp = ep2xp(PredShift(UsePlanet, i, r)) ;
			yp = rcArc.bottom - (int)((double)ht * r[0] + (double)ylmar) ;
			DrawIcon(hdc, xp - 5, yp - 5, icPhShift) ;
		  }
	}

	if (PlotAllAls)
		  {
			  ULONG p, q ;

			  SelectObject(hdc, redPen) ;

		// If no General Alignments, go get them.
			  if (!_is.AllAlsExist)
			  {
				  ep = align->epfirst ;
				  update() ;

				  if (wantVs)
					VelsOn() ;

				  _is.AllAlsExist = All_Aligns(align->centre) ;
			  }

			  if (AllAlsDone)
			  {
		// Moon-in-Perigee markers (bracketing Alignment Groups)
			  for ( q = 0 ; q < Als.nAx ; q++)
				  {
				  if (Als.Axtyp[q])
			      SelectObject(hdc, dkbluePen) ; // Moon in perigee
				  else
			      SelectObject(hdc, ltbluePen) ; // Moon in apogee
				  xp = ep2xp(Als.EpAx[q]) ;

				  if (wantLunAxials)	// Lunar axials on chart
					{
					  yp = D.bottom ;
					  MoveToEx(hdc, xp, yp, NULL) ;
					  yp = D.top ;
					  LineTo(hdc, xp, yp) ;
					}
					  yp = rcArc.bottom - 1 ;		// Markers below chart
					  MoveToEx(hdc, xp, yp, NULL) ;
					  yp = rcArc.bottom - 15 ;
					  LineTo(hdc, xp, yp) ;
				  }

		// Alignment markers per group
			  SelectObject(hdc, redPen) ;
			  for (p = 0L ; p <= Als.nGrps ; p++)
			  {
				  for (q = 0L ; q <= Als.nGr[p] ; q++)
				  {
				  if (!RastBodyList[Als.Body[p][q]]) continue ;
				  xp = ep2xp(Als.Aep[p][q]) ;
				  yp = rcArc.bottom - 1 ;
				  MoveToEx(hdc, xp, yp, NULL) ;
				  yp = rcArc.bottom - 10 ;
				  LineTo(hdc, xp, yp) ;
				  }
			  }

		// Plot longitudes of selected lunar alignments on the main chart.
			if(!do_helioc_dirs)
			{
			SelectObject(hdc, blackPen) ;
			  for (p = 0L ; p <= Als.nGrps ; p++)
			  {
				  static b = 1 ;
				  for (q = 0L ; q <= Als.nGr[p] ; q++)
				  {
				  if (!RastBodyList[Als.Body[p][q]]) continue ;
				  xp = ep2xp(Als.Aep[p][q]) ;
				  yp = rcArc.bottom - ((int)((double)ht * range(Als.Along[p][q]) / pi) + ylmar) ;

				  Ellipse(hdc, xp + b, yp + b, xp - b, yp - b) ;
				  }
			  }
			}
		}
		}

