i am using a hosted CMS solution that uses prototype for some of its components. it only includes the prototype.js library in certain cases which are dependent on the content that a user adds to their page.

this is a problem because i want to write my own scripts for the site which make use of prototype, and if prototype is only sometimes included then my scrips wont always work.

so i am wondering if there is a way to write a javascript that will check to see if prototype has been included, and if it hasn't then include it.

does anybody know ho i could do this?