// JavaScript Document

function GetExpirationDate(daysPlus){
	
	today   = new Date();
	expires = GetDateByOffset(today,daysPlus);
	
	return MakeNiceDate(expires);	
}






function GetDateByOffset(fromDate, numberOfDays)
{
  if(!numberOfDays) { numberOfDays = 0; }
  if(!fromDate || fromDate == "undefined" || fromDate == "null")
  {
   fromDate = new Date();
  }
  else
  { 
   fromDate = new Date(fromDate);
  }

  Milliminutes = 1000 * 60;
  Millihours   = Milliminutes * 60;
  Millidays    = Millihours * 24;

  funcDate     = Date.parse(fromDate) + (Millidays * numberOfDays);

  return (new Date(funcDate));  
}

function MakeNiceDate(inputDate, delimiter)
{
  if(!delimiter) { delimiter = "/"; }
  inputDate = new Date(inputDate);

  funcDate = (inputDate.getMonth() + 1) + delimiter + 
             inputDate.getDate()        + delimiter + 
             inputDate.getFullYear();

  return funcDate;
}
