Tools = Class.create();
Object.extend(Tools.prototype, WebControl.prototype);

Object.extend(Tools.prototype,
    {
        initialize : function(config)
        {
            WebControl.prototype.initialize.call(this, config);
            var thisClass = this;
            
            this.config.Show = function()
            {
                var nameday = new NameDay({ container: "nameday"});
                var weather = new Weather({container: "weather"});
                var radio = new Radio({container: "radio"});
                var reminderControl = new Reminder({
                    container: "reminder",
                    selectedDate: new Date(),
                    role: thisClass.config.role
                })
                var calendar = new Calendar({container: "calendar", reminder: reminderControl});
                reminderControl.config.calendar = calendar;
                
                nameday.Show();
                weather.Show();
                calendar.Show();
                reminderControl.Show();
                radio.Show();
                
                try
                {
                    GeneralUpdate.Config = {NameDay: nameday, Calendar: calendar, Weather: weather};
                    GeneralUpdate.Start();
                }
                catch(ex)
                {
                    alert(ex);
                }
            }
        }
    }
);

