Take the location, convert to string, and split twice:
vidID = document.location.toString().split("v=")[1].split("&")[0];