/* fw.js * * @Author: Unknown (sadly), original version * @Author: Ryan McGrath (Compatibility version, what's below) * @Requires: Nothing * * @Notes: At this point, the following functions are for legacy purposes only. jQuery is steadily becoming the default * library for anything on Webs-user sites, and should be used for everything else. Use of any of the functions below * is not guaranteed to work in terms of moving forward, so please be aware of that if you choose to utilize anything. */ var Class = function(properties){ var klass = function(){ for (var p in this){ if (this[p]) this[p]._proto_ = this; } if (arguments[0] != 'noinit' && this.initialize) return this.initialize.apply(this, arguments); }; klass.extend = this.extend; klass.implement = this.implement; klass.prototype = properties; return klass; }; Class.empty = function(){}; Class.create = function(){ return function() { this.initialize.apply(this, arguments); } }; /* fw is a common namespace to hold legacy functions. Use jQuery instead. ;P */ if(!fw) { var fw = {}; fw.addLoadListener = function(fn) { if(window.addEventListener) window.addEventListener('load', fn, false); else if(window.attachEvent) window.attachEvent('onload', fn); } fw.Instances = { list: [], add: function(self, cID, type, parent) { this.list.push({ 'self': self, 'cID': cID || self.containerID, 'type': type || self.type, 'parent': parent || self.options.parent }); return this.list[this.list.length-1]; }, get: function(cID) { for(var i = 0; i < this.list.length; i++) { if(this.list[i].cID == cID) return this.list[i].self; } return null; }, getAll: function(type) { var all = []; for(var i = 0; i < this.list.length; i++){ if (this.list[i].type == type || !type) all.push(this.list[i]); } return all; } }; fw.Libs = { loaded: '', load: function(libs) { this.libs = libs; while(this.libs.length>0) { var loc = this.libs.shift(); if(this.loaded.indexOf(loc+'|')>-1) continue; this.loaded += loc + '|'; document.write('