function CalcDiffDate(StartDate,EndDate)
{
	// if user change end date (+3 by default, let s change the bookings'
	var difference = 0;
	var Diffdays = 0;
	difference = EndDate - StartDate; 
	// difference is in milliseconds ; *1000 to get the seconds ; X 60 to get minutes; etc..
	Diffdays = Math.round(difference/(1000*60*60*24));
	return Diffdays;
}

function IsDate(mydate)
{
	var mydate, myresult ;
	var mydate = new Date(mydate);
	isNaN(mydate)? myresult=false : myresult=true ;
	return myresult ;
}
