

	/* ------------------------------------------------------------------------------------------
	 */
	var onTimed = new Array();

	function processTimers() {
		/* loop through all timer-types */
		for (var tmode in onTimed) {
			var onTime = onTimed[tmode];

			/* loop through all timer-handlers */
			for (var key in onTime) {
				var scriptt;

				/* process this timer-handler */
				if ((scriptt = onTime[key]) != null) {
					if (scriptt.executed == false) {
						scriptt.executed = true;

						if (tmode == TIMER_IMMEDIATE) {
							scriptt.script();

							killTimer(tmode, scriptt.script());
						}
						else if (tmode == TIMER_DELAYED)
							scriptt.timer = setTimeout(scriptt.script, scriptt.parameter);
						else if (tmode == TIMER_FREQUENCY)
							scriptt.timer = setInterval(scriptt.script, scriptt.parameter);
						else if (tmode == TIMER_CLOCK)
							scriptt.timer = setTimeout(scriptt.script, scriptt.parameter - (new Date()).getTime());
					}
				}
			}
		}

		setTimeout(processTimers, 1000);
	}

	function killTimer(tmode, script) {
		/* loop through all timer-types */
		for (var tmode in onTimed) {
			var onTime = onTimed[tmode];

			/* loop through all timer-handlers */
			for (var key in onTime) {
				var scriptt;

				/* process this timer-handler */
				if ((scriptt = onTime[key]) != null) {
					if (scriptt.script == script) {
						onTime[key] = null;

						/* if executed, remove timer */
						if (scriptt.executed == true) {
							if (tmode == TIMER_DELAYED)
								clearTimeout(scriptt.timer);
							else if (tmode == TIMER_FREQUENCY)
								clearInterval(scriptt.timer);
							else if (tmode == TIMER_CLOCK)
								clearTimeout(scriptt.timer);
						}
					}
				}
			}
		}
	}

	function registerTimer(tmode, parms, script) {
		if (onTimed[tmode] == null)
			onTimed[tmode] = new Array();

		onTimed[tmode].push(new timerClass(tmode, parms, script));
	}

	registerScript(window, SCRIPT_ONLOAD, SCRIPT_PARM_ONETIME, processTimers);

