May i transfer my H1b to B company?

I am currently on H1b visa and the expiry date is November-19-2015 and i am getting job offer from another comany.This is my 2nd H1B so my question is.

if i transfer my H1B to other comapny and they file my PERM in March-2015 and if it gets approved before my 2nd H1B expires i mean Before November-19-2015.will i still be able to stay in USA or i have to leave USA.

please answer me i am so confused.