ForteClass = function(init,name)
{
	init.prototype.log = this.log;
	init.prototype.getMethodCallback = this.getMethodCallback;
	init.prototype.className = name

	return init
}

ForteClass.prototype.log = function(dump)
{
	if(this.data.isDebugMode)
	{
		if(typeof(console)!='undefined' && typeof(console.log)!='undefined')
			console.log(this.className+': ',dump);
		else
		{
			/* DEBUGGING WHEN CONSOLE LOG NOT AVAILABLE */
				var local = {}
				local.jDebugPanel = jQuery('textarea#ForteClassDebugPanel')
				if(!local.jDebugPanel.length)
				{
					var local = {}
					local.Div = document.createElement('div');
					local.Div.style.textAlign='left';
					local.Div.appendChild(document.createElement('hr'))
					
					local.H = document.createElement('h2');
					local.H.innerHTML = 'Forte Class Debug Panel';
					local.Div.appendChild(local.H)
	
					local.TextAreaElement = document.createElement('textarea');
					local.TextAreaElement.id = 'ForteClassDebugPanel';
					local.TextAreaElement.style.width='100%';
					local.TextAreaElement.rows = 30;
					local.Div.appendChild(local.TextAreaElement);
					
					document.body.appendChild(local.Div);
					local.jDebugPanel = jQuery(local.TextAreaElement);
				}
				
				local.jDebugPanel.val(this.className+': '+dump.toString() + '\r' + local.jDebugPanel.val());
			/* END */
		}
	}
}

ForteClass.prototype.getMethodCallback = function(method)
{
	/* name to function */
		if(typeof(method) == typeof(''))
		{
			if(typeof(this[method]) == typeof(function(){}))
				method = this[method]
			else
			{
				if(typeof(console) != 'undefined' && typeof(console.log) != 'undefined')
					console.log('Failed Caller: ', arguments.callee.caller);
		
				throw 'The method argument passed to ForteCarousel.prototype.getMethodCallback is invalid. The method name "'+method+'", is not defined';
			}
		}
	/* end */

	if( typeof(method) != typeof(function(){}) )
	{
		if(typeof(console) != 'undefined' && typeof(console.log) != 'undefined')
			console.log('Failed Caller: ', arguments.callee.caller);

		throw 'The method argument passed to ForteCarousel.prototype.getMethodCallback is invalid. Type recieved: '+typeof(method);
	}

	var returnMethod = function(a,b,c,d,e){return arguments.callee.eventProcessor.call(arguments.callee.owner,a,b,c,d,e)};
	returnMethod.owner = this
	returnMethod.eventProcessor = method

	return returnMethod
}
