var mp_SeditorInstance = false;

function mp_SaveCustomInstance(textAreaID)
{

	var val = lescape(g('TEXTAREAINSTANCECUSTOM').value);
	
	if(IsEmptyText(val))
		return;
	
	g('PROFILETEXTAREAS').innerHTML = aj_mp('setTextArea=' +  val + '&textAreaID=' + textAreaID);
}

function mp_CreateProfileTextArea()
{
	var title = document.getElementById('ProfileTextAreaTitle').value;
	var istructinos = document.getElementById('ProfileTextAreaInstructions').value;
	if(IsEmptyText(title))
		return;
	g('PROFILETEXTAREAS').innerHTML = aj_mp('profileTextAreaTitle=' + lescape(title) + '&profileTextAreaInstructions=' + lescape(istructinos));
}

function mp_EditCutomTextArea(textAreaID)
{
	g('PROFILESUMMERYAERA').innerHTML = aj_mp('editTextArea=' + textAreaID);
/*	oFCKeditor = new FCKeditor('TEXTAREAINSTANCECUSTOM') ; 
	oFCKeditor.BasePath = 'Graphics/JS/FCKeditor/'; 
	oFCKeditor.Height = 300; 
	oFCKeditor.ReplaceTextarea();  */
}

function mp_UpdateEditedTextAreaType(textAreaID)
{
	var title = g('EDITEXTAREATITLE' + textAreaID).value;
	var instructions = g('EDITEXTAREAINSTRUCTIONS' + textAreaID).value;
	g('PROFILETEXTAREAS').innerHTML = aj_mp('updateProfileTextAreaType=' + textAreaID + '&title=' + lescape(title) + '&instruct=' + lescape(instructions));
}

function mp_CancelEditedTextAreaType(areaID)
{
	g('PROFILETEXTAREAS').innerHTML = aj_mp('cancelEditProfileTextAreaAction=' + areaID);
}

function mp_EditCustomTextArea(customTextAreaID)
{
	g('CustomTextAreaItem' + customTextAreaID).innerHTML = aj_mp('editTextAreaType=' + customTextAreaID);
}

function mp_TrashCustomTextArea(customTextAreaID)
{
	g('PROFILETEXTAREAS').innerHTML = aj_mp('trashProfileTextAreaType=' + customTextAreaID);
}