function CalendarRestore() /// Clear Data
{
var i,j,oTable
oTable=$(this.sTABLEID)
for(i=1;i<oTable.rows.length;i++)
{
for(j=0;j<oTable.rows[i].cells.length;j++)
{
CalendarCellSetCss(0,oTable.rows[i].cells[j]);
oTable.rows[i].cells[j].innerHTML=" ";
}
}
}
function CalendarRefresh(newDate) ///
{
this.currDate=newDate; //alert(newDate);
this.Restore();
this.Fill();
}
function CalendarCellsMsOver(e,oInstance) /// Cell MouseOver
{
var myCell = eventMatchObj(e); //event.srcElement;
CalendarCellSetCss(0,oInstance.oPreviousCell);
if(myCell)
{
CalendarCellSetCss(1,myCell);
oInstance.oPreviousCell=myCell;
}
}
function CalendarCellsMsOut(e,oInstance) // Cell MouseOut
{
var myCell = eventMatchObj(e);
CalendarCellSetCss(0,myCell);
}
function CalendarYearChange(oInstance) /// Year Change
{
var sDay,sMonth,sYear,newDate
sDay=oInstance.currDate.getDate();
sMonth=oInstance.currDate.getMonth();
sYear=$(oInstance.sYEARID).value
newDate=new Date(sYear,sMonth,sDay);
oInstance.Refresh(newDate);
}
function CalendarMonthChange(oInstance) /// Month Change
{
var sDay,sMonth,sYear,newDate
sDay=oInstance.currDate.getDate();
sMonth=$(oInstance.sMONTHID).value
sYear=oInstance.currDate.getFullYear();
newDate=new Date(sYear,sMonth,sDay);
oInstance.Refresh(newDate);
}
function checkTime(sHour,sMinute,sSecond,oInstance){ //参数是input里填的时间
var oldTime=new Array(oInstance.currDate.getHours(),oInstance.currDate.getMinutes(),oInstance.currDate.getSeconds()); //初始化时的时间
var r,re;
re=/\d/i;
r=sHour.match(re);
if(r!=null && sHour>=0 && sHour<24 && sHour!="") oldTime[0]=sHour;
else document.getElementById(oInstance.sHOURID).value=oldTime[0];
r=sMinute.match(re);
if(r!=null && sMinute>=0 && sMinute<59 && sMinute!="" ) oldTime[1]=sMinute;
else document.getElementById(oInstance.sMINUTEID).value=oldTime[1];
r=sSecond.match(re);
if(r!=null && sSecond>=0 && sSecond<59 && sSecond!="" ) oldTime[2]=sSecond;
else document.getElementById(oInstance.sSECONDID).value=oldTime[2];
return oldTime;
}//+stz
{
var i,j,oTable
oTable=$(this.sTABLEID)
for(i=1;i<oTable.rows.length;i++)
{
for(j=0;j<oTable.rows[i].cells.length;j++)
{
CalendarCellSetCss(0,oTable.rows[i].cells[j]);
oTable.rows[i].cells[j].innerHTML=" ";
}
}
}
function CalendarRefresh(newDate) ///
{
this.currDate=newDate; //alert(newDate);
this.Restore();
this.Fill();
}
function CalendarCellsMsOver(e,oInstance) /// Cell MouseOver
{
var myCell = eventMatchObj(e); //event.srcElement;
CalendarCellSetCss(0,oInstance.oPreviousCell);
if(myCell)
{
CalendarCellSetCss(1,myCell);
oInstance.oPreviousCell=myCell;
}
}
function CalendarCellsMsOut(e,oInstance) // Cell MouseOut
{
var myCell = eventMatchObj(e);
CalendarCellSetCss(0,myCell);
}
function CalendarYearChange(oInstance) /// Year Change
{
var sDay,sMonth,sYear,newDate
sDay=oInstance.currDate.getDate();
sMonth=oInstance.currDate.getMonth();
sYear=$(oInstance.sYEARID).value
newDate=new Date(sYear,sMonth,sDay);
oInstance.Refresh(newDate);
}
function CalendarMonthChange(oInstance) /// Month Change
{
var sDay,sMonth,sYear,newDate
sDay=oInstance.currDate.getDate();
sMonth=$(oInstance.sMONTHID).value
sYear=oInstance.currDate.getFullYear();
newDate=new Date(sYear,sMonth,sDay);
oInstance.Refresh(newDate);
}
function checkTime(sHour,sMinute,sSecond,oInstance){ //参数是input里填的时间
var oldTime=new Array(oInstance.currDate.getHours(),oInstance.currDate.getMinutes(),oInstance.currDate.getSeconds()); //初始化时的时间
var r,re;
re=/\d/i;
r=sHour.match(re);
if(r!=null && sHour>=0 && sHour<24 && sHour!="") oldTime[0]=sHour;
else document.getElementById(oInstance.sHOURID).value=oldTime[0];
r=sMinute.match(re);
if(r!=null && sMinute>=0 && sMinute<59 && sMinute!="" ) oldTime[1]=sMinute;
else document.getElementById(oInstance.sMINUTEID).value=oldTime[1];
r=sSecond.match(re);
if(r!=null && sSecond>=0 && sSecond<59 && sSecond!="" ) oldTime[2]=sSecond;
else document.getElementById(oInstance.sSECONDID).value=oldTime[2];
return oldTime;
}//+stz