Create media.js

Performs javascript code needed by mediam.html