var now = new Date();

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate the number of the current month.
var month = ((now.getMonth() +1 <10) ? "0" : "")+ (now.getMonth()+1);

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}
// Join it all together for mysql-format
today =  (fourdigits(now.getYear())) + "-" + month + "-" + date;


function t_neu(f) {
    f.neu.value = today;
}
function t_aktiviert(f) {
    f.aktiviert.value = today;
}
function t_aussortiert(f) {
    f.aussortiert.value = today;
}
function t_erneuert(f) {
    f.erneuert.value = today;
}
function t_lastsung(f) {
    f.last_gesungen.value = today;
}
function t_vortrag(f) {
    f.vortrag.value = today;
}

function askData(f) {
var heute =  prompt ("Datum Format YYMMDD oder YYYY-MM-DD ",today );
if (confirm("ist das Datum \'"+heute+"\' korrekt?")) {
alert ("Ok, Datum "+heute+" wurde eintragen");
}
else {
alert ("Datum "+heute+", wird nicht eingetragen.");
   }
   f.nDate.value = heute
}

