rem: var xfrom = $('datefrom'); var xto = $('dateto'); 
add: var xfrom = $('dateFrom'); var xto = $('dateTo'); 
context: function setDates(what) {	var xfrom = $('datefrom');	var xto = $('dateto');		if (what==0) //anytime 	{ 		xfrom.value = "";		xto.value = "";		return;	}	//BUILDS to DATE STRING AND UPDATES INPUT	today=new Date();	fday = today.getDate();	if (fday.toString().length==1) 		fday = "0"+fday.toString();	fmonth = today.getMonth()+1; //Month is 0-11 in JavaScript	if (fmonth.toString().length==1) 		fmonth = "0"+fmonth.toString();	fyear = today.getYear();	if (fyear<1900) 		fyear = fyear + 1900;		var todate = fyear+"-"+fmonth+"-"+fday+"T23:59:59";	var fromdate = (fyear-10)+"-"+fmonth+"-"+fday+"T00:00:00";	xto.value = todate;	xfrom.value = fromdate;}
meta: 6986	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6986/11a144d6e8b1a404f6cf02474be439d30f310dd5/gn_search.js/buggy/web/geonetwork/scripts/gn_search.js