//-----------------------------------------------------------------------------------------------------------
/* JSSystem constructor */
function JSSystem(classes){
	this.init(classes);
}
/* set prototype */
JSSystemPrototype = JSSystem.prototype;
//-----------------------------------------------------------------------------------------------------------
JSSystemPrototype.init = function(classes) {
	this.createKLayer();
	this.createLocale();
	this.createRegularExp();
	this.createClasses(classes);
}
//-----------------------------------------------------------------------------------------------------------
JSSystemPrototype.createClasses = function(classes) {
	if (classes) {
		var class_ = '';	
		for (var i=0; i<classes.length; i++) {
			class_ = classes[i];
			switch (class_){
				case 'form':
					this.createForm();
					break;
				case 'calendar':
					this.createCalendar();
					break;	
				case 'ajax':
					this.createAjax();
					break;
				case 'nifty':
					this.createNifty();
					break;	
			}	
		}		
	}	
}
//-----------------------------------------------------------------------------------------------------------
JSSystemPrototype.createKLayer = function() {
	IKLayer = new JSKLayer();
}

JSSystemPrototype.createLocale = function() {
	ILocale = new JSLocale();
}

JSSystemPrototype.createRegularExp = function() {
	IRegularExp = new JSRegularExp();
}
//-----------------------------------------------------------------------------------------------------------
JSSystemPrototype.createForm = function() {
	IForm = new JSForm();
}

JSSystemPrototype.createCalendar = function() {
	ICalendar = new JSCalendar();
}

JSSystemPrototype.createAjax = function() {
	IAJAX = new JSAJAX();
}

JSSystemPrototype.createNifty = function() {
	INifty = new JSNifty();
}
//-----------------------------------------------------------------------------------------------------------
