Would suggest you check out this thread. It has been discussed in detail: MTM Margin calculations in options spreads