var BasicControlDisable = new Object();

BasicControlDisable.removeControlsClick = function( the_el, the_object )
{
	var cof_id = ContentObjectFactory.getContentFrameworkId( the_el );
	var the_framework = ContentObjectFactory.contentobjects[cof_id];
	var cof_index = the_framework.getContentIndex();
	var the_index = the_framework.getModuleIndexFromElement( the_el );

	if( the_el.checked )
		this.disableControls( the_object, cof_index, the_index );
	else
		this.enableControls( the_object, cof_index, the_index );		
	
	return true;
}


BasicControlDisable.enableControls = function( the_object, cof_index, the_index )
{
	if( the_object.getInputList )
	{
	 	var input_list = the_object.getInputList(cof_index, the_index);
	 		
	 	for( var i = 0; i < input_list.length; i++ )
	 	{
	 		var the_el  = document.getElementById( input_list[i] );
	 		if( the_el )
	 			the_el.disabled = false;
	 	}
	}
}

BasicControlDisable.disableControls = function( the_object, cof_index, the_index )
{
	if( the_object.getInputList )
	{
	 	var input_list = the_object.getInputList(cof_index, the_index);
	 		
	 	for( var i = 0; i < input_list.length; i++ )
	 	{
	 		var the_el  = document.getElementById( input_list[i] );
	 		if( the_el )
	 			the_el.disabled = true;
	 	}
	}
}