 function inc(filename, type) {
	var body = document.getElementsByTagName('body').item(0);
	var head = document.getElementsByTagName('head').item(0);
	if (type=='text/javascript') {
		script = document.createElement('script');
		script.src = filename;
		script.type = type;
		body.appendChild(script)
		}
	if (type=='text/css') {
		script = document.createElement('link');
		script.href = filename;
		script.type = type;
		script.rel="stylesheet" ;
		head.appendChild(script)
		}
}

//inc ('http://www.plus2festival.com/api/agendaPlus2festival.js', 'text/javascript') ;
inc ('http://www.plus2festival.com/api/style/lightWeightAgenda.css', 'text/css') ;
function requestAgenda(requestDate, id) {
  $.ajax({
  dataType: 'jsonp',
  data: 'date='+requestDate,
  jsonp: 'jsonp_callback',
  url: 'http://www.plus2festival.com/api/requestAgenda.php',
  success: function (data) {
    $('#'+id).append(data) ;
  }
  }) ;
}
/*
function initAgenda() {
	inc ('http://www.plus2festival.com/lib/js/jquery/jquery-1.2.3.pack.js', 'text/javascript') ;
	inc ('http://www.plus2festival.com/playground/agendaPlus2festival.js', 'text/javascript') ;
}
*/
/*
if ( !jQuery.isReady ) {
	if (typeof jQuery == "undefined" || typeof jQuery.modal == "undefined" ) {
	alert ('no jquery have to load it') ;
	inc ('http://www.plus2festival.com/lib/js/jquery/jquery-1.2.3.pack.js', 'text/javascript') ;
	}
}
*/


//inc ('http://www.plus2festival.com/style/v2/general.css', 'text/css') ;