//date.asp
Date title> HEAD>
body>
html> ************************************************************** *********** // js.asp
// this is jsmonthview 1.0, author is Chinese dengkang (2002-07-12).
// i Allow Your Do Any Modify, But I don't Bear Any Liability.
// Browser: IE 4 and Later
Function DefineMonthview (THETEXTOBJECT) {// The Month View Construct Function
THIS.GETONLYNAME = Function () {// create one and only name on the document
Var thename = "mv"; // prefix
Var aryname = new array ();
AryName [0] = "_MONTHVIEW"; // The Month View Main Body's Name Postfix
AryName [1] = "_monthgrid"; // The Month View Day Area's Name Postfix
AryName [2] = "_GOPReviousMonth"; // The Month View Go Previous Month Button's Name Postfix
AryName [3] = "_gonextmonth"; // The Month View Go Next Month Button's Name Postfix
AryName [4] = "_yearlist"; // The Month View Year List's Name Postfix
AryName [5] = "_monthlist"; // The Month View Month List's Name Postfix
AryName [6] = "_daylist"; // Keep The Month View Current Day's Element Name Postfix
VAR i = -1, j = 0, MAXI = 2000;
VAR EXTAG = True;
While ((Extag == True) && (i
EXTAG = false;
For (j = 0; j
IF (Document.all.Item (Thename i.tostring () AryName [J])! = null) {
EXTAG = True;
}
}
}
IF (extag == false) {
Return (Thename I.TOString ());
} else {
Return ("_" thename);
}
}
Var thename = this.getonlyName ();
THIS.NAME = Thename; // the Month View Name
this.Source = ThetObject; // The Month View Act on ThetextObject
THIS.MINYEAR = 1970; // Year List min Value
// return betWeen 1000 and 9999 and <= this.maxyear
this.maxyear = 2030; // Year List Max Value
// Return Between 1000 and 9999 and> = this.minyear
THIS.WIDTH = 200; // The Month View Main Body's Width
this.height = 120; // The Month View Main Body's Height
this.dateformat = " - - "; // the date format
// or is Digital Format Month, or is character format month, or is day, other char unchanged
// this function setting year, Month and day sequence
// EXAMPLE:
// - - : 2002-04-01
// . . : 02.4.1
// year Month day: 2002 year april month 1 day
// / / : 4/1/02
// , : APR 01, 2002
// , : April 1, 2002
//
: 01 APR 2002
//
/ / : 01/04/2002
THIS.unselectBGColor = "#ffffff"; // the Month View Default Background Colorthis.SelectedBGColor = "# 808080"; // the successd date background color
this.selectedColor = "#fffffff"; // The successd Date Front Color
this.daybdwidth = "1"; // the day unit border width, Unit is PX
This.daybdcolor = this.unselectbgcolor; // the day unit border color, default is this.unselectbgcolor
this.todayBdcolor = "# ff0000"; // Denote Today's Date Border Color
THIS.INVALIDCOLOR = "# 808080"; // IT IS Not Current Month Day Front Color
THIS.VALIDCOLOR = "# 0000ff"; // IT IS CURRENT MONTH DAY Front Color
THIS.WEEKENDBGCOLOR = this.unselectbgcolor; // the weekend background color, default is this.unselectbgcolor
THIS.WEEKENDCOLOR = this.validcolor; // the weekend front color, default is this.validcolor
THIS.YearListStyle = "font-size: 12px; font-family: Song;"; // the year list's style
THIS.MONTHLISTSTYLE = "font-size: 12px; font-family: Song;"; // the Month List's Style
THIS.MONTHNAME = New Array (); // Month Name List, Font Is Include this.montlistStyle
THIS.MONTHNAME [0] = "Jan";
THIS.MONTHNAME [1] = "February";
THIS.MONTHNAME [2] = "March";
THIS.MONTHNAME [3] = "April";
THIS.MONTHNAME [4] = "May";
THIS.MONTHNAME [5] = "June";
THIS.MONTHNAME [6] = "July";
THIS.MONTHNAME [7] = "August";
THIS.MONTHNAME [8] = "September";
THIS.MONTHNAME [9] = "October";
THIS.MONTHNAME [10] = "November";
THIS.MONTHNAME [11] = "December";
THIS.TITLESTYLE = "Cursor: default; color: # 000000; Background-Color:" this.unselectbgcolor "; font-size: 16px; font-usight: bolder; font-family: Times new Roman; Text-Align: Center; vertical-align: bottom; "; // the month view title = new array (); // week name list, font is incrude this.titleStyle
THIS.WEEKNAME [0] = "Japan";
This.Weekname [1] = "one";
THIS.WEEKNAME [2] = "two";
THIS.WEEKNAME [3] = "Three";
THIS.WEEKNAME [4] = "four";
THIS.WEEKNAME [5] = "5";
THIS.WEEKNAME [6] = "six";
This.footerstyle = "CURSOR: HAND; color: # 000000; Background-Color:" this.unselectbgcolor "; font-size: 12px; font-family: verdana; text-align: left; vertical-align: middle; "// The Month Footer Area's Style
THIS.TODAYTITLE = "Today:"; // Today Tip String, Font Is Include this.footerstyle
THIS.MONTHBTSTYLE = "font-family: marlett; font-size: 12px;"; // the change MONTH Button Style
This.PreviousMonthtext = "3"; // The Go Previous Month Button Text
// font is include this.monthbtstyle
this.nextMonthtext = "4"; // the Go Next Month Button Text
// font is include this.monthbtstyle
This.MonthgridStyle = "Border-width: 1px; border-style: solId; border-color: # 000000;"; // the Month View Main Body's Default Style
THISHEADERSTYLE = "Height: 32px; Background-Color: Menu;" // The Month View Header Area's Style
this.LineBgStyle = "height: 10px; background-color:" this.UnselectBgColor "; text-align: center; vertical-align: middle;"; // the month view title area and day area compart area background stylethis. LINESTYLE = "Width: 90%; Height: 1PX; Background-Color: # 000000;"; // The Month View Title Area And Day Area Compart Area Front Style
This.dayStyle = "Cursor: hand; font-size: 12px; font-family: verdana; text-align: center; vertical-align: middle;" // the Month View Day Area's Style
THIS.OVERDAYSTYLE = "this.style.textDecoration = 'underline';"; // the mouse over a day style
THIS.OutdayStyle = "this.style.textDecoration = 'none';"; // the mouse Out a day style
THIS.GETOFFSETLEFT = Function (THEOBJECT) {// Return Theobject's Absolute OffsetLeft
VAR ABSLEFT = 0;
Var theposition = "";
VAR tmpObject = theobject;
While (tmpObject! = null) {
TmpOsis = tmpObject.position;
TmpObject.position = "static";
Absleft = tmpObject.offsetleft;
TmpObject.position = theposition;
TmpObject = TmpObject.offSetParent;
}
Return AbsLeft;
}
THIS.GETOFFSETTOP = Function (theObject) {// Return theobj's Absolute Offsettop
VAR abstop = 0;
Var theposition = "";
VAR tmpObject = theobject;
While (tmpObject! = null) {
TmpOsis = tmpObject.position;
TmpObject.position = "static";
Abstop = TmpObject.offSettop;
TmpObject.position = theposition;
TmpObject = TmpObject.offSetParent;
}
Return ABSTOP;
}
THIS.GETFORMATYEAR = function (theyear) {// Format theyear to 4 digit
Var tmpyear =.
IF (TMPYEAR <100) {
TMPYEAR = 1900;
IF (TMPYEAR <1970) {
TMPYEAR = 100;
}
}
IF (TMPYEAR
TMPYEAR = this.minyear;
}
IF (TMPYEAR> this.maxyear) {
TMPYEAR = this.maxyear;
}
Return (TMPYEAR);
}
THIS.GETMONTHDAYS = Function (theyear, themonth) {// Get theyear and themonth days Number
Var thedays = new Array (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
Var themonthday = 0, tmpyear = this.getformatyear (theyear);
THEMONTHDAY = these Days [themonth];
IF (THEMONTH == 1) {// Themonth is February
IF ((tmpyear% 4 == 0) && (tmpyear% 100! = 0)) || (TMPYEAR% 400 == 0) {
THEMONTHDAY ;
}
}
Return (themonthday);
}
This.SetdateFormat = function (theyear, themonth, theday) {// Format a date to this.dateFormat
Var thedate = this.dateFormat;
Var tmpyear = this.getformatyear (theYear);
VAR TMPMONTH = THEMONTH;
IF (tmpmonth <0) {
TMPMONTH = 0;
}
IF (tmpmonth> 11) {
TMPMONTH = 11;
}
VAR TMPDAY = these;
IF (TMPDAY <1) {
TMPDAY = 1;
} else {
TMPDAY = this.getMontHDAYS (TMPYEAR, TMPMONTH);
IF (THEDAY
TMPDAY = these Download;
}
}
THEDATE = thesedate.replace (/ / g, tmpyear.tostring ());
THEDATE = thisdate.replace (/ / g, tmpyear.tostring (). Substr (2, 2));
THEDATE = thesedate.replace (/ / g, this.monthname [tmpmonth]);
THEDATE = thisdate.replace (/ / g, this.monthname [tmpmonth] .substr (0, 3));
IF (Themonth <9) {
THEDATE = thesedate.replace (/ / g, "0" (TMPMONTH 1) .tostring ());
} else {
THEDATE = thesedate.replace (/ / g, (Tmpmonth 1) .tostring ());
}
THEDATE = thesedate.replace (/ / g, (Tmpmonth 1) .tostring ()); if (theDay <10) {
THEDATE = thisdate.replace (/
/ g, "0" tmpday.tostring ());
} else {
THEDATE = thisdate.replace (/
/ g, tmpday.tostring ());
}
THEDATE = thisdate.replace (/ / g, tmpday.tostring ());
Return (thisDate);
} this.gettextdate = function (thistring) {// convert a String to a date, if the string is not a date, returnon a Empty string var i = 0, tmpcha = "", find_tag = ""; var start_at = 0 , end_at = 0, month_at = 0, day_at = 0; var TMP_AT = 0, one_at = 0, two_at = 0, one_days = 0, two_days = 0; var arydate = new array (); var tmpyear = - 1, TMPMONTH = -1, tmpday = -1; var tmpdate = thesestring.tolowercase (); var defdate = ""; end_at = tmpdate.length; for (i = 1; i "9") {tmpdate = tmpdate.substr (0, i-1) "-" TMPDATE.SUBSTR (i 1);}}}}}}} for (i = 0; i <9; i ) {tmpdate = tmpdate.replace (this.Monthname [i] .tolowercase (). Substr (0 , 3), "-00" (i 1) .tostring () "-");} for (i = 9; i <12; i ) {tmpdate = tmpdate.replace (this.Monthname [i] .tolowercase (). Substr (0,3), "-0" (i 1) .tostring () "-");} Tmpdate = tmpdate.replace (/ jan / g, "-001-") TMPDATE = TMPDATE.REPLACE (/ Feb / g, "-002-"); TMPDATE = TMPDATE.REPLA CE (/ Mar / G, "-003-"); tmpdate = tmpdate.replace (/ APR / g, "-004-"); TMPDATE = TMPDATE.REPLACE (/ May / g, "-005-"); Tmpdate = tmpdate.replace (/ jun / g, "-006-"); tmpdate = tmpdate.replace (/ jul / g, "-007-"); tmpdate = tmpdate.replace (/ aug / g, "-008 - "); tmpdate = tmpdate.replace (/ SEP / G," -009- "); tmpdate = tmpdate.replace (/ OCT / G," -010- "); tmpdate =
TMPDATE.REPLACE (/ NOV / G, "-011-"); tmpdate = tmpdate.replace (/ dec / g, "-012-"); for (i = 0; i "9") && (tmpcha! = ")) {tmpdate = tmpdate.replace (tmpchar," - ")}} while (Tmpdate.indexof ("-")! = -1) {tmpdate = tmpdate.replace (/ - / g, "-");} start_at = 0; end_at = tmpdate.length-1; while (tmpdate). Charat (start_AT) == "-") {start_at ;} while (tmpdate.charat (end_at) == "-") {end_at--;} if (start_at = 0; I- -) {IF (Arydate [i] .length == 3) {if (Arydate [i]> = "001" && arydate [i] <= "012") {TMPMONTH = PARSEINT (Arydate [i], 10) -1; Switch (i) {case 0: Find_tag = "100"; one_at = parseint (Arydate [1], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 1: Find_TAG = "010 "One_at = PARSE Int (Arydate [0], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 2: Find_TAG = "001"; One_at = PARSEINT (Arydate [0], 10); Two_at = PARSEINT (Arydate [1], 10); Break;}}}}} {One_tag! = "000") {One_Days = this.getMontHDAYS (Two_AT, TMPMONTH); Two_Days = this.getMontHDAYS (One_AT, TMPMONTH); IF ((One_at> One_days) && (two_at> two_days) {return (defdate);
} {TMPYEAR = this.getformatyear (TWO_AT); tmpday = one_at;}} (one_at> one_days) && (TWO_AT <= two_days)) {TMPYEAR = THIS .GetFormatYear (one_at); tmpDay = two_at;} if ((one_at <= one_days) && (two_at <= two_days)) {tmpYear = this.GetFormatYear (one_at); tmpDay = two_at; tmpDate = this.DateFormat; year_at = tmpDate .indexof (""); if (Year_AT == -1) {year_at = tmpdate.indexof ("");} day_at = tmpdate.indexof (""); if (DAY_AT = = -1) {day_at = tmpdate.indexof ("");} if (year_at> = day_at) {tmpyear = this.getformatyear (TWO_AT); tmpday = one_at;}}}}} Return (New Date (TmPyear, TMPMONTH , TMPDAY));} Find_tag = "000"; for (i = 2; I> = 0; I -) {ix (Parseint (Arydate [i], 10)> 31) {TMPYEAR = this.GetFormatyear (PARSEINT (Arydate [I], 10)); Switch (i) {case 0: Find_TAG = "100"; one_at = parseint (Arydate [1], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 1: Find_tag = "010"; One_at = PARSEINT (Arydate [0], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 2: Find_TAG = "001"; one_at = parseint (Arydate [0], 10); Two_at = PARSEINT (Arydate [1], 10); Break;}}} f (Find_TAG == "000") {TMPDATE = this.dateFormat; Year_at = tmpdate.indexof (""); if (Year_AT == -1) {year_at = tmpdate.indexof ("");} Month_at = tmpdate.indexof (""); if (MONTH_AT == -1) {month_at = tmpdate.indexof ("");} if (Month_at ==
-1) {month_at = tmpdate.indexof ("");} if (Month_AT == -1) {MONTH_AT = TmpDate.indexOf ("");} day_at = tmpdate.indexof (" "); if (day_at == -1) {day_at = tmpdate.indexof (" ");} IF (Year_AT> MONTH_AT) && (YEAR_AT> DAY_AT) {FIND_TAG =" 001 "} IF (Year_AT> MONTH_AT) && (Year_AT <= day_at)) {FIND_TAG = "010";} IF ((Year_AT <= MONTH_AT) && (Year_AT> Day_AT) {FIND_TAG = "010";} if ((Year_AT <= Month_at) && (Year_AT <= day_at) {FIND_TAG = "100";} Switch (Find_TAG) {CASE "100": tmpyear = parseint (Arydate [0], 10); One_at = PARSEINT (Arydate [1], 10 ); TWO_AT = PARSEINT (Arydate [2], 10); Break; Case "010": one_at = parseint (Arydate [0], 10); tmpyear = parseint (Arydate [1], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case "001": one_at = parseint (Arydate [0], 10); Two_at = PARSEINT (Arydate [1], 10); TMPYEAR = PARSEINT (Arydate [2], 10); Break;} tmpyear = this.getformatyear (TMPYEAR);} if (Find_tag! = "000") {if (one_at> 12) && (two_at> 12)) {return (defdate);} if (one_at <= 12 ) {IF (two_at> this.getMonthdays (TMPYEAR, One_AT-1 )) {RETURN (New Date (TMPYEAR, One_AT-1, this.getMontHDAYS (TMPYEAR, One_AT-1));} if (Two_AT> 12) {RETURN (New Date (TMPYEAR, One_AT-1, Two_AT); }}}} (TWO_AT <= 12) {if (One_AT> this.getmonthdays (TMPYEAR, TWO_AT-1)) {Return (New Date (TMPYEAR, TWO_AT-1, this.getmonthdays (TMPYEAR, TWO_AT-1)); } if (one_at> 12) {RETURN (New Date (TMPYEAR, TWO_AT-1, One_AT);}} = ((One_AT <= 12) && (TWO_AT <= 12)) {TMPMONTH =
One_at-1; tmpday = two_at; tmpdate = this.dateFormat; month_at = tmpdate.indexof (""); if (MONTH_AT == -1) {MONTH_AT = TmpDate.indexof ("");} IF (MONTH_AT == -1) {month_at = tmpdate.indexof ("");} if (Month_AT == -1) {MONTH_AT = Tmpdate.indexOf ("");} day_at = tmpdate. IndexOf (""); if (DAY_AT == -1) {day_at = tmpdate.indexof ("");} if (Month_AT> = day_at) {TMPMONTH = Two_at-1; tmpDay = one_at; } return (new Date (tmpYear, tmpMonth, tmpDay));}}} this.CreateYearList = function (minYear, maxYear) {// create year list var theName = this.Name; var theYearObject = document.all.item (theName "_Yearlist"); if (theyearObject == null) {return;} var theyear = 0; var theyearhtml = " "; for (theyear = minyear; theyear <= Maxyear; theyear ) {"{ehtml =" " " option> ";} theyearhtml =" select> "; theyearObject.outerHtml = theyearhtml; }imthtml;} this.createMonthlist = function () {// Create Month List var. = this.name; var themonthobject = document.all.item (thename "_monthlist");
IF (THEMONTHOBJECT == NULL) {Return;} var themth = 0; var themthhtml = " "; for (theMonth = 0; theMonth <12; theMonth ) {theMonthHTML = "";} themonthhtml = " select>"; ThemonThobject.outerHTML = theMonthHTML;} this.setDayList = function (theYear, theMonth, theDay) {// set the month view show a date var theName = this.Name; var theDayObject = document.all.item (theName "_DayList"); if (theDayObject == null) {return;} theDayObject.value = theDay.toString (); var theFirstDay = new Date (theYear, theMonth, 1); var theCurrentDate = new Date (); var theWeek = theFirstDay.getDay (); IF (theweek == 0) {theweek = 7;} var aleftday = 0; if (theMonth == 0) {THELEFTDAY = 31;} else {THELEFTDAY = this.getmont hDays (theYear, theMonth - 1);} var theRightDay = this.GetMonthDays (theYear, theMonth); var theCurrentDay = theLeftDay - theWeek 1; var offsetMonth = -1; // the month is previous month var theColor = this.InvalidColor var thebgcolor = this.unselectbgcolor; var thebdcolor = thebgcolor; var weekid = 0 var dayid = 0; var theestle = "; var thedaytml ="
/ "100% /" height = / "100% /" border = / "0 /" cellspacing = / "0 /" cellpadding = / "0 /"; itDayHTML = " "; for (dayId = 0; dayid <7; dayid ) {THEDAYHTML =" this.Weekname [dayID] TD> ";} thedayhtml =" tr> "; itDayhtml =" "; itDayhtml =" ";"; " THISLINESTYLE " / "cellspacing = /" 0 / "cellpadding = /" 0 / "cellpacing = /" 0 / "cellpacing = /" 0 / "Cellpadding = /" 0 / "Cellpadding = /" 0 / "0 /" TD> TR> "; Thedayhtml =" Table> "; ThedayHTML =" TD> "; THDAYHTML =" TR> "; for (WeekID = 0; WeekId <6; Weekid ) {TwayTML = " "; for (dayId = 0; dayId <7; dayid ) {if ((Thecurrentday> theleftday ) && (WeekId <3)) {offsetMonth ; // the month is current month; theCurrentDay = 1;} if ((theCurrentDay> theRightDay) && (WeekId> 3)) {offsetMonth ; // the month is next month; theCurrentDay = 1;} switch (offsetmonth) {case -1: thecolor = this.invalid Color; Break; Case 1: Thecolor = this.invalidColor; Break; Case 0: IF ((DAYID == 0) || (DAYID == 6)) {TheColor =
this.WeekendColor;} else {theColor = this.ValidColor;} break;} if ((DayId == 0) || (DayId == 6)) {theBgColor = this.WeekendBgColor;} else {theBgColor = this.UnselectBgColor; } theBdColor = this.DayBdColor; if ((theCurrentDay == theDay) && (offsetMonth == 0)) {theColor = this.SelectedColor; theBgColor = this.SelectedBgColor; theBdColor = theBgColor;} if ((theYear == theCurrentDate.getFullYear ()) && (theMonth == theCurrentDate.getMonth ()) && (theCurrentDay == theCurrentDate.getDate ()) && (offsetMonth == 0)) {theBdColor = this.TodayBdColor;} theStyle = "border:" this. Daybdwidth "PX Solid" THEBDCOLOR "; Color:" Thecolor "; Background-Color:" THEBGCOLOR ";"; THEDAYHTML = "
"; itDayhtml = thecurrentday.tos Tring (); itDayhtml = " td>"; ThecurrentDay ; }hiptyhtml = " tr>";} theDayhtml = "
ThecurrentDate.getMonth (). TOSTRING () "," thecurrentdate.getdate (). TOSTRING () "); /"> "; t =" Border: " this.daybdwidth " PX Solid " this. TODAYBDCOLOR ";"; "; .TodayTitle " this.setdateformat (), ThecurrentDate.getMonth (), ThecurrentDate.getDate () " td> "; itDayhtml =" tr> "; THEDAYHTML =" table> "; var theMonthGrid = document.all.item (theName " _MonthGrid "); theMonthGrid.innerHTML = theDayHTML;} this.CreateMonthGrid = function (theYear, theMonth, theDay) {// refresh the month view to the date, main action is run this.setDayList () and set this.Source.value var theTextObject = this.Source; if (theTextObject == null) {return;} var theName = this.Name; var theYearObject = document.all. Item (Thename "_yearlist"); var themonthobject = document.all.item (thename "_Monthlist"); var tmpyear = theyear; var tmpmonth = themonth; var TMPDA Y = 1; IF (TmpMonth <0) {TMPYEAR - TMPMONTH = 11;} if (TmpMonth> 11) {TMPYEAR ; tmpmonth = 0;}}} (tmpyear this.maxyear) {TMPYEAR = this.maxyear;}} {tmpday = 1;} else {tmpday = this.getMontHDAYS (TMPYEAR, TMPMONTH); IF (TMPDAY) {TmpDay = THEDAY;
}} TheYearObject.value = tmpYear; theMonthObject.value = tmpMonth; this.setDayList (tmpYear, tmpMonth, tmpDay); theTextObject.value = this.SetDateFormat (tmpYear, tmpMonth, tmpDay); theTextObject.select ();} this.UpdateMonthGrid = function (theObject) {// run this.CreateMonthGrid () by theObject var theTextObject = this.Source; if (theTextObject == null) {return;} var theName = this.Name; var theYearObject = document.all.item ( theName "_YearList"); var theMonthObject = document.all.item (theName "_MonthList"); var theDayObject = document.all.item (theName "_DayList"); var tmpName = theObject.id.substr (theObject. id.lastIndexOf ( "_")); switch (tmpName) {case "_goPreviousMonth": // go previous month button theObject.disabled = true; this.CreateMonthGrid (parseInt (theYearObject.value, 10), parseInt (theMonthObject.value , 10) - 1, PARSEINT (THEDAYObject.value, 10)); theObject.disabled = false; break; case "_gonextmonth": // Go Next Month Button theobject.disabled = true; this.createMonthgrid (PARS eInt (theYearObject.value, 10), parseInt (theMonthObject.value, 10) 1, parseInt (theDayObject.value, 10)); theObject.disabled = false; break; case "_YearList": // year list this.CreateMonthGrid (parseInt (theYearObject.value, 10), parseInt (theMonthObject.value, 10), parseInt (theDayObject.value, 10)); break; case "_MonthList": // month list this.CreateMonthGrid (parseInt (theYearObject.value, 10), PARSEINT (THEMONTHOBJECT.VALUE, 10), PARSEINT (THEDAYObject.Value, 10)); Break; default: return;}} this.deleteMonthgrid =
function () {// check document focus, if blur this.Source then delete this var theName = this.Name; var theDivObject = document.all.item (theName "_MonthView"); if (theDivObject == null) {return } var TmpObject = document.activeElement; while (tmpObject! = null) {if (tmpObject == this.source) {return;} // if (tmpObject.id == thename "_MONTHVIEW") {// Return; //} // if (tmpObject.id == Thename "_MONTHGRID") {// Return; //} if (tmpObject.id == Thename "_GOPREVIOUSMONTH") {return;} if (tmpObject.id == Thename "_gonextMonth") {return;} if (tmpObject.id == thename "_yearlist") {return;}} (tmpObject.id == thename "_MONTHLIST") {Return;} if (tmpObject.id = = theName "_DayList") {return;} tmpObject = tmpObject.parentElement;} if (tmpObject == null) {// delete the month view theDivObject.outerHTML = ""; var theDate = new Date (this.GetTextDate (this . Source.Value); IF (ISDATE) {this.source.value = "";} else {this.source.value = this.setdateFormat (these.GetFullyEar (), THEDATE.GETMONTH (), THEDATE.GETDATE ();} this.Source = null;}} this.initialMonthview = function () {var thename = this.name; var thevalue = this.name; var thevalue = this.Name; var thecurrentdate = new Date (this.getTextDate (ISNANTDATE) {ThecurrentDate = new date (); var adivhtml = "
"; itDivhtml = "
/ "" this.width.toString () "/" height = / "" this.height.tostring () "/" style = / " this.monthgridStyle " / "cellpadding = /" 0 / "Cellspacing = /" 0 / ">;" THEDIVHTML = "
"; thedivhtml = ""; thedivhtml = "