What to do for missing data in time series If a time series has several runs of missing data is it best to impute the mean of the previous observations?
 A: This is a good application for the EM algorithm of Shumway and Stoffer.
First you need to specify your arima model, then you can use the Kalman Filter because is can handle missing values (see the Durbin and Koopman textbook).
For starting parameter values you can compute the expected value of the missing values, then you maximize over the parameters given the missing values and you iterate. 
This is very well explained in http://www.amazon.com/Time-Analysis-Its-Applications-Statistics/dp/144197864X page 344 in the State-Space model chapter.
I hope it helps!
A: I would suggest looking into multiple imputation algorithms. Gary King has produced a package for R called Amelia that does very sophisticated multiple imputation and can handle time series quite well. Amelia treats all of the data as multivariate normal and performs multiple random draws from that distribution until the draws converge on the final imputed value. But there are a number of customization features that you can incorporate so that you can sculpt Amelia runs to your particular problem, such as including lags, leads, and polynomial expressions. 
