Use Variable Inside String Javascript Substring Index