function htmldate_validate(name)
{
	var d = YAHOO.util.Dom;
	var year, month, day, hour, minute, second;
	year = (c = d.get(name + '_y')) ? c.value : 2000;
	month = (c = d.get(name + '_m')) ? (c.value - 1) : 0;
	day = (c = d.get(name + '_d')) ? c.value : 1;
	hour = (c = d.get(name + '_h')) ? c.value : 0;
	minute = (c = d.get(name + '_mi')) ? c.value : 0;
	second = (c = d.get(name + '_s')) ? c.value : 0;
	
	var date = new Date(year, month, day, hour, minute, second);
	
	return date.getFullYear() == year && date.getMonth() == month &&
		date.getDate() == day && date.getHours() == parseInt(hour, 10) &&
		date.getMinutes() == parseInt(minute, 10) && date.getSeconds() == parseInt(second, 10);
}
