Angle of a javelin at any given moment I am using the following formula to draw the trajectory of a javelin (this is very basic, I am not taking into consideration the drag, etc.). 
  speedX = Math.Cos(InitialAngle) * InitialSpeed;
  speedY = Math.Sin(InitialAngle) * InitialSpeed;
  javelin.X = speedX * timeT;
  javelin.Y = speedY * timeT - 0.5 * g * Math.Pow(timeT, 2);

How do I know at what angle my javelin for a given timeT?

I am making the assumption that the javelin is pointed exactly in the direction of its motion.  (This seems dubious, but may be a close enough approximation for your purposes).
The speed in the X direction is constant, but the speed in the Y direction is $\text{speedY} -g\cdot \text{timeT}$.  So the direction of motion has angle $\text{angle}\theta$ from the positive X direction satisfying $$\tan(\text{angle}\theta)=\frac{\text{speedY}-g\cdot\text{timeT}}{\text{speedX}}.$$  If the initial angle is in $\left(0,\frac{\pi}{2}\right)$, then the angle always lies in $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$, and you can use the ordinary $\arctan$ function to get $\text{angle}\theta$.
