How to implement a jscript for displaying custom ads
Upload your .js file in your theme directory. 
In your theme's .info file add 
scripts[] = path/file_name.js  as follows.


This will include the .js file in each page of your site. Path of the .js file is relative to the .info file.