function espacio_noticias()
{
	recarga_contenido("modulos/noticias/noticias.html","pagina",carga_noticias);
}

function carga_noticias()
{
	var txtDescripcion=document.getElementById("txtDescripcion");
	var contenido_texto = new FCKeditor("rtf_Desc");
	contenido_texto.BasePath=rutaHOST+"admin/js/fckeditor/"
	contenido_texto.Width	= "100%" ;
	contenido_texto.Height	= "190px" ;
	contenido_texto.Value	= '<p>Noticia Escriba aqui</p>' ;
	contenido_texto.ToolbarSet='BasicLinevox';
	contenido_texto.Show(txtDescripcion) ;

	var txtResumen=document.getElementById("txtResumen");
	var contenido_texto = new FCKeditor("rtf_Res");
	contenido_texto.BasePath=rutaHOST+"admin/js/fckeditor/"
	contenido_texto.Width	= "100%" ;
	contenido_texto.Height	= "110px" ;
	contenido_texto.Value	= '<p>Resumen Escriba aqui</p>' ;
	contenido_texto.ToolbarSet='Basic';
	contenido_texto.Show(txtResumen) ;


	nmbPag="modulos/noticias/php/class_noticias.php";
	carga_php();
}




//funciones de la barra

function nuevo_noticias()
{
	var txtIdNoticias=document.getElementById("txtIdNoticias");
	var txtNombreNoticia=document.getElementById("txtNombreNoticia");
	var txtFechaNoticia=document.getElementById("txtFechaNoticia");
	var txtAutorNoticia=document.getElementById("txtAutorNoticia");
	var txtEditor = FCKeditorAPI.GetInstance("rtf_Desc");
 	var txtEditorRes = FCKeditorAPI.GetInstance("rtf_Res");
	

	txtEditor.SetHTML("");
	txtEditorRes.SetHTML("");
	txtNombreNoticia.value="";
	txtFechaNoticia.value="";
	txtAutorNoticia.value="";
	txtIdNoticias.value="";
}

function guardar_noticias()
{
	var hdnDescripcionTexto=document.getElementById("hdnDescripcionTexto");
	var hdnDescripcionResumen=document.getElementById("hdnDescripcionResumen");

	var txtEditor = FCKeditorAPI.GetInstance("rtf_Desc");
	hdnDescripcionTexto.value=escape(txtEditor.GetXHTML());

 	var txtEditorRes = FCKeditorAPI.GetInstance("rtf_Res");
 	hdnDescripcionResumen.value=escape(txtEditorRes.GetXHTML());

	evento_btnVinculo("click","btnGuardaNoticias","");
}

function carga_noticia(valor)
{
	evento_btnVinculo("click","btnNot_id",valor);
}

//funciones de cargado de datos

function carga_contenido_noticias(valor)
{
	arreglo=valor.split("#?#");
	var txtEditor = FCKeditorAPI.GetInstance("rtf_Desc");
	txtEditor.SetHTML(arreglo[0]);	

	var txtEditorRes = FCKeditorAPI.GetInstance("rtf_Res");
	txtEditorRes.SetHTML(arreglo[1]);	

}

//funcion de la interfas
function abreNoticia(idNoticias)
{
	nmbPag="admin/modulos/noticias/php/class_index_noticias.php";
	evento_btnVinculo("click","verNoticias",idNoticias);
}

function listaNoticias()
{
	nmbPag="admin/modulos/noticias/php/class_index_noticias.php";
	evento_btnVinculo("click","btnTodas");	
}