/*
 *	機  能	:タイムバッファタイマー(処理を監視し成否で第一引数の関数を起動)
 *	引  数	：checker(文字列)			:判定条件
 *	戻り値	:なし
 */
var timeBufferTimer = Class.create();
	var corrbufffuncres;
	timeBufferTimer.prototype = {
		//定数の定義
		CORBUFFUNC_PREFIX		: 'if(',
		CORBUFFUNC_JOINT		: '){clearInterval(corrbufffuncres);',
		CORBUFFUNC_SUFFIX		: '};',

		//コンストラクタ
		initialize:	function(state,oncorrectfunc,interval){
			this.state = state;
			this.oncorrectfunc = oncorrectfunc;
			this.interval = interval;
		},

		//タイマー開放と第二引数の関数を文字列化し変数に格納
		timerStart: function(){
				var handstotimer = this.CORBUFFUNC_PREFIX + this.state +
													this.CORBUFFUNC_JOINT + this.oncorrectfunc + ';' +
													this.CORBUFFUNC_SUFFIX;
				//タイマーセット
				corrbufffuncres = setInterval(handstotimer,this.interval);
		},

		//タイマーを強制終了
		timerStop: function(){
			clearInterval(corrbufffuncres);
		}
	};