else{
var theCell=theRow.insertCell(j);
theCell.style.cssText="background-color:#F0F0F0;cursor:default;";
}
}
}
//**调整日历位置//
var offsetPos=calendar.getAbsolutePos(calendar.source);//计算对像的位置;
if((document.body.offsetHeight-(offsetPos.y+calendar.source.offsetHeight-document.body.scrollTop))
1<calendar.calendarpad.style.pixelheight){ caltop="offsetPos.y+calendar.source.offsetHeight;" else{="" if((document.body.offsetwidth-(offsetpos.x+calendar.source.offsetwidth-document.body.scrollleft))="" var="" }="">calendar.calendarPad.style.pixelWidth){
2var calLeft=offsetPos.x;
3}
4else{
5var calLeft=calendar.source.offsetLeft+calendar.source.offsetWidth;
6}
7//alert(offsetPos.x);
8calendar.calendarPad.style.pixelLeft=calLeft;
9calendar.calendarPad.style.pixelTop=calTop;
10}
11/****************** 计算对像的位置 *************************/
12this.getAbsolutePos = function(el) {
13var r = { x: el.offsetLeft, y: el.offsetTop };
14if (el.offsetParent) {
15var tmp = calendar.getAbsolutePos(el.offsetParent);
16r.x += tmp.x;
17r.y += tmp.y;
18}
19return r;
20};</calendar.calendarpad.style.pixelheight){>