<!--
function return_status(status){
	if (status==false){
    	document.getElementById('options1').style.display = 'none';
        document.getElementById('options2').style.display = 'inline';
	}else{
    	document.getElementById('options2').style.display = 'none';
        document.getElementById('options1').style.display = 'inline';
	}
}
FCK = true;
function switchEditor(id,WITH) {

    if(FCK) {

	if(WITH == 'false'){
        if(!confirm('Switch to text editor? all HTML will lost')) {
            return false;
        }
	}

    	document.getElementById(id + '___Frame').style.visibility = 'hidden';
        document.getElementById(id + '___Frame').style.position = 'absolute';
        document.getElementById('plain_text').style.visibility = 'visible';
        document.getElementById('plain_text').style.position = 'static';
        document.getElementById('use').value = 'plain';
        oEditorApi = FCKeditorAPI.GetInstance('FCK_text');
        var editorText = oEditorApi.GetHTML();
        oEditorApi.SetHTML('');

	if(WITH == 'false'){

        while(editorText.search('<\/p>') != -1) {
            editorText = editorText.replace('<\/p>', "\n");
        }

        while(editorText.search(/<\/?[^>]*>/) != -1) {
            editorText = editorText.replace(/<\/?[^>]*>/, '');
        }
	}


        document.getElementById('plain_text').value = editorText;
        FCK = false
    } else {

        oEditorApi = FCKeditorAPI.GetInstance('FCK_text');
        var Plain = document.getElementById('plain_text').value;
        document.getElementById('plain_text').value = '';
        while(Plain.indexOf("\n") != -1) {
            Plain = Plain.replace("\n", "<br />");
            Plain = Plain.replace("\r", "");
        }
        oEditorApi.SetHTML(Plain);
    	document.getElementById(id + '___Frame').style.visibility = 'visible';
        document.getElementById(id + '___Frame').style.position = 'static';
        document.getElementById('plain_text').style.visibility = 'hidden';
        document.getElementById('plain_text').style.position = 'absolute';
        document.getElementById('use').value = 'FCK';
        FCK = true;
    }

   return true;
}

//-->