function daystogountil(strPriceUpDate, strFestivalDate)
{
var now = new Date();
var daystofestival = Math.floor((new Date(strFestivalDate).getTime() - now.getTime()) / (1000 * 60 * 60 * 24)); 
var daystopriceup = Math.floor((new Date(strPriceUpDate).getTime() - now.getTime()) / (1000 * 60 * 60 * 24));
strOnly = "Only ";
strTwo = "two"
strDaysUntil = " days until ";
strDaysToGo = " days to go!";
strTomorrowWhen = "Tomorrow is when ";
strTomorrow = "The Festival starts tomorrow!";
strOn = "The Festival is now on!";
strPricesUp = " ticket prices go up";
strmessage = "";
if      (daystopriceup > 1)  {strmessage = (daystopriceup+1) + strDaysUntil + strPricesUp;}
else if (daystopriceup == 1) {strmessage = strOnly + strTwo + strDaysUntil + strPricesUp;}
else if (daystopriceup == 0) {strmessage = strTomorrowWhen + strPricesUp;}
else {
      if      (daystofestival > 1)  {strmessage = strOnly + (daystofestival+1) + strDaysToGo;}
      else if (daystofestival == 1) {strmessage = strOnly + strTwo + strDaysToGo;}
      else if (daystofestival == 0) {strmessage = strTomorrow;}
      else                          {strmessage = strOn;}
     }
return strmessage     
}
