/* iP MODUL: newsFlash */

FnLoad.push({ 
	sec:'administrarNoticias',
	fn: function () {
			if (!calendariIncluded) {
				csslink('/lib/calendari/calendar-green.css');
				include('/lib/calendari/calendar_stripped.js');
				include('/lib/calendari/lang/calendar-es.js');
				include('/lib/calendari/calendar-setup_stripped.js');
				calendariIncluded=true;
			} else {
				setupcalendar();
			}
	}
});

/* carrega secci */
function noticia(id) {
	showCarregant();
	jQuery.ajax({ type: "POST", url: wwwroot+'/ajax', data: 'canal='+canal+'&sec=noticias&noticia='+id, success: redirect });
	return false;
}

function setupcalendar() {
		Calendar._C = null;
		window._dynarch_popupCalendar = null;
		//if (calendariIncluded) calendari.destroy();
		calendari=Calendar.setup({ 
				inputField:'dh',
				ifFormat:'%d/%m/%Y - %H:%M', 
				button:'lanzador' 
		});
}

var calendariIncluded=false;