hv.editors = [];
hv.editorJsLoaded = 0;
hv.renderEditors = function(){
	var fckEdit = $('textarea.editor');
	if(fckEdit.size()){
		if(!hv.editorJsLoaded){
			$('<script src="/rsrc/fckeditor/fckeditor.js" type="text/javascript"></script>').insertAfter('body');
		}
		fckEdit.each(function(){
				var id = $(this).attr('id');
				hv.editors[hv.editors.length] = id;
				oFCKeditor = new FCKeditor(id);
				oFCKeditor.BasePath = '/rsrc/fckeditor/';
				var ele = $('#'+id);
				if(ele.attr('hvKeepSize')){
					var height = parseInt(ele.height());
					if(height){
						oFCKeditor.Height = height + 80;
					}
					oFCKeditor.Width = ele.width();
				}else{
					oFCKeditor.Height = 300;
					oFCKeditor.Width = 720;
				}
				
				oFCKeditor.ReplaceTextarea();
			});
    }
	}
hv.startUp(hv.renderEditors);
hv.updateTexts = function(){
	if(hv.editors){
		for(var i = 0; i < hv.editors.length; i++){
			FCKeditorAPI.GetInstance(hv.editors[i]).UpdateLinkedField()
		}
	}
}
