Variable Inside String Javascript Substring Replace