Whois: Move JS Functions, Use Trim