﻿var InfoCalendarHelper={Fs:{},RegField:function(f,uif,cb,dm)
{with(InfoCalendarHelper)
{if(!Fs[uif.id])
{Fs[uif.id]=[f,uif,cb,dm,null];uif.onclick=InfoCalendarHelper.OpenCalendar;var d=Date.parse(f.value);if(!isNaN(d))
{CFID=uif.id;AcceptDate(new Date(d));}}
else
{throw"已注册";}}},OpenCalendar:function(e)
{with(InfoCalendarHelper)
{var t=$E_T(e);var d=Fs[t.id];if(!d[4])
{d[4]=new CalendarEntity(null,d[2],{className:"Calendar"},d[3]);eval("LMGR.Reg(document, LMGR.CLICK, function(e) { InfoCalendarHelper.CloseCalendar('"+d[1].id+"'); }, null, [d[1], d[4].Body])");}
d[4].Open($X(t),$Y(t)+t.scrollHeight);CFID=t.id;}},CloseCalendar:function(id)
{with(InfoCalendarHelper)
if(Fs[id])
Fs[id][4].Close();},CFID:null,AcceptDate:function(d)
{with(InfoCalendarHelper)
{var f=Fs[CFID];f[1].value=d.getFullYear()+"年"+(d.getMonth()+1)+"月"+d.getDate()+"日";f[0].value=(d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear();if(f[4])
f[4].Close();CFID=null;}}}