📄 calendar.js
字号:
if (oremovecounter >= 1) {
oshowingsticky = 0;
}
if ((ns4) || (ie4) || (ns6)) {
if (oshowingsticky == 0) {
oallowmove = 0;
if (over != null) {
hideObject(over);
}
} else {
oremovecounter++;
}
}
return true;
}
function overlib350() {
var layerhtml;
if (obackground != "" || ofullhtml) {
layerhtml = ol_content_background(otext, obackground, ofullhtml);
} else {
if (ofgbackground != "" && ocss == CSSOFF) {
ofgbackground = "BACKGROUND=\"" + ofgbackground + "\"";
}
if (obgbackground != "" && ocss == CSSOFF) {
obgbackground = "BACKGROUND=\"" + obgbackground + "\"";
}
if (ofgcolor != "" && ocss == CSSOFF) {
ofgcolor = "BGCOLOR=\"" + ofgcolor + "\"";
}
if (obgcolor != "" && ocss == CSSOFF) {
obgcolor = "BGCOLOR=\"" + obgcolor + "\"";
}
if (oheight > 0 && ocss == 51) {
oheight = "HEIGHT=" + oheight;
} else {
oheight = "";
}
if (ocap == "") {
layerhtml = ol_content_simple(otext);
} else {
if (osticky) {
layerhtml = ol_content_caption(otext, ocap, oclose);
} else {
layerhtml = ol_content_caption(otext, ocap, "");
}
}
}
if (osticky) {
oshowingsticky = 1;
oremovecounter = 0;
}
layerWrite(layerhtml);
if (oautostatus > 0) {
ostatus = otext;
if (oautostatus > 1) {
ostatus = ocap;
}
}
oallowmove = 0;
if (otimeout > 0) {
if (otimerid > 0) {
clearTimeout(otimerid);
}
otimerid = setTimeout("cClick()", otimeout);
}
disp(ostatus);
if (osticky) {
oallowmove = 0;
return false;
} else {
return true;
}
}
function ol_content_simple(text) {
if (ocss == CSSCLASS) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=" + oborder + " CELLSPACING=0 class=\"" + obgclass + "\"><TR><TD><TABLE WIDTH=90% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\"" + ofgclass + "\"><TR><TD VALIGN=TOP><FONT class=\"" + otextfontclass + "\">" + text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";
}
if (ocss == CSSSTYLE) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=" + oborder + " CELLSPACING=0 style=\"background-color: " + obgcolor + ";height: " + oheight + oheightunit + ";\"><TR><TD><TABLE WIDTH=90% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: " + ofgcolor + ";background-color: " + ofgcolor + ";height: " + oheight + oheightunit + ";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: " + otextfont + ";color: " + otextcolor + ";font-size: " + otextsize + otextsizeunit + ";text-decoration: " + otextdecoration + ";font-weight: " + otextweight + ";font-style:" + otextstyle + "\">" + text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";
}
if (ocss == CSSOFF) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=" + oborder + " CELLSPACING=0 " + obgcolor + " " + oheight + "><TR><TD><TABLE WIDTH=90% BORDER=0 CELLPADDING=2 CELLSPACING=0 " + ofgcolor + " " + ofgbackground + " " + oheight + "><TR><TD VALIGN=TOP><FONT FACE=\"" + otextfont + "\" COLOR=\"" + otextcolor + "\" SIZE=\"" + otextsize + "\">" + text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";
}
set_background("");
return txt;
}
function ol_content_caption(text, title, close) {
closing = "";
closeevent = "onMouseOver";
if (ocloseclick == 1) {
closeevent = "onClick";
}
if (ocapicon != "") {
ocapicon = "<IMG SRC=\"" + ocapicon + "\"> ";
}
if (close != "") {
if (ocss == CSSCLASS) {
closing = "<TD ALIGN=RIGHT><A HREF=\"/\" " + closeevent + "=\"return cClick();\" class=\"" + oclosefontclass + "\">" + close + "</A></TD>";
}
if (ocss == CSSSTYLE) {
closing = "<TD ALIGN=RIGHT><A HREF=\"/\" " + closeevent + "=\"return cClick();\" style=\"color: " + oclosecolor + ";font-family: " + oclosefont + ";font-size: " + oclosesize + oclosesizeunit + ";text-decoration: " + oclosedecoration + ";font-weight: " + ocloseweight + ";font-style:" + oclosestyle + ";\">" + close + "</A></TD>";
}
if (ocss == CSSOFF) {
closing = "<TD ALIGN=RIGHT><A HREF=\"/\" " + closeevent + "=\"return cClick();\"><FONT COLOR=\"" + oclosecolor + "\" FACE=\"" + oclosefont + "\" SIZE=\"" + oclosesize + "\">" + close + "</FONT></A></TD>";
}
}
if (ocss == CSSCLASS) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=" + oborder + " CELLSPACING=0 class=\"" + obgclass + "\"><TR><TD><TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT class=\"" + ocaptionfontclass + "\">" + ocapicon + title + "</FONT></TD>" + closing + "</TR></TABLE><TABLE WIDTH=90% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\"" + ofgclass + "\"><TR><TD VALIGN=TOP><FONT class=\"" + otextfontclass + "\">" + text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";
}
if (ocss == CSSSTYLE) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=" + oborder + " CELLSPACING=0 style=\"background-color: " + obgcolor + ";background-image: url(" + obgbackground + ");height: " + oheight + oheightunit + ";\"><TR><TD><TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT style=\"font-family: " + ocaptionfont + ";color: " + ocapcolor + ";font-size: " + ocaptionsize + ocaptionsizeunit + ";font-weight: " + ocaptionweight + ";font-style: " + ocaptionstyle + ";\">" + ocapicon + title + "</FONT></TD>" + closing + "</TR></TABLE><TABLE WIDTH=90% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: " + ofgcolor + ";background-color: " + ofgcolor + ";height: " + oheight + oheightunit + ";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: " + otextfont + ";color: " + otextcolor + ";font-size: " + otextsize + otextsizeunit + ";text-decoration: " + otextdecoration + ";font-weight: " + otextweight + ";font-style:" + otextstyle + "\">" + text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";
}
if (ocss == CSSOFF) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=" + oborder + " CELLSPACING=0 " + obgcolor + " " + obgbackground + " " + oheight + "><TR><TD><TABLE WIDTH=90% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><B><FONT COLOR=\"" + ocapcolor + "\" FACE=\"" + ocaptionfont + "\" SIZE=\"" + ocaptionsize + "\">" + ocapicon + title + "</FONT></B></TD>" + closing + "</TR></TABLE><TABLE WIDTH=90% BORDER=0 CELLPADDING=2 CELLSPACING=0 " + ofgcolor + " " + ofgbackground + " " + oheight + "><TR><TD VALIGN=TOP><FONT COLOR=\"" + otextcolor + "\" FACE=\"" + otextfont + "\" SIZE=\"" + otextsize + "\">" + text + "</FONT></TD></TR></TABLE></TD></TR></TABLE>";
}
set_background("");
return txt;
}
function ol_content_background(text, picture, hasfullhtml) {
if (hasfullhtml) {
txt = text;
} else {
if (ocss == CSSCLASS) {
txt = "<TABLE WIDTH=" + owidth + owidthunit + " BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT=" + oheight + oheightunit + "><TR><TD COLSPAN=3 HEIGHT=" + opadyt + opadunit + "></TD></TR><TR><TD WIDTH=" + opadxl + opadunit + "></TD><TD VALIGN=TOP WIDTH=" + (owidth - opadxl - opadxr) + opadunit + "><FONT class=\"" + otextfontclass + "\">" + text + "</FONT></TD><TD WIDTH=" + opadxr + opadunit + "></TD></TR><TR><TD COLSPAN=3 HEIGHT=" + opadyb + opadunit + "></TD></TR></TABLE>";
}
if (ocss == CSSSTYLE) {
txt = "<TABLE WIDTH=" + owidth + owidthunit + " BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT=" + oheight + oheightunit + "><TR><TD COLSPAN=3 HEIGHT=" + opadyt + opadunit + "></TD></TR><TR><TD WIDTH=" + opadxl + opadunit + "></TD><TD VALIGN=TOP WIDTH=" + (owidth - opadxl - opadxr) + opadunit + "><FONT style=\"font-family: " + otextfont + ";color: " + otextcolor + ";font-size: " + otextsize + otextsizeunit + ";\">" + text + "</FONT></TD><TD WIDTH=" + opadxr + opadunit + "></TD></TR><TR><TD COLSPAN=3 HEIGHT=" + opadyb + opadunit + "></TD></TR></TABLE>";
}
if (ocss == CSSOFF) {
txt = "<TABLE WIDTH=" + owidth + " BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT=" + oheight + "><TR><TD COLSPAN=3 HEIGHT=" + opadyt + "></TD></TR><TR><TD WIDTH=" + opadxl + "></TD><TD VALIGN=TOP WIDTH=" + (owidth - opadxl - opadxr) + "><FONT FACE=\"" + otextfont + "\" COLOR=\"" + otextcolor + "\" SIZE=\"" + otextsize + "\">" + text + "</FONT></TD><TD WIDTH=" + opadxr + "></TD></TR><TR><TD COLSPAN=3 HEIGHT=" + opadyb + "></TD></TR></TABLE>";
}
}
set_background(picture);
return txt;
}
function set_background(pic) {
if (pic == "") {
if (ie4) {
over.backgroundImage = "none";
}
if (ns6) {
over.style.backgroundImage = "none";
}
} else {
if (ns4) {
over.background.src = pic;
} else {
if (ie4) {
over.backgroundImage = "url(" + pic + ")";
} else {
if (ns6) {
over.style.backgroundImage = "url(" + pic + ")";
}
}
}
}
}
function disp(statustext) {
if ((ns4) || (ie4) || (ns6)) {
if (oallowmove == 0) {
placeLayer();
showObject(over);
oallowmove = 1;
}
}
if (statustext != "") {
self.status = statustext;
}
}
function placeLayer() {
var placeX, placeY;
if (ofixx > -1) {
placeX = ofixx;
} else {
winoffset = (ie4) ? oframe.document.body.scrollLeft : oframe.pageXOffset;
if (ie4) {
iwidth = oframe.document.body.clientWidth;
}
if (ns4) {
iwidth = oframe.innerWidth;
}// was screwed in mozilla, fixed now?
if (ns6) {
iwidth = oframe.outerWidth;
}
if (ohauto == 1) {
if ((ox - winoffset) > ((eval(iwidth)) / 2)) {
ohpos = 7;
} else {
ohpos = 8;
}
}
if (ohpos == 9) {// Center
placeX = ox + ooffsetx - (owidth / 2);
}
if (ohpos == 8) {// Right
placeX = ox + ooffsetx;
if ((eval(placeX) + eval(owidth)) > (winoffset + iwidth)) {
placeX = iwidth + winoffset - owidth;
if (placeX < 0) {
placeX = 0;
}
}
}
if (ohpos == 7) {// Left
placeX = ox - ooffsetx - owidth;
if (placeX < winoffset) {
placeX = winoffset;
}
}
if (osnapx > 1) {
var snapping = placeX % osnapx;
if (ohpos == 7) {
placeX = placeX - (osnapx + snapping);
} else {
placeX = placeX + (osnapx - snapping);
}
if (placeX < winoffset) {
placeX = winoffset;
}
}
}
if (ofixy > -1) {
placeY = ofixy;
} else {
scrolloffset = (ie4) ? oframe.document.body.scrollTop : oframe.pageYOffset;
if (ovauto == 1) {
if (ie4) {
iheight = oframe.document.body.clientHeight;
}
if (ns4) {
iheight = oframe.innerHeight;
}
if (ns6) {
iheight = oframe.outerHeight;
}
iheight = (eval(iheight)) / 2;
if ((oy - scrolloffset) > iheight) {
ovpos = 35;
} else {
ovpos = 36;
}
}
if (ovpos == 35) {
if (oaboveheight == 0) {
var divref = (ie4) ? oframe.document.all["overDiv"] : over;
oaboveheight = (ns4) ? divref.clip.height : divref.offsetHeight;
}
placeY = oy - (oaboveheight + ooffsety);
if (placeY < scrolloffset) {
placeY = scrolloffset;
}
} else {
placeY = oy + ooffsety;
}
if (osnapy > 1) {
var snapping = placeY % osnapy;
if (oaboveheight > 0 && ovpos == 35) {
placeY = placeY - (osnapy + snapping);
} else {
placeY = placeY + (osnapy - snapping);
}
if (placeY < scrolloffset) {
placeY = scrolloffset;
}
}
}
repositionTo(over, placeX, placeY);
}
function mouseMove(e) {
if ((ns4) || (ns6)) {
ox = e.pageX;
oy = e.pageY;
}
if (ie4) {
ox = event.x;
oy = event.y;
}
if (ie5) {
ox = event.x + oframe.document.body.scrollLeft;
oy = event.y + oframe.document.body.scrollTop;
}
if (oallowmove == 1) {
placeLayer();
}
}
function cClick() {
hideObject(over);
oshowingsticky = 0;
/**
*@author:guojiahong
*/
selectedDates = getDatas4testY();
document.addunregdateclass.testY.value = "";
document.addunregdateclass.test.value = "";
return false;
}
function compatibleframe(frameid) {
if (ns4) {
if (typeof frameid.document.overDiv == "undefined") {
return false;
}
} else {
if (ie4) {
if (typeof frameid.document.all["overDiv"] == "undefined") {
return false;
}
} else {
if (ns6) {
if (frameid.document.getElementById("overDiv") == null) {
return false;
}
}
}
}
return true;
}
function layerWrite(txt) {
txt += "\n";
if (ns4) {
var lyr = oframe.document.overDiv.document;
lyr.write(txt);
lyr.close();
} else {
if (ie4) {
oframe.document.all["overDiv"].innerHTML = txt;
} else {
if (ns6) {
range = oframe.document.createRange();
range.setStartBefore(over);
domfrag = range.createContextualFragment(txt);
while (over.hasChildNodes()) {
over.removeChild(over.lastChild);
}
over.appendChild(domfrag);
}
}
}
}
function showObject(obj) {
if (ns4) {
obj.visibility = "show";
} else {
if (ie4) {
obj.visibility = "visible";
} else {
if (ns6) {
obj.style.visibility = "visible";
}
}
}
}
function hideObject(obj) {
if (ns4) {
obj.visibility = "hide";
} else {
if (ie4) {
obj.visibility = "hidden";
} else {
if (ns6) {
obj.style.visibility = "hidden";
}
}
}
if (otimerid > 0) {
clearTimeout(otimerid);
}
if (odelayid > 0) {
clearTimeout(odelayid);
}
otimerid = 0;
odelayid = 0;
self.status = "";
}
function repositionTo(obj, xL, yL) {
if ((ns4) || (ie4)) {
obj.left = xL;
obj.top = yL;
} else {
if (ns6) {
obj.style.left = xL + "px";
obj.style.top = yL + "px";
}
}
}
function opt_FRAME(frm) {
oframe = compatibleframe(frm) ? frm : ol_frame;
if ((ns4) || (ie4 || (ns6))) {
if (ns4) {
over = oframe.document.overDiv;
}
if (ie4) {
over = oframe.overDiv.style;
}
if (ns6) {
over = oframe.document.getElementById("overDiv");
}
}
return 0;
}
function opt_FUNCTION(callme) {
otext = callme();
return 0;
}
/**
* get the date selected coloring
*@param year is the current year ;
*@param month is the selected month ;
*@param day is the selected day;
*@author guojiahong
*/
function isSelected(year, month, day) {
var dates = getDatas();
for (var i = 1; i < dates.length; i++) {
if (year == dates[i][0]) {
var obj = document.getElementById(dates[i][1] + "-" + dates[i][2]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -