fixed bug in IE. javaScript doesn't have trim function lol :)

forgot about it.