I'm trying to use the code found at http://msdn.microsoft.com/en-us/library/hh185010(v=office.14).aspx under the section 'Adding a Web Part To A Page With Javascript'. However I cannot get a reference to the file SP.js. Is this found in 2007 or is it only 2010 and on?
Thanks