function cal_parse_date (str_date) {
	if(str_date==''){
		var d=new Date();
		str_date=d.getFullYear() + '/' 
				+ (d.getMonth() < 9 ? '0' : '') + (d.getMonth()+1) + '/'
				+ (d.getDate() < 10 ? '0' : '') + d.getDate()
	}

	var re_date = /^(\d+)\/(\d+)\/(\d+)$/;
	if (!re_date.exec(str_date))
		return alert("日期格式錯誤:  '" + str_date + "'");
	return (new Date (RegExp.$1, RegExp.$2-1, RegExp.$3));
}

function cal_generate_date (dt_date) {
	return (
		new String (
			dt_date.getFullYear() + '/'
			+ (dt_date.getMonth() < 9 ? '0' : '') + (dt_date.getMonth() + 1) + '/'
			+ (dt_date.getDate() < 10 ? '0' : '') + dt_date.getDate()
		)
	);
}

