var CHECKBOX = new Class({
	initialize: function(active, checked, label) {
		var _self = this;
		
		this.options = {
			active: (active == true ? true : false),
			checked: (checked == true ? true : false),
			imageurlcheckedoff: './images/content/checkbox-checked-off.gif',
			imageurlnotcheckedoff: './images/content/checkbox-off.gif',
			imageurlcheckedon: './images/content/checkbox-checked-on.gif',
			imageurlnotcheckedon: './images/content/checkbox-on.gif'
		};
		
		this.elements = {
			checkbox: null
		};
		
		this.fx = {
		};
		
		this.labels = {
			text: label
		};
		
		this.elements.checkbox = new Element('img', {'alt':'', 'title':''}).setStyles({'border':0, 'cursor':'pointer', 'margin':'0px 5px -2px 0px'});
		if(this.options.active) this.elements.checkbox.src = (this.options.checked ? this.options.imageurlcheckedon : this.options.imageurlnotcheckedon);
		else this.elements.checkbox.src = (this.options.checked ? this.options.imageurlcheckedoff : this.options.imageurlnotcheckedoff);
		
		this.elements.checkbox.addEvent('click', function() {
			if(_self.options.active) {
				if(_self.options.checked) {
					_self.options.checked = false;
					_self.elements.checkbox.src = _self.options.imageurlnotcheckedon;
				} else {
					_self.options.checked = true;
					_self.elements.checkbox.src = _self.options.imageurlcheckedon;
				}
			}
		});
	},
	
	setActive: function() {
		this.options.active = true;
		this.options.checked = true;
		this.elements.checkbox.src = this.options.imageurlcheckedon;
	},
	
	setInactive: function() {
		this.options.active = false;
		this.options.checked = true;
		this.elements.checkbox.src = this.options.imageurlcheckedoff;
	}
});