function createEvent()
{

/*
 * Create a single event
 */ 
var userName = "webmaster@vexinenmarche.com";
var password = "vexinenmarche";

// Create the calendar service object
var calendarService = new google.gdata.calendar.CalendarService('GoogleInc-jsguide-1.0');
//calendarService.setUserCredentials(userName,password);
logMeIn();
  
  
// The default "private/full" feed is used to insert event to the 
// primary calendar of the authenticated user
var feedUri = "http://www.google.com/calendar/feeds/webmaster@vexinenmarche.com/private/full";



var evtTab=evt.split("_");

var log = '';

for (var i=0;i<evtTab.length;i++)
{
	var entTab=evtTab[i].split(";");
	alert(evtTab[i]);
	
	// Create an instance of CalendarEventEntry representing the new event
	var entry = new google.gdata.calendar.CalendarEventEntry();

	// Set the title of the event
	entry.setTitle(google.gdata.Text.create(entTab[0]));


	// Set the calendar location
	
	var where = new google.gdata.Where();
	where.setValueString(entTab[1] + ", France");
	entry.addLocation(where);
	
	// Set the color that represent this calendar in the Google Calendar UI
	var color = new google.gdata.calendar.ColorProperty();
	//color.setValue('#2952A3');
	//entry.setColor(color);	
	
	// Set the calendar summary
	entry.setContent(google.gdata.Text.create(entTab[2])); 

	
	// Create a When object that will be attached to the event
	var when = new google.gdata.When();

	// Set the start and end time of the When object
	var startTime = google.gdata.DateTime.fromIso8601(entTab[3]);
	//var startTime = google.gdata.DateTime.fromIso8601("2008-08-27T09:00:00.000-08:00");
	var endTime = google.gdata.DateTime.fromIso8601(entTab[4]);
	when.setStartTime(startTime);
	when.setEndTime(endTime);

	// Add the When object to the event 
	entry.addTime(when);
	
	// The callback method that will be called after a successful insertion from insertEntry()
	var callback = function(result) {
	alert("Event created");
	//log= log + evtTab[i];
	  
	  //document.LOGS.value=log;
	}

	// Error handler will be invoked if there is an error from insertEntry()
	var handleError = function(error) {
	  alert("There was an error!");
	  alert(error.cause ? error.cause.statusText : error.message);
	}
	
	// Submit the request using the calendar service object
	calendarService.insertEntry(feedUri, entry, callback, 
	    handleError, google.gdata.calendar.CalendarEventEntry);
		
	//document.getElementById("LOGS").innerHTML=evtTab[i];
	
}
	



	
}

function logMeIn() {
  scope = "http://www.google.com/calendar/feeds/";
  var token = google.accounts.user.login(scope);
}

function setupMyService() {
  myService = new google.gdata.calendar.CalendarService('exampleCo-exampleApp-1');
  logMeIn();
}
