Javascript Calendar Page Script control

Source: Internet
Author: User
Tags border color eval getdate


<!--
//----------------------------------------------------------------------------
This is Walkingpoison according to the plum Blossom Rain Calendar control changes developed out of a calendar Javascript page script control, suitable for Microsoft IE (more than 5.0) browser
The main call function is Wpcalendar (This,[object]) Wpcalendar (this), and [object] is the control name of the control output, for two examples:
First, <input name=txt><input Type=button value= "show Calendar" onclick= "Showcalendar" (this,document.all.txt) " >
Second, <input onfocus= "Showcalendar (This)" >
The year limit for this calendar is (1000-9999)
Press the ESC key to close the control
The year and month in the display where the click will be the year and month of the Drop-down box
Click a point outside the control to close the control
/* The following is a description of Walkingpoison modification

*/

Document.writeln (' <iframe id=wpcalendarlayer name=wpcalendarlayer frameborder=0 onmouseout= ') Wpcalendar.correctposition () "

Style= "Position:absolute; width:153; height:208; z-index:9998; Display:none "></iframe>");

var wpconsts = new function () {
This._isie = (navigator.userAgent.indexOf ("MSIE") >0);
This. Mousebutton = This._isie? {
Leftbutton:1,
rightbutton:0,
Middlebutton:4
}:
{
leftbutton:0,
Rightbutton:2,
Middlebutton:1
};
};

var wpevents = new function () {


var self = this;


This.arrevents = [];


This.addlistener = function (obj, eventName, ocallback) {


VAR ret;


if (Wpconsts._isie) {


ret = Obj.attachevent ("On" + EventName, ocallback);


}


else{


ret = Obj.addeventlistener (EventName, Ocallback, false);


}


if (ret) this.arrEvents.push ({"obj": obj, "eventName": EventName, "Ocallback": Ocallback});


return ret;


};





This.clearlistener = function (obj, eventName) {


for (Var i=0;i&lt;this.arrevents.length;i++) {


if (this.arrevents[i].obj = = obj &amp;&amp; this.arrevents[i].eventname = = eventName) {


This.removelistener (obj, EventName, this.arrevents[i].ocallback);


}


}


};





This.removelistener = function (obj, eventName, ocallback) {


if (Wpconsts._isie) {


Obj.detachevent ("on" + EventName, ocallback);


}


else{


Obj.removeeventlistener (EventName, Ocallback, true);


}


};

this.initwinevents = function (Owin) {
if (!owin) return;
__firefox (Owin);
};

/* make Firefox compatible with IE event*/


function __firefox (Owin) {


if (!owin) Owin = window;


htmlelement.prototype.__definegetter__ ("Runtimestyle", Self.__element_style);


OWIN.CONSTRUCTOR.PROTOTYPE.__DEFINEGETTER__ ("Event", function () {return self.__window_event (Owin);});


event.prototype.__definegetter__ ("srcelement", self.__event_srcelement);


}


This.__element_style = function () {


return this.style;


}


This.__window_event = function (Owin) {


return __window_event_constructor ();


}


This.__event_srcelement = function () {


return this.target;


}


function __window_event_constructor (Owin) {


if (!owin) Owin = window;


if (document.all) {


return owin.event;


}


var _caller = __window_event_constructor.caller;


while (_caller!=null) {


var _argument = _caller.arguments[0];


if (_argument) {


var _temp = _argument.constructor;


if (_temp.tostring (). IndexOf ("Event")!=-1) {


return _argument;


}


}


_caller = _caller.caller;


}


return null;


}


if (Window.addeventlistener) {


__firefox ();


}


/*end firefox*/


};


function Wpcalendar () {
==================================================== parameter Setting section

=======================================================


This.bmoveable = true; Set whether the calendar can be dragged


This.datestyle = "yyyy-m-d"; Added in Ver 2.1


This.cellwidth = 21; Set the width of a single cell


This.cellheight = 20; Set the height of a cell


this.versioninfo= "Wpcanlendar version:2.59&amp; #13; Author: Walkingpoison"; Version information


This.tgtobject = null;


This.srcbutton = null; Click on the button


This.outerdate = ""; Date on which the object is stored


This.ocalendar = window.frames.wpCalendarLayer.document; Store Calendar Objects


This. style = document.getElementById ("Wpcalendarlayer"). Style; The style that holds the calendar layer


This.  MONTHINMM = This.datestyle.indexOf ("MM") &gt;=0?true:false; Added in Ver 2.1


This. DATEINDD = this.datestyle.indexOf ("dd") &gt;=0?true:false;


This.themename = "Classic"; Theme settings, determining the appearance of the calendar


This.theme = null; According to the theme settings to get the corresponding theme, in the Redraw function

Automatically set according to ThemeName
This.   Scrollyearonclick = false; Set the year in the Drop-down selection box to scroll by clicking or mouseover

Try{this. IE6 = (parsefloat (Window.navigator.appVersion.match (/msie (d+.d+)/) [1]) >=5.5)}
catch (e) {this. IE6 = False}
This.testspeed = false; Test machine speed to automatically determine whether to use filter. If you set

Is true, the following playfilter parameter setting is not valid.
this.testtimeout= 120; The test standard, in milliseconds, is less than the value of the machine speed

Fast enough
This.playfilter = this.     IE6; Set whether filter is used

This.year = new Date (). getFullYear (); The initial value of the variable that defines the year
This.month = new Date (). getmonth () +1; The initial value of the variable that defines the month
This.date = new Date (). GetDate (); The initial value of the variable that defines the day
This.   days = new Array (39); Defines an array of write dates
This.   Datecell = new Array (39); Store date Cells

This.followcodes= ""; Store the operation code to be executed after the execution of the click Calendar

This.tmptdclass = "";
This.redraw = function () {//define redraw method to redraw the entire calendar
==================================================== WEB page Display section

=====================================================
if (this.cellwidth<21) this.cellwidth=21;
if (this.cellheight<20) this.cellheight=20;
This.theme = typeof Theme[this.themename] = = "Object"? Theme[this.themename]: theme["Classic"];
var strframe; HTML code that holds the calendar layer
Strframe= ' <style> ';
With (This.theme) {
strframe+= ' body{font-family: ' +fontfamily+ ';} ';
strframe+= ' Input{color: ' +buttonfontcolor+ '; border-right: ' +buttonbordercolor+ ' 1px solid;border-

Top: ' +buttonbordercolor+ ' 1px solid;border-left: ' +buttonbordercolor+ ' 1px solid;
strframe+= ' border-bottom: ' +buttonbordercolor+ ' 1px solid;background-color: ' +buttoncolor+ '; font-

Family: ' +fontfamily+ ';} ';
strframe+= ' table.main{border:1px solid ' +bordercolor+ '; width: ' + (This.getcalendarwidth ()-2) +

' Px;height: ' + this.getmainheight () + ' Px;background-color: ' +bgcolormain+ ';} ';
strframe+= ' table.dragbar{border-top:1px solid ' +dragbarcolor+ '; border-left:1px solid

' +dragbarcolor+ '; border-right:1px solid ' +dragbarcolordark+ '; border-bottom:1px solid ' +dragbarcolordark+ ';} ';
strframe+= ' Table.head{background-color: ' +headbgcolor+ ';} ';
strframe+= ' Td.head{background-color: ' +headbgcolor+ ';} ';
strframe+= ' span.year{z-index:9999;position:absolute;top:3px;left:20px;border:1px solid

' +bordercolor+ '} ';
strframe+= ' table.year{width: ' + (This.getyearwidth ()-4) + ' px;height:140px;background-

