// only for use with dynamically loaded divs w/FCK
// such as divs in a lightbox.



// all editors on same page/div load should have the same group key
// so that list can be cleared when new page loaded 
var cms_fck_group_key;

// store names of all editors on page here.
var cms_fck_by_name = new Array();

function CMS_FCK_register_fck(group_key, name)
{

	if (group_key != cms_fck_group_key	) {
		// user must have just updated div
		cms_fck_group_key = group_key;
		cms_fck_by_name = new Array(); 
	}
	cms_fck_by_name[cms_fck_by_name.length] = name;
}


function CMS_FCK_prepare_submit()
{
	for (i=0; i< cms_fck_by_name.length; i++ ) {
		var editor = FCKeditorAPI.GetInstance(cms_fck_by_name[i]) ;
		editor.UpdateLinkedField();
	}
}
