Fixed error on IE7 / Removed some discarded codes