Color: ' +bgcolormain+ '; cursor:default;} ';
strframe+= ' Span.month{z-index:9999;position:absolute;top:3px;left: ' + (This.getyearwidth () + 19)

+ ' Px;border: ' +bordercolor+ ' 1px solid} ';
strframe+= ' table.month{width: ' + (This.getmonthwidth ()-4) + ' px;height:168px;background-

Color: ' +bgcolormain+ '; cursor:default;} ';
strframe+= ' td{font-size:12px;} ';
strframe+= ' A{color: ' + Normaldayfontcolor + ';} ';
strframe+= ' table.datecell{border-top:1px solid ' +dragbarcolor+ '; border-left:1px solid

' +dragbarcolor+ '; border-right:1px solid ' +dragbarcolordark+ '; border-bottom:1px solid ' +dragbarcolordark+ ';} ';
strframe+= ' Td.calendarhead{color: ' +headfontcolor+ '; Background-color: ' +headbgcolor+ '; border:1px

Solid ' +headbgcolor+ ';} ';
strframe+= ' Td.mouseoverym{text-align:center;color: ' +mouseoverfontcolor+ '; Background-color:

' +mouseovercolor+ ';} ';
strframe+= ' Td.normalym{text-align:center;color: ' +normaldayfontcolor+ '; background-

Color: ' +normaldaycolor+ ';} ';
strframe+= ' Td.selectedym{text-align:center;color: ' +selecteddayfontcolor+ '; background-

Color: ' +selecteddaycolor+ ';} ';
strframe+= ' Td.dragbar{font-size:12px;color: ' +dragbarfontcolor+ '; width:21px;border-bottom:1px solid

' +dragbarcolor+ '; border-right:1px solid ' +dragbarcolor+ '; border-left:1px solid ' +dragbarcolordark+ '; border-top:1px Solid

' +dragbarcolordark+ ';} ';
strframe+= ' Td.mouseover{color: ' +mouseoverfontcolor+ '; Background-color:

' +mouseovercolor+ '; border:1px solid ' +bordercolor+ ';} ';
strframe+= ' td.normalday,td.grayday,td.today,td.graytoday{border-left:1px solid

' +bordercolordark+ '; border-top:1px solid ' +bordercolordark+ '; border-right:1px solid ' +bordercolor+ '; border-bottom : 1px solid

' +bordercolor+ ';} ';
strframe+= ' td.selectedday,td.selectedgrayday{border-left:1px solid ' +bordercolor+ '; border-top:1px

Solid ' +bordercolor+ '; border-right:1px solid ' +bordercolordark+ '; border-bottom:1px solid ' +bordercolordark+ ';} ';
   strframe+= ' td.normalday{color: ' +normaldayfontcolor+ '; Background-color: ' +normalDayColor+ ' ;}';
   strframe+= ' td.grayday{color: ' +graydayfontcolor+ '; Background-color: ' +grayDayColor+ ';} ';
   strframe+= ' td.today{color: ' +todayfontcolor+ '; Background-color: ' +todaycolor+ ';} ';
   strframe+= ' td.selectedday{color: ' +selecteddayfontcolor+ '; Background-color: ' + Selecteddaycolor+ ';} ';
   strframe+= ' td.selectedgrayday{color: ' +graydayfontcolor+ '; Background-color: ' + Selecteddaycolor+ ';} ';
   //  ' border-left-color: ' +bordercolor+ '; Border-top-color: ' +bordercolor+ '; border-right-

Color: ' +bordercolordark+ '; Border-bottom-color: ' +bordercolordark+ ';} ';
   strframe+= ' td.graytoday{color: ' +graydayfontcolor+ '; Background-color: ' +todayColor+ ';} ';
   //  ' border-left-color: ' +bordercolor+ '; Border-top-color: ' +bordercolor+ '; border-right-

Color: ' +bordercolordark+ '; Border-bottom-color: ' +bordercolordark+ ';} ';
  }
  strframe+= ' </style> ';
  strframe+= ' <scr ' + ' ipt> ';
  strframe+= ' if (window.addeventlistener) {parent.wpEvents.initWinEvents (window);}  /* to resolve the issue of the FF incident/*;
  strframe+= ' var datelayerx,datelayery; /* holds the mouse position of the Calendar control * *;
  strframe+= ' var bdrag=false; /* tag starts dragging/*;
  strframe+= ' var datelayer=parent.wpcalendar.style; ';
  strframe+= ' document.onmousemove=function ()  /* in the mouse movement event, if you start dragging the calendar, move the calendar * *.
  strframe+= ' {if (bdrag) {';
  strframe+= '   datelayer.left = parseInt ( Datelayer.left) + +window.event.clientx-datelayerx) + "px";/* by

After each move the mouse position is restored to the original position, so the writing and div different * *;
  strframe+= '   datelayer.top = (parseint (datelayer.top) +window.event.clienty-datelayery) + "px";}; ';
  strframe+= ' function DragStart () {  /* start calendar drag/*;
  strframe+= '  if ( Window.event.button==parent.wpconsts.mousebutton.leftbutton) {';
  strframe+= '    Datelayerx=window.event.clientx; ';
  strframe+= '   datelayery=window.event.clientY; ';
  strframe+= '   bdrag=true;} ';
  strframe+= ' function dragend () {  /* End calendar drag/*;
  strframe+= '  bdrag= false;} ';
  strframe+= ' document.onmousedown=function () { /* Closes the selection list for year and month when clicked * *;
   strframe+= '  var Obj=document.getelementbyid ("Tmpselectyearlayer"); if (!bfromyear&&event.srcelement!

=document.getelementbyid ("Calendaryearhead") &&obj.style.display!= "None" {obj.style.display= "none"; Byearlistopening=true} ';
strframe+= ' Obj=document.getelementbyid ("Tmpselectmonthlayer"); if (event.srcelement!

=document.getelementbyid ("Calendarmonthhead") &&obj.style.display!= "none") obj.style.display= "none";
strframe+= ' var strtempclass= ';
strframe+= ' Document.oncontextmenu=function () {if (!event.ctrlkey) return false; /* Prohibit the presence of the right button menu * *;
strframe+= ' function mOver (obj)

