Now working in IE7

Added ie function which returns the IE version so we can use the correct syntax with IE6 and IE7