/* OnloadScheduler.js - schedules functions to run when a document has loaded
 *
 * The author of this program, Safalra (Stephen Morley), irrevocably releases
 * all rights to this program, with the intention of it becoming part of the
 * public domain. Because this program is released into the public domain, it
 * comes with no warranty either expressed or implied, to the extent permitted
 * by law.
 *
 * For more public domain JavaScript code by the same author, visit:
 * http://www.safalra.com/programming/javascript/
 */

var OnloadScheduler=new function(){var _1=new Array();var _2=new Array();window.onload=function(){for(var i=_1.length-1;i>0;i--){execute(_1[i]);}for(var i=0;i<_2.length;i++){execute(_2[i]);}OnloadScheduler=null;};function execute(_5){if(_5){for(var i=0;i<_5.length;i++){_5[i]();}}}this.schedule=function(_7,_8){if(_7 instanceof Function){if(!_8){_8=0;}if(_8<0){if(_1[-_8]){_1[-_8].push(_7);}else{_1[-_8]=[_7];}}else{if(_2[_8]){_2[_8].push(_7);}else{_2[_8]=[_7];}}}else{this.schedule(function(){eval(_7);},_8);}};};

