Código PHP:
function setWidth(tWidth, tMode, dWidth, dDigits) {
if (tWidth > 0) {
titleWidth=tWidth;
}
if (tMode == 1 || tMode == 2) {
titleMode=tMode;
}
if (dWidth > 0) {
dayWidth=dWidth;
}
if (dDigits > 0) {
dayDigits=dDigits;
}
}
function setColor(tColor, dsColor, bColor, dColor, cdColor, fColor, bdColor) {
if (tColor != "") {
titleColor=tColor;
}
if (dsColor != "") {
daysColor=dsColor;
}
if (bColor != "") {
bodyColor=bColor;
}
if (dColor != "") {
dayColor=dColor;
}
if (cdColor != "") {
currentDayColor=cdColor;
}
if (fColor != "") {
footColor=fColor;
}
if (bdColor != "") {
borderColor=bdColor;
}
}
function setFontColor(tColorFont, dsColorFont, dColorFont, cdColorFont, fColorFont) {
if (tColorFont != "") {
titleFontColor=tColorFont;
}
if (dsColorFont != "") {
daysFontColor=dsColorFont;
}
if (dColorFont != "") {
dayFontColor=dColorFont;
}
if (cdColorFont != "") {
currentDayFontColor=cdColorFont;
}
if (fColorFont != "") {
footFontColor=fColorFont;
}
}
function setFormat(format) {
calFormat = format;
}
function setSize(width, height, ox, oy) {
if (width > 0) {
calWidth=width;
}
if (height > 0) {
calHeight=height;
}
calOffsetX=ox;
calOffsetY=oy;
}
function setWeekDay(wDay) {
if (wDay == 0 || wDay == 1) {
weekDay = wDay;
}
}
function setMonthNames(janName, febName, marName, aprName, mayName, junName, julName, augName, sepName, octName, novName, decName) {
if (janName != "") {
yxMonths[0] = janName;
}
if (febName != "") {
yxMonths[1] = febName;
}
if (marName != "") {
yxMonths[2] = marName;
}
if (aprName != "") {
yxMonths[3] = aprName;
}
if (mayName != "") {
yxMonths[4] = mayName;
}
if (junName != "") {
yxMonths[5] = junName;
}
if (julName != "") {
yxMonths[6] = julName;
}
if (augName != "") {
yxMonths[7] = augName;
}
if (sepName != "") {
yxMonths[8] = sepName;
}
if (octName != "") {
yxMonths[9] = octName;
}
if (novName != "") {
yxMonths[10] = novName;
}
if (decName != "") {
yxMonths[11] = decName;
}
}
function setDayNames(sunName, monName, tueName, wedName, thuName, friName, satName) {
if (sunName != "") {
yxDays[0] = sunName;
yxDays[7] = sunName;
}
if (monName != "") {
yxDays[1] = monName;
}
if (tueName != "") {
yxDays[2] = tueName;
}
if (wedName != "") {
yxDays[3] = wedName;
}
if (thuName != "") {
yxDays[4] = thuName;
}
if (friName != "") {
yxDays[5] = friName;
}
if (satName != "") {
yxDays[6] = satName;
}
}
function setLinkNames(closeLink, clearLink) {
if (closeLink != "") {
yxLinks[0] = closeLink;
}
if (clearLink != "") {
yxLinks[1] = clearLink;
}
}
function addCalendar(name, title, field, form) {
cals[cals.length] = new calOBJ(name, title, field, form);
}
function findCalendar(name) {
for (var i = 0; i < cals.length; i++) {
if (cals[i].name == name) {
if (cals[i].form == null) {
if (cals[i].formName == "") {
if (document.forms[0]) {
cals[i].form = document.forms[0];
}
}
else if (document.forms[cals[i].formName]) {
cals[i].form = document.forms[cals[i].formName];
}
}
return cals[i];
}
}
return null;
}
function getDayName(y,m,d) {
var wd=new Date(y,m,d);
return yxDays[wd.getDay()].substring(0,3);
}
function getMonthFromName(m3) {
for (var i = 0; i < yxMonths.length; i++) {
if (yxMonths[i].toLowerCase().substring(0,3) == m3.toLowerCase()) {
return i;
}
}
return 0;
}