{strtempclass=obj.classname;obj.classname= "Mouseoverym"; byearlistopening=false;/* the normal use of the scroll up function to display the year list

*/}/*/month selection List mouseover processing * *;
  strframe+= ' function mout (obj) {obj.classname=strtempclass;} ///month select list of mouseout processing * *;
  strframe+= ' function setmonth (imonth) {parent.wpCalendar.setMonth (imonth)}/* Select the processing of the month "*";
  strframe+= ' function setyear (iyear) {parent.wpCalendar.setYear (iyear)}/* the processing of the selected year * * *;
  strframe+= ' var bscrolling=false;var byearlistopening=true;/* This variable is used to control when the year list is just displayed, where the mouse is

Do not scroll in the case where the scroll bar is up;
Strframe+= ' var iscroll=null; ';
Strframe+= ' var bfromyear=false; /* flag is clicked from the year Drop-down list so that the year list is not closed.
strframe+= ' function scrollyear (bUp) {';
Strframe+= ' var Otable=document.getelementbyid ("Tmpselectyearlayer"). Childnodes[0]; ';
strframe+= ' if (bUp) {';
Strframe+= ' var imin=parseint (otable.rows[1].cells[0].innerhtml.replace (/\d/g, '));
strframe+= ' if (imin>1000) {otable.deleterow (otable.rows.length-2); var otd=otable.insertrow

(1). InsertCell (0); ';
strframe+= ' otd.innerhtml= (iMin-1). toString () + "year"; Otd.onmouseover=function ("MOver

(this) "); Otd.onmouseout=function (" Mout "); ';
strframe+= ' Otd.onmousedown=function ("setyear (" + (iMin-1). toString () + ")"); otd.classname=

(imin-1==parent.wpcalendar.year?) Selectedym ":" Normalym ");
strframe+= ' if (bscrolling) window.settimeout ("Scrollyear (True)", 100;}} ';
strframe+= ' else{';
Strframe+= ' var imax=parseint (otable.rows[otable.rows.length-2].cells[0].innerhtml.replace) (/

\d/g, "");
strframe+= ' if (imax<=9999) {var otd=otable.insertrow (otable.rows.length-1). InsertCell

(0); Otable.deleterow (1); ';
strframe+= ' otd.innerhtml= (imax+1). toString () + "year"; Otd.onmouseover=function ("MOver

(this) "); Otd.onmouseout=function (" Mout "); ';
strframe+= ' Otd.onmousedown=function ("setyear (" + (imax+1). toString () + ")"); otd.classname=

(imax+1==parent.wpcalendar.year?) Selectedym ":" Normalym ");
strframe+= ' if (bscrolling) window.settimeout ("Scrollyear (False)", 100;}} ';
strframe+= '} ';
strframe+= ' function Startscroll (otd,bup) {bfromyear=true;if (!byearlistopening) {bscrolling=true;scrollyear

(bUp);} ';
strframe+= ' function Stopscroll () {byearlistopening=false;bfromyear=false;bscrolling=false;if (IScroll)

Cleartimeout (iscroll);} ';
strframe+= ' </scr ' + ' ipt> ';
With (this) {
strframe+= ' <div style= ' z-index:9999;position:absolute; left:0; top:0, "onselectstart=" return

False ">";
strframe+= ' <span id=tmpselectyearlayer class= "year" style= "Display:none;" ></span> ';
strframe+= ' <span id=tmpselectmonthlayer class= "month" style= "Display:none;" ></span> ';
strframe+= ' <table border=1 cellspacing=0 cellpadding=0 bordercolor= "' + Theme.bordercolor + '"

class= "main" > ";
strframe+= ' <tr><td width= ' + (Getcalendarwidth ()-2) + ' height= ' + (cellheight) + '

Class= "Head" ><table border=0 cellspacing=1 cellpadding=0 width= ' + (Getcalendarwidth ()-4) + ' height= ' + cellheight + ' > ';
strframe+= ' <tr align=center><td width=16><input title= ' forward January ' Type=button ';
strframe+= ' value= ' < "onclick=" Parent.wpCalendar.goPrevMonth () "

Ondblclick= "Parent.wpCalendar.goPrevMonth ()" onfocus= "This.blur ()" style= "FONT-SIZE:12PX; width:16px; Height: ' +

(cellheight-2) + ' px ' > ';
strframe+= ' </td><td width= ' + getyearwidth () + ' align=center class=calendarhead style= ' font

-size:12px;cursor:default "';
strframe+= ' onmouseover= ' classname= ' mouseover ' onmouseout= ' classname= ' calendarhead ' ';
strframe+= ' onclick= ' Parent.wpCalendar.selectYear (this.innerHTML.substring (0,4)) "title=" Click here to select

Year "Id=calendaryearhead></td> ';
strframe+= ' <td width= ' + getmonthwidth () + ' Align=center class=calendarhead ' style=

Size:12px;cursor:default "onmouseover=" classname= ' mouseover ' ";
strframe+= ' onmouseout= ' classname= ' Calendarhead ' onclick=

(This.innerHTML.replace (/\d/g, ') ")";
strframe+= ' title= ' Click here to select the month ' id=calendarmonthhead></td> ';
strframe+= ' <td width=16><input type=button value= ">"

Onclick= "Parent.wpCalendar.goNextMonth ()" ondblclick= "Parent.wpCalendar.goNextMonth ()" ";
strframe+= ' onfocus= ' This.blur () "title=" Back to the January "style=" FONT-SIZE:12PX; width:16px;

Height: ' + (cellheight-2) + ' px ' ></td></tr> ';
strframe+= ' </table></td></tr> ';
strframe+= ' <tr><td width= ' + (Getcalendarwidth ()-4) + ' height= ' + (cellheight) + ' align=center> ';
strframe+= ' <table align=center border=1 cellspacing=0 cellpadding=0 bgcolor= ' +theme.bgcolormain+ ' +

(bmoveable?) ' Onmousedown= ' DragStart () "onmouseup=" Dragend () "':");
strframe+= ' class= ' dragbar ' width= ' + (Getcalendarwidth ()-6) + ' height= ' + (cellheight) + '

style= "cursor: ' + (bmoveable? ' Move ': ' Default ' + ' > ';
strframe+= ' <tr align=center valign=bottom><td class=dragbar> day </td> ';
strframe+= ' <td class=dragbar> one </td><td class=dragbar> two </td> ';
strframe+= ' <td class=dragbar> three </td><td class=dragbar> four </td> ';
strframe+= ' <td class=dragbar> five </td><td class=dragbar> six </td></tr> ';
strframe+= ' </table></td></tr> ';
strframe+= ' <tr><td width= ' + (Getcalendarwidth ()-2) + ' height= ' + getbodyheight () + '

Align=center> ';
strframe+= ' <table align=center border=1 cellspacing=2 cellpadding=0 class= ' Datecell '

Bordercolor= ' +theme.bordercolor+ ' bgcolor= ' +theme.bgcolorlight+ ' width= ' + (Getcalendarwidth ()-4) + ' height= ' +

Getbodyheight () + ' > ';
var n=0; for (j=0;j<5;j++) {strframe+= ' <tr align=center> '; for (i=0;i<7;i++) {
strframe+= ' <td width= ' + (cellwidth) + ' height= ' + (cellheight) + ' Id=wpdatecell ' +n+ ' ></td> '; n++;
strframe+= ' </tr> ';}
strframe+= ' <tr align=center> ';
for (i=35;i<39;i++) strframe+= ' <td width= ' + (cellwidth) + ' height= ' + (cellheight) + '

Id=wpdatecell ' +i+ ' ></td> ';
strframe+= ' <td colspan=3 align=right class=calendarhead onclick=parent.wpcalendar.close ()

Style= "font-size:12px;cursor:pointer;padding-right:5px" "title=" ' + Versioninfo + ' & #13; ' + Theme.versioninfo + ' > ';
   strframe+= '         <a href= "javascript:void (0);" > Close </a></td></tr> ';
   strframe+= '     </table></td></tr><tr><td> ';
   strframe+= '         <table border=0 cellspacing=1 Cellpadding=0 width=100% class= "Head" >;
   strframe+= '           <tr><td align= Left><table border=0 cellspacing=0 cellpadding=0><tr><td><input

Type=button value= "<<" title= "forward over 1 years" onclick= "Parent.wpCalendar.goPrevYear ()" ";
strframe+= ' ondblclick= ' parent.wpCalendar.goPrevYear () "onfocus=" This.blur () "

Style= "WIDTH:20PX;FONT-SIZE:12PX; Height: ' + (cellheight) + ' px ' ><td width= "1" ></td><td><input title= "Turn forward January"

Type=button ';
strframe+= ' value= ' < "onclick=" Parent.wpCalendar.goPrevMonth () "

Ondblclick= "Parent.wpCalendar.goPrevMonth ()" onfocus= "This.blur ()" style= "WIDTH:16PX;FONT-SIZE:12PX; Height: ' +

(cellheight) + ' px ' ></td></tr></table></td><td ';
strframe+= ' Align=center><input Type=button value=today

Onclick= "Parent.wpCalendar.selectToday ()" ";
strframe+= ' onfocus= ' This.blur () "title=" The current date "style=" FONT-SIZE:12PX; Height: ' +

(cellheight) + ' px; Cursor:pointer "></td><td '";
strframe+= ' align=right><table border=0 cellspacing=0 cellpadding=0><tr><td><input

Type=button value= ">" onclick= "Parent.wpCalendar.goNextMonth ()" ";
strframe+= ' ondblclick= ' Parent.wpCalendar.goNextMonth () "onfocus=" This.blur () "title=" to

After turning January "style=" WIDTH:16PX;FONT-SIZE:12PX; Height: ' + (cellheight) + ' px ' ><td width= ' 1 ' ></td><td><input ';
strframe+= ' Type=button value= ">>" title= "Backwards 1 Years"

Onclick= "Parent.wpCalendar.goNextYear ()" ondblclick= "Parent.wpCalendar.goNextYear ()" ";
strframe+= ' onfocus= ' This.blur () "style=" WIDTH:20PX;FONT-SIZE:12PX; Height: ' +

(cellheight) + ' px ' ></td></tr></table></td> ';
   strframe+= ' </tr></table></td></tr></table></div> ';
  }

  this.ocalendar.writeln (Strframe);
  this.ocalendar.close ()   //Troubleshooting IE progress bar not ending
  this. Style.width = this.getcalendarwidth ();   //sets the width of the external iframe
  this. Style.height = this.getcalendarheight ();   //sets the height of the external iframe
  
  this. monthinmm= this.datestyle.indexOf ("MM") >=0?true:false;
  this. dateindd = this.datestyle.indexOf ("DD") >=0?true:false;
  //test speed
  if (this.testspeed) {
   var t=new Date (); var s= "";
   for (var i=1;i<10000;i++) {s= (s.length>=500?) ": S+" ");}
   if (New Date ()-t<=this.testtimeout) This.playfilter = this. IE6
   else this.playfilter = false;
   delete t;delete s;
  }

for (i=0;i<39;i++)
{
This. Datecell[i] = this.oCalendar.getElementById (' Wpdatecell ' +i);
var da = this. Datecell[i];
Da.style.cursor = "pointer";
Da.style.filter = "Progid:DXImageTransform.Microsoft.Fade (duration=0.5,overlap=0.5)";
Da.style.fontWeight = "bold";
Da.onmouseover = Wpmouseover;
Da.onmouseout = Wpmouseout;
Da.onclick = Function ("Wpcalendar.datecellclick" ("+i+")); Assign the OnClick event to TD

The processing
}

==================================================== WEB page Display section

======================================================
}
This. Redraw = This.redraw;

The custom Calendar cell width is set, and the following function is used to get the calendar width based on the cell width


This.getcalendarwidth = function () {


return parseint (THIS.CELLWIDTH*7+6);


};


This.getyearwidth = function () {//Get the width of the year part displayed


Return parseint ((this.cellwidth*7+2)-32) *0.53);


};


This.getmonthwidth = function () {//Get the width of the month part displayed


Return parseint ((this.cellwidth*7+2)-32) *0.47);


};


This.getcalendarheight = function () {


Return (this.cellheight+2) *9 + 10;


};


This.getmainheight = function () {


return this.cellheight*8;


};


This.getbodyheight = function () {


return this.cellheight*6;


};


This.selectmonth = function (strmonth) {//Display month selection list


if (Strmonth.match (/d/)!=null) return;


var m = (strmonth)? Strmonth:new Date (). getmonth () + 1;


var s = ';


s + = ' &lt;table border=0 cellspacing=0 cellpadding=0 class= ' month ' &gt; ';


for (Var i=1;i&lt;=12;i++) {


s + = ' &lt;tr&gt;&lt;td class= ' + (I==parseint (strmonth)? Selectedym ': ' Normalym ') + ' onmouseover= ' mOver (This)

Onmouseout= "Mout (This)" onmousedown= "setmonth (' +i+ ')" &gt; ' + i + ' month ' + ' &lt;/td&gt;&lt;/tr&gt; ';


}


s + + ' &lt;/table&gt; ';


This.oCalendar.getElementById ("Tmpselectmonthlayer"). InnerHTML = S;


This.oCalendar.getElementById ("Tmpselectmonthlayer"). style.display= "";


};


This.selectyear = function (stryear) {//Show year select list, and year list can scroll


if (Stryear.match (/d/)!=null) return;


var m = (stryear)? Stryear:new Date (). getFullYear ();


if (M &lt; 1000 | | | m &gt; 9999) return;


var n = m-5;


if (n &lt; 1000) n = 1000;


if (n + &gt; 9999) n = 9900;


var s = ';


With (This.theme) {


s + = ' &lt;table border=0 cellspacing=0 cellpadding=0 class= ' year ' &gt; ';


if (this. Scrollyearonclick) {


s + = ' &lt;tr&gt;&lt;td height=5 bgcolor= ' +bgcolorlight+ '

onmouseover= "this.bgcolor= ' +bgcolormain+" "onmouseout=" Stopscroll (); this.bgcolor= ' +bgcolorlight+ ' "' +
' onclick= ' return false ' onmousedown= ' Startscroll (this,true) ' onmouseup= ' Stopscroll () "

Title= "rolling up year" ></td></tr>;
}
else{
s + = ' <tr><td height=5 bgcolor= ' +bgcolorlight+ ' onmouseover= ' Startscroll

(this,true); this.bgcolor= ' +bgcolormain+ ' "onmouseout=" Stopscroll (); this.bgcolor= ' +bgcolorlight+ ' "' +
' onclick= ' return false ' title= ' scroll up year ' ></td></tr> ';
}
for (Var i=n;i<n+12;i++) {
s + = ' <tr><td class= ' + (I==parseint (stryear)? Selectedym ': ' Normalym ') + '

Onmouseover= "MOver (This)" onmouseout= "Mout (This)" onmousedown= "setyear (' +i+ ')" > ' + i + ' year ' + ' </td></tr > ';
}
if (this. Scrollyearonclick) {
s + = ' <tr><td height=5 bgcolor= ' + this.theme.bgColorLight + '

onmouseover= "this.bgcolor= ' +bgcolormain+" "onmouseout=" Stopscroll (); this.bgcolor= ' +bgcolorlight+ ' "' +
' onclick= ' return false ' onmousedown= ' Startscroll (this,false) "onmouseup=" Stopscroll

() "title=" scrolling down Year "></td></tr>";
}
else{
s + = ' <tr><td height=5 bgcolor= ' + this.theme.bgColorLight + ' onmouseover= ' Startscroll

(this,false); this.bgcolor= ' +bgcolormain+ ' "onmouseout=" Stopscroll (); this.bgcolor= ' +bgcolorlight+ ' "' +
' onclick= ' return false ' title= ' scroll down year ' ></td></tr> ';
}
s + + ' </table> ';
}
This.oCalendar.getElementById ("Tmpselectyearlayer"). InnerHTML = S;
This.oCalendar.getElementById ("Tmpselectyearlayer"). style.display= "";
};

This.close = function () {//Close Calendar control
This.oCalendar.getElementById ("Tmpselectyearlayer"). style.display= "None";
This.oCalendar.getElementById ("Tmpselectmonthlayer"). style.display= "None";
This. Style.display= "None";
};

function Getdaysofmonth (year,month) {//Get the number of days of the month of a year
Return (new Date (year,month,0)). GetDate ());
}

This.goprevyear=function () {//Turn forward year


if (this.year &gt; 1000 &amp;&amp; this.year &lt;10000) {this.year--;


This.writecalendar ();}


};


This.gonextyear=function () {//Turn over year


if (This.year &gt; 999 &amp;&amp; this.year &lt;9999) {this.year++;


This.writecalendar ();}


};


This.selecttoday=function () {//today Button


var today;


This.year = new Date (). getFullYear ();


This.month = new Date (). getmonth () +1;


Today=new Date (). GetDate ();


if (this.month&lt;10 &amp;&amp; this. MONTHINMM) this.month= "0" + this.month; Added in Ver 2.1


if (today&lt;10 &amp;&amp; this. DATEINDD) today= "0" + today;


Writecalendar (Wpcalendar.year,wpcalendar.month);


if (this.tgtobject) {


This.tgtobject.value=this.datestyle.replace (this. Dateindd? " DD ":" D "), today). Replace (" yyyy ",

This.year). replace (this. Monthinmm? " MM ":" M "), This.month);
  }
  this.close ();
  if (this.followcodes!= "") eval (this.followcodes);
 };
 this.goprevmonth=function () {  //forward month
  if (this.month>1) {This.month--}else {this.year--;this.month=12;}
  this.writecalendar ();
 };
 this.gonextmonth=function () {  //Backward month
  if (this.month==12) {this.year++; this.month=1}else{this.month++}
  this.writecalendar ();
 
 this.setdatestyle= function (Datestyle) { //
  this.datestyle=datestyle
To set the date format,   this.redraw ();
 };
 this.settheme=function (themename) { //Sets the theme to the corresponding name
  this.themename=themename;
  this.redraw ();
 };

This.setmonth=function (i) {//Set the month of the calendar to a month value with a range of 1~12.
if (isNaN (i) | | i<=0| | I>12) return;
This.month=parseint (i);
This.writecalendar ();
};
This.setyear=function (i) {//sets the value of year for calendar with a range of 1000~9999.
if (isNaN (i) | | i<=999| | i>9999) return;
This.year=parseint (i);
This.writecalendar ();
};
This.setyearmonth=function (year, month) {//Set calendar year and month respectively, the range of the year is the same.
if (isNaN) | | year<=999| | year>9999) return;
if (isNaN (month) | | month<=0| | MONTH>12) return;
This.year=parseint (year);
This.month=parseint (month);
This.writecalendar ();
};

This.writecalendar=function () {//main write program **********


var yy = This.year;


var mm = This.month;


Years of writing to the head


This.oCalendar.getElementById ("Calendaryearhead"). InnerHTML = yy + "year";


This.oCalendar.getElementById ("Calendarmonthhead"). InnerHTML = mm + "month";





for (var i = 0; i &lt; i++) {//Initialize border


This. Datecell[i].bordercolorlight=this.theme.bordercolor;


This. Datecell[i].bordercolordark=this.theme.bordercolordark;


}


var day1 = 1,day2=1,firstday = new Date (yy,mm-1,1). Getday (); The week of the first day of the month


var year, month;


for (i=0;i&lt;firstday;i++) {//Last month's section


Year = Mm==1?yy-1:yy;


Month= mm==1?12:mm-1;


This. Days[i]=new Wpday (year, Month, Getdaysofmonth (year,month)-firstday+i+1); Last few days of last month


}


for (i = FirstDay day1 &lt; Getdaysofmonth (yy,mm) +1; i++) {//This month's section


This. Days[i]=new Wpday (yy, MM, day1);d ay1++;


}


For (I=firstday+getdaysofmonth (yy,mm); i&lt;39;i++) {//next month's part


Year = Mm==12?yy+1:yy;


Month= mm==12?1:mm+1;


This. Days[i]=new Wpday (year, month, day2);d ay2++;


}


for (i=0; i&lt;39; i++)


{


var da = this. Datecell[i];


if (This.outerdate &amp;&amp; this. Days[i].equals (this.outerdate)) {


if (i&lt;8 &amp;&amp; this. days[i].day&gt;20 | | I&gt;=28 &amp;&amp; this. days[i].day&lt;12) da.classname= "Selectedgrayday"


else da.classname= "Selectedday";


Da.bordercolorlight=this.theme.bordercolordark;


Da.bordercolordark=this.theme.bordercolor;


}


else if (this. Days[i].equals (New Date ()) {


if (i&lt;8 &amp;&amp; this. days[i].day&gt;20 | | I&gt;=28 &amp;&amp; this. days[i].day&lt;12) da.classname= "Graytoday"


else da.classname= "Today";


}


else{


if (i&lt;8 &amp;&amp; this. days[i].day&gt;20 | | I&gt;=28 &amp;&amp; this. days[i].day&lt;12) da.classname= "Grayday"


else da.classname= "Normalday";


}


Da.innerhtml=this. Days[i].day;


Da.title=this. Days[i].date;


}


};

 this.datecellclick=function (n) { //Click on the Display box to select the date, the main input function *************
  if (this.tgtobject) {
   this.tgtobject.value= this. Days[n].date; //modified in Ver 2.51
   this.close (); This.tgtObject.blur ();
  &NBSP}
  else {this.close (); alert ("The control object you want to output does not exist!") ");}
  if (this.followcodes!= "") eval (this.followcodes);
 };

 //A function that corrects the calendar position when the mouse moves out of the IFRAME, making the calendar more difficult to stop
 //* but the calendar still stops when the mouse moves too fast and MouseMove events occur outside the
 this.correctposition = function () {
  var Calendarwindow = window.frames.wpCalendarLayer;
  if (Calendarwindow.bdrag) {
   var x = Event.clientx-calendarwindow.datelayerx;
   var y = event.clienty-calendarwindow.datelayery;
   this. Style.left = (x<0?0:x) + "px";
   this. Style.top = (y<0?0:y) + "px";
  }
 };

 var self = this; //is used for the following internal functions to access the Wpcalendar object itself
 function wpmouseover () {
  if ( Self.playfilter) This.filters[0]. Apply ();
  //After your set Apply, changes to the Odiv object
  //  are not displayed until is called.
  self.tmptdclass = This.classname;
  this.classname   = "MouseOver";
  if (Self.playfilter) this.filters[0]. Play ();
 }
 function wpmouseout () {
  if (self.playfilter) this.filters[0]. Apply ();
  this.classname = Self.tmptdclass;
  if (Self.playfilter) this.filters[0]. Play ();
 }

An abstract Date object that initializes an argument for the date of the month, with a range of 1 to 12.
Function Wpday (year, month, day) {
This.year = year;
This.month = month;
This.day = day;
var mm=month;var n=day;
if (Month < && self. MONTHINMM) mm = "0" + mm;
if (Day < && self. DATEINDD) n = "0" + N;
Prompt text to be completely consistent with the output format, good to be proven
This.date = Self.datestyle.replace (self. Dateindd? " DD ":" D "), N). Replace (" yyyy ", year). Replace

(self. Monthinmm? " MM ":" M "), MM);

A function that determines whether it is equal to another date, and the accepted parameter is a Date object
This.equals = function (eDate) {
Try{return this.year==edate.getfullyear () && this.month==edate.getmonth () +1 &&

This.day==edate.getdate ();}
catch (e) {return false}
}
}
}

function Calendartheme () {


This.versioninfo = ""; Version information for the topic


this.fontfamily = ""; Font


This.bordercolor = ""; Border color


This.bordercolordark = ""; Border Dark Color


This.bgcolormain = ""; Calendar Main background color


This.bgcolorlight = ""; The light background color of the calendar


This.headbgcolor = ""; Calendar Head Background color


This.headfontcolor = ""; Calendar Header Font Color


This.mouseovercolor = ""; Background color for mouse movement


This.mouseoverfontcolor = ""; Font color for mouse movement


This.buttonbordercolor = ""; button border Color


This.buttoncolor = ""; The main color of the button


This.buttonfontcolor = ""; Button text color


This.dragbarfontcolor = ""; Drag the text color of a bar


This.dragbarcolor = ""; Drag the border color of a bar


This.dragbarcolordark = ""; Drag the border of the bar the color of the dark


This.normaldaycolor = ""; Background color of the date


This.normaldayfontcolor = ""; Font color for dates


This.graydaycolor = ""; Background color Other than this month's date


This.graydayfontcolor = ""; Font colors other than this month's date


This.todaycolor = ""; Background color of the current date


This.todayfontcolor = ""; Font color for current date


This.selecteddaycolor = ""; Background color for selected dates


This.selecteddayfontcolor= ""; Font color for selected dates


}


Setday=showcalendar; Keep the old calling way


function Showcalendar ()//Keynote


{


var obj;


if (Arguments.length = = 0) {alert ("Sorry!)" You have not returned any arguments to this control! "); return;}


var tt=arguments[0];


Wpcalendar.followcodes= ""; Initializes the contents of the Followcodes each time it is invoked


if (arguments.length==2) {


if (typeof (arguments[1]) = = "Object") Obj=arguments[1]


else if (typeof (arguments[1]) = = "string") wpcalendar.followcodes=arguments[1];


}else if (arguments.length==3) {


OBJ=ARGUMENTS[1];


WPCALENDAR.FOLLOWCODES=ARGUMENTS[1];


}





var dads = Wpcalendar.style;


var th = TT;


var ttop = tt.offsettop; High anchor point of TT control


var thei = tt.clientheight; The height of the TT control itself


var twid = tt.clientwidth; Wide//added in Ver 2.2 of the TT control itself


var tleft = Tt.offsetleft; Location point width of the TT control


var Ttyp = Tt.type; Type of the TT control


while (TT = tt.offsetparent) {ttop+=tt.offsettop; tleft+=tt.offsetleft;}


At the same time meet 1. The total height is enough to fit the calendar control; 2. The height of the lower remaining height of the calendar control, 3. When the top height is greater than the height of the Calendar control 3 conditions Calendar

will appear in the top
if (document.body.clientheight>211 + thei && document.body.clientheight-(ttop-document.body.scrolltop) <211+thei &&

ttop-document.body.scrolltop>211)//added in Ver 2.1
Dads.top = ttop-211
else Dads.top = (ttyp== "image")? ttop+thei:ttop+thei+6;
var cwidth = Wpcalendar.getcalendarwidth ();
if (document.body.clientwidth-(tleft-document.body.scrollleft) <cwidth && Tleft-document.body.scrollleft>cwidth)

Added in Ver 2.2
Dads.left = tleft + Twid-cwidth + ((ttyp== "image")? 0:4)
else Dads.left = Tleft;
Wpcalendar.tgtobject =!obj? Th:obj;
Wpcalendar.srcbutton =!obj? null:th; Set the external click button
Displays the year of the calendar according to the date of the current input box
var reg = new RegExp ("^" + wpCalendar.datestyle.replace (wpcalendar.dateindd?) DD ":" D ")," (\d{1,2}) "). Replace

("yyyy", "(\d{4})"). Replace (wpcalendar.monthinmm?) MM ":" M ")," (\d{1,2}) ") +" $ "); Added in Ver 2.1
var r = WpCalendar.tgtObject.value.match (reg);
if (r!=null) {
var t=getindex ();
R[t[2]]=r[t[2]]-1;
if (WpCalendar.datestyle.indexOf ("D") <0) r[t[3]]=1; Use a "D" to cover two different situations

Added in Ver 2.1
var d= new Date (R[t[1]], r[t[2]],r[t[3]);
if (D.getfullyear () ==r[t[1]] && d.getmonth () ==r[t[2]] && d.getdate () ==r[t[3]]) {
Wpcalendar.outerdate=d; Save an external incoming date
}
else wpcalendar.outerdate= "";
Wpcalendar.year =parseint (r[t[1]);
Wpcalendar.month=parseint (R[t[2]]) +1;
}
else{
Wpcalendar.outerdate= "";
Wpcalendar.year =new Date (). getFullYear ();
Wpcalendar.month=new Date (). getmonth () + 1;
}
Wpcalendar.writecalendar ();
Dads.display = ';

Event.returnvalue=false;

function GetIndex () {//returns the location of the month and day, based on the date format//added in Ver 2.1
var i,j;
var m=eval ("New Array" (WpCalendar.datestyle.indexOf ("yyyy"), WpCalendar.datestyle.indexOf ("M") "+

(WpCalendar.datestyle.indexOf ("D") >=0 ", WpCalendar.datestyle.indexOf (" D ")": "") + ")"; Use a "M" and a "D" to

including two cases
var t=new Array ();
for (i=1;i<=m.length;i++) {
T[i]=1;
for (j=1;j<=m.length;j++) if (i!=j && m[i-1]>m[j-1]) t[i]++;
}
if (m.length<3) t[3]=3;
return t;
}
}


Wpevents.addlistener (document, "click", Function () {//Turn off the control on any click
With (window.event)
if (srcelement!= wpcalendar.tgtobject && srcelement!= Wpcalendar.srcbutton)
Wpcalendar.close ();
});

Wpevents.addlistener (document, "KeyUp", function () {//press ESC key to close, toggle focus off
if (window.event.keycode==27) {
if (wpcalendar.tgtobject) WpCalendar.tgtObject.blur ();
Wpcalendar.close ();
}
else if (document.activeelement)
if (document.activeelement!= wpcalendar.tgtobject && document.activeelement!= Wpcalendar.srcbutton)
Wpcalendar.close ();
});

var theme=new Object ();

theme["Classic"]=new calendartheme ();


theme["Classic"].versioninfo = "Subject: Classic Author: Walkingpoison"; Version information for the topic


theme["Classic"].fontfamily = "song Body"; Font


theme["Classic"].bordercolor = "#FF9900"; Border color


theme["Classic"].bordercolordark = "#FFFFFF"; Border Dark Color


theme["Classic"].bgcolormain = "#FF9900"; Calendar Main background color


theme["Classic"].bgcolorlight = "#FFF8EC"; The light background color of the calendar


theme["Classic"].headbgcolor = "#FFFFFF"; Calendar Head Background color


theme["Classic"].headfontcolor = "#000000"; Calendar Header Font Color


theme["Classic"].mouseovercolor = "#FFD700"; Background color for mouse movement


theme["Classic"].mouseoverfontcolor = "#000000"; Font color for mouse movement


theme["Classic"].buttonbordercolor = "#FF9900"; button border Color


theme["Classic"].buttoncolor = "#FFF8EC"; The main color of the button


theme["Classic"].buttonfontcolor = "#000000"; Button text color


theme["Classic"].dragbarfontcolor = "#FFFFFF"; Drag the text color of a bar


theme["Classic"].dragbarcolor = "#FF9900"; Drag the border color of a bar


theme["Classic"].dragbarcolordark = "#FFFFFF"; Drag the border of the bar the color of the dark


theme["Classic"].normaldaycolor = "#E0E0E0"; Background color of the date


theme["Classic"].normaldayfontcolor = "#000000"; Font color for dates


theme["Classic"].graydaycolor = "#E0E0E0"; Background color Other than this month's date


theme["Classic"].graydayfontcolor = "#808080"; Font colors other than this month's date


theme["Classic"].todaycolor = "#FFD700"; Background color of the current date


theme["Classic"].todayfontcolor = "#000000"; Font color for current date


theme["Classic"].selecteddaycolor = "#00FFFF"; Background color for selected dates


theme["Classic"].selecteddayfontcolor= "#000000"; Font color for selected dates

theme["NewAge"]=new calendartheme ();


theme["NewAge"].versioninfo = "Subject: NewAge Author: Walkingpoison"; Version information for the topic


theme["NewAge"].fontfamily = "song Body"; Font


theme["NewAge"].bordercolor = "#336699"; Border color


theme["NewAge"].bordercolordark = "#FFFFFF"; Border Dark Color


theme["NewAge"].bgcolormain = "#336699"; Calendar Main background color


theme["NewAge"].bgcolorlight = "#F0F8FF"; The light background color of the calendar


theme["NewAge"].headbgcolor = "#FFFFFF"; Calendar Head Background color


theme["NewAge"].headfontcolor = "#000000"; Calendar Header Font Color


theme["NewAge"].mouseovercolor = "#add8e6"; Background color for mouse movement


theme["NewAge"].mouseoverfontcolor = "#000000"; Font color for mouse movement


theme["NewAge"].buttonbordercolor = "#336699"; button border Color


theme["NewAge"].buttoncolor = "#F0F8FF"; The main color of the button


theme["NewAge"].buttonfontcolor = "#000000"; Button text color


theme["NewAge"].dragbarfontcolor = "#FFFFFF"; Drag the text color of a bar


theme["NewAge"].dragbarcolor = "#336699"; Drag the border color of a bar


theme["NewAge"].dragbarcolordark = "#336699"; Drag the border of the bar the color of the dark


theme["NewAge"].normaldaycolor = "#fff0f5"; Background color of the date


theme["NewAge"].normaldayfontcolor = "#000000"; Font color for dates


theme["NewAge"].graydaycolor = "#fff0f5"; Background color Other than this month's date


theme["NewAge"].graydayfontcolor = "#808080"; Font colors other than this month's date


theme["NewAge"].todaycolor = "#add8e6"; Background color of the current date


theme["NewAge"].todayfontcolor = "#000000"; Font color for current date


theme["NewAge"].selecteddaycolor = "#336699"; Background color for selected dates


theme["NewAge"].selecteddayfontcolor= "#FFFFFF"; Font color for selected dates

theme["Nostalgia"]=new calendartheme ();


theme["Nostalgia"].versioninfo = "Subject: Nostalgia Author: Walkingpoison"; Version information for the topic


theme["Nostalgia"].fontfamily = "song Body"; Font


theme["Nostalgia"].bordercolor = "#CC3300"; Border color


theme["Nostalgia"].bordercolordark = "#CC3300"; Border Dark Color


theme["Nostalgia"].bgcolormain = "#CC3300"; Calendar Main background color


theme["Nostalgia"].bgcolorlight = "#FFF8EC"; The light background color of the calendar


theme["Nostalgia"].headbgcolor = "#FFFFFF"; Calendar Head Background color


theme["Nostalgia"].headfontcolor = "#000000"; Calendar Header Font Color


theme["Nostalgia"].mouseovercolor = "#FFD700"; Background color for mouse movement


theme["Nostalgia"].mouseoverfontcolor = "#000000"; Font color for mouse movement


theme["Nostalgia"].buttonbordercolor = "#CC3300"; button border Color


theme["Nostalgia"].buttoncolor = "#FFF8EC"; The main color of the button


theme["Nostalgia"].buttonfontcolor = "#000000"; Button text color


theme["Nostalgia"].dragbarfontcolor = "#FFFFFF"; Drag the text color of a bar


theme["Nostalgia"].dragbarcolor = "#CC3300"; Drag the border color of a bar


theme["Nostalgia"].dragbarcolordark = "#FFFFFF"; Drag the border of the bar the color of the dark


theme["Nostalgia"].normaldaycolor = "#ffefd5"; Background color of the date


theme["Nostalgia"].normaldayfontcolor = "#000000"; Font color for dates


theme["Nostalgia"].graydaycolor = "#ffefd5"; Background color Other than this month's date


theme["Nostalgia"].graydayfontcolor = "#808080"; Font colors other than this month's date


theme["Nostalgia"].todaycolor = "#FFD700"; Background color of the current date


theme["Nostalgia"].todayfontcolor = "#000000"; Font color for current date


theme["Nostalgia"].selecteddaycolor = "#CCFFFF"; Background color for selected dates


theme["Nostalgia"].selecteddayfontcolor = "#000000"; Font color for selected dates

theme["Icicle"]=new calendartheme ();


theme["icicle"].versioninfo = "Subject: Icicle Author: Walkingpoison"; Version information for the topic


theme["icicle"].fontfamily = "song Body"; Font


theme["icicle"].bordercolor = "#00bfff"; Border color


theme["icicle"].bordercolordark = "#ffffff"; Border Dark Color


theme["icicle"].bgcolormain = "#00bfff"; Calendar Main background color


theme["icicle"].bgcolorlight = "#f0faff"; The light background color of the calendar


theme["icicle"].headbgcolor = "#FFFFFF"; Calendar Head Background color


theme["icicle"].headfontcolor = "#000000"; Calendar Header Font Color


theme["icicle"].mouseovercolor = "#e0e9ff"; Background color for mouse movement


theme["icicle"].mouseoverfontcolor = "#000000"; Font color for mouse movement


theme["icicle"].buttonbordercolor = "#87cefa"; button border Color


theme["icicle"].buttoncolor = "#FFF8EC"; The main color of the button


theme["icicle"].buttonfontcolor = "#000000"; Button text color


theme["icicle"].dragbarfontcolor = "#336699"; Drag the text color of a bar


theme["icicle"].dragbarcolor = "#00bfff"; Drag the border color of a bar


theme["icicle"].dragbarcolordark = "#FFFFFF"; Drag the border of the bar the color of the dark


theme["icicle"].normaldaycolor = "#e0e9ff"; Background color of the date


theme["icicle"].normaldayfontcolor = "#336699"; Font color for dates


theme["icicle"].graydaycolor = "#e0e9ff"; Background color Other than this month's date


theme["icicle"].graydayfontcolor = "#808080"; Font colors other than this month's date


theme["icicle"].todaycolor = "#FFD700"; Background color of the current date


theme["icicle"].todayfontcolor = "#336699"; Font color for current date


theme["icicle"].selecteddaycolor = "#CCFFFF"; Background color for selected dates


theme["Icicle"].selecteddayfontcolor= "#336699"; Font color for selected dates

theme["Greenbrier"]=new calendartheme ();


theme["Greenbrier"].versioninfo = "Subject: Greenbrier Author: Liuliu"; Version information for the topic


theme["Greenbrier"].fontfamily = "song Body"; Font


theme["Greenbrier"].bordercolor = "#32CD32"; Border color


theme["Greenbrier"].bordercolordark = "#32CD32"; Border Dark Color


theme["Greenbrier"].bgcolormain = "#32CD32"; Calendar Main background color


theme["Greenbrier"].bgcolorlight = "#FFF8EC"; The light background color of the calendar


theme["Greenbrier"].headbgcolor = "#FFFFFF"; Calendar Head Background color


theme["Greenbrier"].headfontcolor = "#000000"; Calendar Header Font Color


theme["Greenbrier"].mouseovercolor = "#FFD700"; Background color for mouse movement


theme["Greenbrier"].mouseoverfontcolor = "#000000"; Font color for mouse movement


theme["Greenbrier"].buttonbordercolor = "#2E8B57"; button border Color


theme["Greenbrier"].buttoncolor = "#FFF8EC"; The main color of the button


theme["Greenbrier"].buttonfontcolor = "#000000"; Button text color


theme["Greenbrier"].dragbarfontcolor = "#FFFFFF"; Drag the text color of a bar


theme["Greenbrier"].dragbarcolor = "#2E8B57"; Drag the border color of a bar


theme["Greenbrier"].dragbarcolordark = "#FFFFFF"; Drag the border of the bar the color of the dark


theme["Greenbrier"].normaldaycolor = "#FFF8DC"; Background color of the date


theme["Greenbrier"].normaldayfontcolor = "#000000"; Font color for dates


theme["Greenbrier"].graydaycolor = "#FFF8DC"; Background color Other than this month's date


theme["Greenbrier"].graydayfontcolor = "#808080"; Font colors other than this month's date


theme["Greenbrier"].todaycolor = "#FFD700"; Background color of the current date


theme["Greenbrier"].todayfontcolor = "#000000"; Font color for current date


theme["Greenbrier"].selecteddaycolor = "#00FFFF"; Background color for selected dates


theme["Greenbrier"].selecteddayfontcolor= "#000000"; Font color for selected dates

theme["Diabloii"]=new calendartheme ();


theme["Diabloii"].versioninfo = "Subject: Diabloii Author: Walkingpoison"; Version information for the topic


theme["Diabloii"].fontfamily = "song Body"; Font


theme["Diabloii"].bordercolor = "#928a70"; Border color


theme["Diabloii"].bordercolordark = "#928a70"; Border Dark Color


theme["Diabloii"].bgcolormain = "#333333"; Calendar Main background color


theme["Diabloii"].bgcolorlight = "#333333"; The light background color of the calendar


theme["Diabloii"].headbgcolor = "#333333"; Calendar Head Background color


theme["Diabloii"].headfontcolor = "#928a70"; Calendar Header Font Color


theme["Diabloii"].mouseovercolor = "#666666"; Background color for mouse movement


theme["Diabloii"].mouseoverfontcolor = "#afafaf"; Font color for mouse movement


theme["Diabloii"].buttonbordercolor = "#333333"; button border Color


theme["Diabloii"].buttoncolor = "#333333"; The main color of the button


theme["Diabloii"].buttonfontcolor = "#928a70"; Button text color


theme["Diabloii"].dragbarfontcolor = "#928a70"; Drag the text color of a bar


theme["Diabloii"].dragbarcolor = "#333333"; Drag the border color of a bar


theme["Diabloii"].dragbarcolordark = "#333333"; Drag the border of the bar the color of the dark


theme["Diabloii"].normaldaycolor = "#333333"; Background color of the date


theme["Diabloii"].normaldayfontcolor = "#928a70"; Font color for dates


theme["Diabloii"].graydaycolor = "#333333"; Background color Other than this month's date


theme["Diabloii"].graydayfontcolor = "#afafaf"; Font colors other than this month's date


theme["Diabloii"].todaycolor = "#333333"; Background color of the current date


theme["Diabloii"].todayfontcolor = "#2e8b57"; Font color for current date


theme["Diabloii"].selecteddaycolor = "#666666"; Background color for selected dates


theme["Diabloii"].selecteddayfontcolor = "#ffcc33"; Font color for selected dates

var wpcalendar=new wpcalendar ();
Wpcalendar.redraw ();

-->

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.