function link(indice,area)
{
	var percorso = "/tv/palinsesti/";
	var curDay = giorno + indice;
	var dataPrn = new Date(anno, mese-1, curDay);

	year=0;
	if (dataPrn.getYear()<2000)
		year=1900;

	document.write('<a href="' + percorso + area + '/' + (year+dataPrn.getYear()) + pad((dataPrn.getMonth()+1),'0',2) + pad(dataPrn.getDate(),'0',2) + '.shtml">' + pad(dataPrn.getDate(),'0',2));
}

function pad(s, c, l)
{
	var tmp = new String(s);
	while (tmp.length<l)
		tmp = c + tmp;
	return tmp;
}
