adjusted javascript to include dropdown in title