michael@0: // script.aculo.us scriptaculous.js v1.7.1_beta2, Tue May 15 15:15:45 EDT 2007 michael@0: michael@0: // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) michael@0: // michael@0: // Permission is hereby granted, free of charge, to any person obtaining michael@0: // a copy of this software and associated documentation files (the michael@0: // "Software"), to deal in the Software without restriction, including michael@0: // without limitation the rights to use, copy, modify, merge, publish, michael@0: // distribute, sublicense, and/or sell copies of the Software, and to michael@0: // permit persons to whom the Software is furnished to do so, subject to michael@0: // the following conditions: michael@0: // michael@0: // The above copyright notice and this permission notice shall be michael@0: // included in all copies or substantial portions of the Software. michael@0: // michael@0: // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, michael@0: // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF michael@0: // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND michael@0: // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE michael@0: // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION michael@0: // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION michael@0: // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. michael@0: // michael@0: // For details, see the script.aculo.us web site: http://script.aculo.us/ michael@0: michael@0: var Scriptaculous = { michael@0: Version: '1.7.1_beta2', michael@0: require: function(libraryName) { michael@0: // inserting via DOM fails in Safari 2.0, so brute force approach michael@0: document.write(''); michael@0: }, michael@0: REQUIRED_PROTOTYPE: '1.5.1', michael@0: load: function() { michael@0: function convertVersionString(versionString){ michael@0: var r = versionString.split('.'); michael@0: return parseInt(r[0])*100000 + parseInt(r[1])*1000 + parseInt(r[2]); michael@0: } michael@0: michael@0: if((typeof Prototype=='undefined') || michael@0: (typeof Element == 'undefined') || michael@0: (typeof Element.Methods=='undefined') || michael@0: (convertVersionString(Prototype.Version) < michael@0: convertVersionString(Scriptaculous.REQUIRED_PROTOTYPE))) michael@0: throw("script.aculo.us requires the Prototype JavaScript framework >= " + michael@0: Scriptaculous.REQUIRED_PROTOTYPE); michael@0: michael@0: $A(document.getElementsByTagName("script")).findAll( function(s) { michael@0: return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/)) michael@0: }).each( function(s) { michael@0: var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,''); michael@0: var includes = s.src.match(/\?.*load=([a-z,]*)/); michael@0: (includes ? includes[1] : 'builder,effects,dragdrop,controls,slider,sound').split(',').each( michael@0: function(include) { Scriptaculous.require(path+include+'.js') }); michael@0: }); michael@0: } michael@0: } michael@0: michael@0: Scriptaculous.load();