Video Tag: Functions in Javascript