if(content!=document.body){ //alert(1);
if(posleft+oInstance.Width <content.scrollWidth){ //alert(2);
//maskDiv.style.left=posleft-content.scrollLeft; //alert(postop-content.scrollTop);
//maskDiv.style.top=postop-content.scrollTop;
maskDiv.style.left=posleft-content.scrollLeft;//alert(postop-content.scrollTop);
maskDiv.style.top=postop-content.scrollTop;
}else{ //alert(3);
maskDiv.style.pixelLeft=content.offsetWidth+parseInt(content.currentStyle.paddingLeft)+parseInt(content.currentStyle.paddingRight)-oInstance.Width; //中间多那些是因为content的scrollWidth没算入padding的空间
maskDiv.style.pixelTop=postop-content.scrollTop;
}
}
//alert(maskDiv);
}else{
showMark(oInstance);
//-------这段和上面的完全一样
if(content!=document.body){ //alert(1);
if(posleft+oInstance.Width <content.scrollWidth){ //alert(2);
//maskDiv.style.left=posleft-content.scrollLeft; //alert(postop-content.scrollTop);
//maskDiv.style.top=postop-content.scrollTop;
maskDiv.style.left=posleft-content.scrollLeft;//alert(postop-content.scrollTop);
maskDiv.style.top=postop-content.scrollTop;
}else{ //alert(3);
maskDiv.style.pixelLeft=content.offsetWidth+parseInt(content.currentStyle.paddingLeft)+parseInt(content.currentStyle.paddingRight)-oInstance.Width; //中间多那些是因为content的scrollWidth没算入padding的空间
maskDiv.style.pixelTop=postop-content.scrollTop;
}
}
//-------这段和上面的完全一样
}
}
// CalendarDiv.focus();
}
}
function CalendarCellSetCss(sMode,oCell) /// Set Cell Css
{
// sMode
// 0: OnMouserOut 1: OnMouseOver
if(sMode)
{
oCell.style.border="1px solid #5589AA";
oCell.style.backgroundColor="#BCD0DE";
}
else
{
oCell.style.border="1px solid #FFFFFF";
oCell.style.backgroundColor="#FFFFFF";
}
}
function CalendarGetMaxDay(nowYear,nowMonth) /// Get MaxDay of current month
{
var nextMonth,nextYear,currDate,nextDate,theMaxDay
nextMonth=nowMonth+1;
if(nextMonth>11)
{
nextYear=nowYear+1;
nextMonth=0;
}
else
{
nextYear=nowYear;
}
currDate=new Date(nowYear,nowMonth,1);
nextDate=new Date(nextYear,nextMonth,1);
theMaxDay=(nextDate-currDate)/(24*60*60*1000);
return theMaxDay;
}
function CalendargetPos(el,ePro) /// Get Absolute Position
{
var ePos=0;
while(el!=null)
{
ePos+=el["offset"+ePro];
el=el.offsetParent;
}
return ePos;
}
function CalendargetScroll(el,ePro) /// +stz
{
var ePos=0;
while(el!=null)
{
ePos+=el["scroll"+ePro];
el=el.offsetParent;
}
return ePos;
}
function CalendarDblNum(num)
{
if(num < 10)
return "0"+num;
else
return num;
}
function CalendarCancel(oInstance) ///Cancel
{
var CalendarDiv=$(oInstance.sDIVID);
CalendarDiv.style.display="none";
showMark(oInstance);
}
function CalendarClear(oInstance)
{
oInstance.oTaget.value="";
}
if(posleft+oInstance.Width <content.scrollWidth){ //alert(2);
//maskDiv.style.left=posleft-content.scrollLeft; //alert(postop-content.scrollTop);
//maskDiv.style.top=postop-content.scrollTop;
maskDiv.style.left=posleft-content.scrollLeft;//alert(postop-content.scrollTop);
maskDiv.style.top=postop-content.scrollTop;
}else{ //alert(3);
maskDiv.style.pixelLeft=content.offsetWidth+parseInt(content.currentStyle.paddingLeft)+parseInt(content.currentStyle.paddingRight)-oInstance.Width; //中间多那些是因为content的scrollWidth没算入padding的空间
maskDiv.style.pixelTop=postop-content.scrollTop;
}
}
//alert(maskDiv);
}else{
showMark(oInstance);
//-------这段和上面的完全一样
if(content!=document.body){ //alert(1);
if(posleft+oInstance.Width <content.scrollWidth){ //alert(2);
//maskDiv.style.left=posleft-content.scrollLeft; //alert(postop-content.scrollTop);
//maskDiv.style.top=postop-content.scrollTop;
maskDiv.style.left=posleft-content.scrollLeft;//alert(postop-content.scrollTop);
maskDiv.style.top=postop-content.scrollTop;
}else{ //alert(3);
maskDiv.style.pixelLeft=content.offsetWidth+parseInt(content.currentStyle.paddingLeft)+parseInt(content.currentStyle.paddingRight)-oInstance.Width; //中间多那些是因为content的scrollWidth没算入padding的空间
maskDiv.style.pixelTop=postop-content.scrollTop;
}
}
//-------这段和上面的完全一样
}
}
// CalendarDiv.focus();
}
}
function CalendarCellSetCss(sMode,oCell) /// Set Cell Css
{
// sMode
// 0: OnMouserOut 1: OnMouseOver
if(sMode)
{
oCell.style.border="1px solid #5589AA";
oCell.style.backgroundColor="#BCD0DE";
}
else
{
oCell.style.border="1px solid #FFFFFF";
oCell.style.backgroundColor="#FFFFFF";
}
}
function CalendarGetMaxDay(nowYear,nowMonth) /// Get MaxDay of current month
{
var nextMonth,nextYear,currDate,nextDate,theMaxDay
nextMonth=nowMonth+1;
if(nextMonth>11)
{
nextYear=nowYear+1;
nextMonth=0;
}
else
{
nextYear=nowYear;
}
currDate=new Date(nowYear,nowMonth,1);
nextDate=new Date(nextYear,nextMonth,1);
theMaxDay=(nextDate-currDate)/(24*60*60*1000);
return theMaxDay;
}
function CalendargetPos(el,ePro) /// Get Absolute Position
{
var ePos=0;
while(el!=null)
{
ePos+=el["offset"+ePro];
el=el.offsetParent;
}
return ePos;
}
function CalendargetScroll(el,ePro) /// +stz
{
var ePos=0;
while(el!=null)
{
ePos+=el["scroll"+ePro];
el=el.offsetParent;
}
return ePos;
}
function CalendarDblNum(num)
{
if(num < 10)
return "0"+num;
else
return num;
}
function CalendarCancel(oInstance) ///Cancel
{
var CalendarDiv=$(oInstance.sDIVID);
CalendarDiv.style.display="none";
showMark(oInstance);
}
function CalendarClear(oInstance)
{
oInstance.oTaget.value="";
}