function checkDate(dateToCheck)
	{
	var present = new Date();
	var future = new Date();
	var year;
	var month; 
	var day; 

	var blackbox = ""; 
	if(window.RegExp)
		{
		blackbox = "+";
		var DateReg = new RegExp("(\\d+)\\D+(\\d+)\\D+(\\d+)"); 
		var matches;
		if((matches = DateReg.exec(dateToCheck)) == null)
			{
			alert("Please enter a valid date: " + dateToCheck); 
			return false; 
			}
			
		//alert("Year: " + matches[3] + "; Month: " + matches[1] + "; Day: " + matches[2] ); 
		year = parseInt(matches[3], 10); 
		month = parseInt(matches[1], 10) - 1; 
		day = parseInt(matches[2], 10); 
		}
	else
		{
		blackbox = "-";

		var parts = dateToCheck.split("/"); 

		year = parseInt(parts[2], 10);
		month = parseInt(parts[0], 10) - 1;
		day = parseInt(parts[1], 10); 
		}

	//alert("Year: " + year + "; Month: " + month + "; Day: " + day ); 
	if(year < 1950) 
		year += 2000;
	
	future.setFullYear(year, month, day)

	future.setHours = 0;
	future.setMinutes = 0;
	future.setSeconds = 0;
	future.setSeconds = 0;

	//alert(future); 
	difference = future.getTime() - present.getTime();
	//alert(future.toLocaleString() + " - " + present.toLocaleString() + " = " + difference);
	if(difference < 10 * 24 * 60 * 60 * 1000)
		{
		alert("Due to processing and shipping time, your order may not arrive in time for the testing date you have entered."); 
		return false;
		}
	return true; 
	}


