function FocusStartField() { if (document.bf.StartDate.value=='DD/MM/YYYY') { document.bf.StartDate.value=''; } Calendar(1,36,0); } function FocusEndField() { if (document.bf.EndDate.value=='DD/MM/YYYY') { document.bf.EndDate.value=''; } Calendar(2,72,0); } function Calendar(type, mtop, mleft) { var FC = document.all.Cal; if (FC.style.display=='none') { FC.style.marginTop = mtop; FC.style.marginLeft = mleft; if (type==1) { document.bf.calmode.value="1"; } else { document.bf.calmode.value="2"; } Cal.DisplayCalendar(-1,-1); FC.style.display = "block"; } else { FC.style.display = "none"; } }