change your controls id and call the function one time for each id
ex.
function CalcData(idcontrol)
{
return value
}
CalcData(datastart);
CalcData(dataend);
use a idcontrol like parameter of your function
think that is the problem...
anyway past the script and error here
thanks :doh: