// global functions
window.onload = init;

// globar variable

function init(){
	Config.initializers.forEach(function(f){
		f();
	});
};

function init_stop_watch(){
	// Elements
	_start = $("start_button");
	_stop = $("stop_button");
	_update = $("update_button");
	_operation = new OperationElement();
	
	_started_at = new StartedAtElement();
	_stopped_at = new StoppedAtElement();
	
	Event.observe(_start, 'click', Controller.start_bell, false);
	Event.observe(_stop, 'click', Controller.stop_bell, false);
	Event.observe(_update, 'click', Controller.update_bell, false);
	
	// GUI
	_stop.disable();		// TODO:
	_started_at.disable();
	_stopped_at.disable();
};

