List Info

Thread: Array




Array
user name
1969-12-31 18:00:00
Update of
/var/cvs/Geeklog-2.x/Geeklog-2.x/public_html/javascript/yui/
build/calendar
In directory
iowaoutdoors:/tmp/cvs-serv13676/public_html/javascript/yui/b
uild/calendar

Added Files:
	README calendar-min.js calendar.js 
Log Message:
Removing Factory Classes

--- NEW FILE: README ---
Calendar Release Notes

*** version 0.10.0 ***

* Major performance improvements from attaching DOM events
to associated table cells only once, when the Calendar shell
is built

* DOM events for mouseover/mouseout are now fired for all
browsers (not just Internet Explorer)

* Reset functionality bug fixed for 2-up Calendar view

*** version 0.9.0 ***

* Initial release


--- NEW FILE: calendar-min.js ---
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://dev
eloper.yahoo.net/yui/license.txt
version: 0.10.0
*/
YAHOO.widget.DateMath=new
function(){this.DAY="D";this.WEEK="W"
;;this.YEAR="Y";this.MONTH="M";this.
ONE_DAY_MS=1000*60*60*24;this.add=function(date,field,amount
){var d=new Date(date.getTime());switch(field)
{case this.MONTH:var newMonth=date.getMonth()+amount;var
years=0;if(newMonth<0){while(newMonth<0)
{newMonth+=12;years-=1;}}else
if(newMonth>11){while(newMonth>11)
{newMonth-=12;years+=1;}}
d.setMonth(newMonth);d.setFullYear(date.getFullYear()+years)
;break;case
this.DAY:d.setDate(date.getDate()+amount);break;case
this.YEAR:d.setFullYear(date.getFullYear()+amount);break;cas
e this.WEEK:d.setDate(date.getDate()+7);break;}
return d;};this.subtract=function(date,field,amount){return
this.add(date,field,(amount*-1));};this.before=function(date
,compareTo){var
ms=compareTo.getTime();if(date.getTime()<ms){return
true;}else{return
false;}};this.after=function(date,compareTo){var
ms=compareTo.getTime();if(date.getTime()>ms){return
true;}else{return
false;}};this.getJan1=function(calendarYear){return new
Date(calendarYear,0,1);};this.getDayOffset=function(date,cal
endarYear){var beginYear=this.getJan1(calendarYear);var
dayOffset=Math.ceil((date.getTime()-beginYear.getTime())/thi
s.ONE_DAY_MS);return
dayOffset;};this.getWeekNumber=function(date,calendarYear,we
ekStartsOn){if(!weekStartsOn){weekStartsOn=0;}
if(!calendarYear){calendarYear=date.getFullYear();}
var weekNum=-1;var jan1=this.getJan1(calendarYear);var
jan1DayOfWeek=jan1.getDay();var month=date.getMonth();var
day=date.getDate();var year=date.getFullYear();var
dayOffset=this.getDayOffset(date,calendarYear);if(dayOffset&
lt;0&&dayOffset>=(-1*jan1DayOfWeek)){weekNum=1;}e
lse{weekNum=1;var
testDate=this.getJan1(calendarYear);while(testDate.getTime()
<date.getTime()&&testDate.getFullYear()==calendar
Year){weekNum+=1;testDate=this.add(testDate,this.WEEK,1);}}
return
weekNum;};this.isYearOverlapWeek=function(weekBeginDate){var
overlaps=false;var
nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getF
ullYear()!=weekBeginDate.getFullYear()){overlaps=true;}
return
overlaps;};this.isMonthOverlapWeek=function(weekBeginDate){v
ar overlaps=false;var
nextWeek=this.add(weekBeginDate,this.DAY,6);if(nextWeek.getM
onth()!=weekBeginDate.getMonth()){overlaps=true;}
return overlaps;};this.findMonthStart=function(date){var
start=new Date(date.getFullYear(),date.getMonth(),1);return
start;};this.findMonthEnd=function(date){var
start=this.findMonthStart(date);var
nextMonth=this.add(start,this.MONTH,1);var
end=this.subtract(nextMonth,this.DAY,1);return
end;};this.clearTime=function(date){date.setHours(0,0,0,0);r
eturn date;};}
YAHOO.widget.Calendar_Core=function(id,containerId,monthyear
,selected){if(arguments.length>0)
{this.init(id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar_Core.IMG_ROOT=(window.location.href.to
LowerCase().indexOf("https")==0?"https://a24
8.e.akamai.net/sec.yimg.com/i/":"http://us.i1.yim
g.com/us.yimg.com/i/");YAHOO.widget.Calendar_Core.
DATE="D";YAHOO.widget.Calendar_Core.MONTH_DAY=&
quot;MD";YAHOO.widget.Calendar_Core.WEEKDAY="WD
";YAHOO.widget.Calendar_Core.RANGE="R";YAHO
O.widget.Calendar_Core.MONTH="M";YAHOO.widget.Ca
lendar_Core.DISPLAY_DAYS=42;YAHOO.widget.Calendar_Core.STOP_
RENDER="S";YAHOO.widget.Calendar_Core.prototype=
{Config:null,parent:null,index:-1,cells:null,weekHeaderCells
:null,weekFooterCells:null,cellDates:null,id:null,oDomContai
ner:null,today:null,renderStack:null,_renderStack:null,pageD
ate:null,_pageDate:null,minDate:null,maxDate:null,selectedDa
tes:null,_selectedDates:null,shellRendered:false,table:null,
headerCell:null};YAHOO.widget.Calendar_Core.prototype.init=f
unction(id,containerId,monthyear,selected){this.setupConfig(
);this.id=id;this.cellDates=new Array();this.cells=new
Array();this.renderStack
 =new Array();this._renderStack=new
Array();this.oDomContainer=document.getElementById(container
Id);this.today=new
Date();YAHOO.widget.DateMath.clearTime(this.today);var
month;var year;if(monthyear)
{var
aMonthYear=monthyear.split(this.Locale.DATE_FIELD_DELIMITER)
;month=parseInt(aMonthYear[this.Locale.MY_MONTH_POSITION-1])
;year=parseInt(aMonthYear[this.Locale.MY_YEAR_POSITION-1]);}
else{month=this.today.getMonth()+1;year=this.today.getFullYe
ar();}
this.pageDate=new Date(year,month-1,1);this._pageDate=new
Date(this.pageDate.getTime());if(selected)
{this.selectedDates=this._parseDates(selected);this._selecte
dDates=this.selectedDates.concat();}else{this.selectedDates=
new Array();this._selectedDates=new Array();}
this.wireDefaultEvents();this.wireCustomEvents();};YAHOO.wid
get.Calendar_Core.prototype.wireDefaultEvents=function(){thi
s.doSelectCell=function(e,cal){var cell=this;var
index=cell.index;var d=cal.cellDates[index];var date=new
Date(d[0],d[1]-1,d[2]);if(!cal.isDateOOM(date)&&!YAH
OO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_RESTRICTED)&
;&!YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_OOB))
{if(cal.Options.MULTI_SELECT){var
link=cell.getElementsByTagName("A")[0];link.blur
();var cellDate=cal.cellDates[index];var
cellDateIndex=cal._indexOfSelectedFieldArray(cellDate);if(ce
llDateIndex>-1)
{cal.deselectCell(index);}else{cal.selectCell(index);}}else{
var
link=cell.getElementsByTagName("A")[0];link.blur
()
cal.selectCell(index);}}}
this.doCellMouseOver=function(e,cal){var cell=this;var
index=cell.index;var d=cal.cellDates[index];var date=new
Date(d[0],d[1]-1,d[2]);if(!cal.isDateOOM(date)&&!YAH
OO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_RESTRICTED)&
;&!YAHOO.util.Dom.hasClass(cell,cal.Style.CSS_CELL_OOB))
{YAHOO.widget.Calendar_Core.prependCssClass(cell,cal.Style.C
SS_CELL_HOVER);}}
this.doCellMouseOut=function(e,cal){YAHOO.widget.Calendar_Co
re.removeCssClass(this,cal.Style.CSS_CELL_HOVER);}
this.doNextMonth=function(e,cal){cal.nextMonth();}
this.doPreviousMonth=function(e,cal){cal.previousMonth();}}
YAHOO.widget.Calendar_Core.prototype.wireCustomEvents=functi
on(){}
YAHOO.widget.Calendar_Core.prototype.setupConfig=function(){
this.Config=new
Object();this.Config.Style={CSS_ROW_HEADER:"calrowhead
",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:&q
uot;calcell",CSS_CELL_SELECTED:"selected",
CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:
"today",CSS_CELL_OOM:"oom",CSS_CELL_
OOB:"previous",CSS_HEADER:"calheader"
;,CSS_HEADER_TEXT:"calhead",CSS_WEEKDAY_CELL:&q
uot;calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayr
ow",CSS_FOOTER:"calfoot",CSS_CALENDAR:&qu
ot;calendar",CSS_BORDER:"calbordered",CSS_
CONTAINER:"calcontainer",CSS_NAV_LEFT:"cal
navleft",CSS_NAV_RIGHT:"calnavright",CSS_C
ELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcel
lleft",CSS_CELL_RIGHT:"calcellright",CSS_C
ELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"
;calcellhover",CSS_CELL_HIGHLIGHT1:"highlight1&
quot;,CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_
HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:&qu
ot;highlight4"};this.Style=this.Config.Style;this.Conf
ig.Locale={MONTHS_SHORT:["Jan","Feb"
,"Mar","Apr","May",&quo
t;Jun","Jul","Aug","Sep
","Oct","Nov","Dec"
],
 MONTHS_LONG:["January","February",
"March","April","May",&q
uot;June","July","August",&qu
ot;September","October","November&q
uot;,"December"],WEEKDAYS_1CHAR:["S"
,"M","T","W","T&q
uot;,"F","S"],WEEKDAYS_SHORT:["
;Su","Mo","Tu","We"
;,"Th","Fr","Sa"],WEEKDA
YS_MEDIUM:["Sun","Mon","Tue&q
uot;,"Wed","Thu","Fri",
"Sat"],WEEKDAYS_LONG:["Sunday","
;Monday","Tuesday","Wednesday"
,"Thursday","Friday","Saturday
"],DATE_DELIMITER:",",DATE_FIELD_DELIMITER
:"/",DATE_RANGE_DELIMITER:"-",MY_MON
TH_POSITION:1,MY_YEAR_POSITION:2,MD_MONTH_POSITION:1,MD_DAY_
POSITION:2,MDY_MONTH_POSITION:1,MDY_DAY_POSITION:2,MDY_YEAR_
POSITION:3};this.Locale=this.Config.Locale;this.Config.Optio
ns={MULTI_SELECT:false,SHOW_WEEKDAYS:true,START_WEEKDAY:0,SH
OW_WEEK_HEADER:false,SHOW_WEEK_FOOTER:false,HIDE_BLANK_WEEKS
:false,NAV_ARROW_LEFT:YAHOO.widget.Calendar_Core.IMG_ROOT+&
quot;us/tr/callt.gif",NAV_ARROW_RIGHT:YAHOO.widget.Cal
endar_Core.IMG_ROOT+"us/tr/calrt.gif"};this.Opti
ons=this.Config.Options;this.customConfig();if(!this.Options
.LOCALE_MONTHS){this.Options.L
 OCALE_MONTHS=this.Locale.MONTHS_LONG;}
if(!this.Options.LOCALE_WEEKDAYS){this.Options.LOCALE_WEEKDA
YS=this.Locale.WEEKDAYS_SHORT;}
if(this.Options.START_WEEKDAY>0)
{for(var
w=0;w<this.Options.START_WEEKDAY;++w){this.Locale.WEEKDAY
S_SHORT.push(this.Locale.WEEKDAYS_SHORT.shift());this.Locale
.WEEKDAYS_MEDIUM.push(this.Locale.WEEKDAYS_MEDIUM.shift());t
his.Locale.WEEKDAYS_LONG.push(this.Locale.WEEKDAYS_LONG.shif
t());}}};YAHOO.widget.Calendar_Core.prototype.customConfig=f
unction(){};YAHOO.widget.Calendar_Core.prototype.buildMonthL
abel=function(){var
text=this.Options.LOCALE_MONTHS[this.pageDate.getMonth()]+&
quot; "+this.pageDate.getFullYear();return
text;};YAHOO.widget.Calendar_Core.prototype.buildDayLabel=fu
nction(workingDate){var day=workingDate.getDate();return
day;};YAHOO.widget.Calendar_Core.prototype.buildShell=functi
on(){this.table=document.createElement("TABLE");
this.table.cellSpacing=0;YAHOO.widget.Calendar_Core.setCssCl
asses(this.table,[this.Style.CSS_CALENDAR]);this.table.id=th
is.id;this.buildShellHeader();this.buildShellBody();this.bui
ldShellFooter();YAHOO.util.Event.addListener(window,"u
nload",this._unload,this);};YAHOO.widget.Calenda
 r_Core.prototype.buildShellHeader=function(){var
head=document.createElement("THEAD");var
headRow=document.createElement("TR");var
headerCell=document.createElement("TH");var
colSpan=7;if(this.Config.Options.SHOW_WEEK_HEADER){this.week
HeaderCells=new Array();colSpan+=1;}
if(this.Config.Options.SHOW_WEEK_FOOTER){this.weekFooterCell
s=new Array();colSpan+=1;}
headerCell.colSpan=colSpan;YAHOO.widget.Calendar_Core.setCss
Classes(headerCell,[this.Style.CSS_HEADER_TEXT]);this.header
Cell=headerCell;headRow.appendChild(headerCell);head.appendC
hild(headRow);if(this.Options.SHOW_WEEKDAYS)
{var row=document.createElement("TR");var
fillerCell;YAHOO.widget.Calendar_Core.setCssClasses(row,[thi
s.Style.CSS_WEEKDAY_ROW]);if(this.Config.Options.SHOW_WEEK_H
EADER){fillerCell=document.createElement("TH");Y
AHOO.widget.Calendar_Core.setCssClasses(fillerCell,[this.Sty
le.CSS_WEEKDAY_CELL]);row.appendChild(fillerCell);}
for(var i=0;i<this.Options.LOCALE_WEEKDAYS.length;++i)
{var
cell=document.createElement("TH");YAHOO.widget.C
alendar_Core.setCssClasses(cell,[this.Style.CSS_WEEKDAY_CELL
]);cell.innerHTML=this.Options.LOCALE_WEEKDAYS[i];row.append
Child(cell);}
if(this.Config.Options.SHOW_WEEK_FOOTER){fillerCell=document
.createElement("TH");YAHOO.widget.Calendar_Core.
setCssClasses(fillerCell,[this.Style.CSS_WEEKDAY_CELL]);row.
appendChild(fillerCell);}
head.appendChild(row);}
this.table.appendChild(head);};YAHOO.widget.Calendar_Core.pr
ototype.buildShellBody=function(){this.tbody=document.create
Element("TBODY");for(var r=0;r<6;++r)
{var row=document.createElement("TR");for(var
c=0;c<this.headerCell.colSpan;++c)
{var
cell;if(this.Config.Options.SHOW_WEEK_HEADER&&c===0)
{cell=document.createElement("TH");this.weekHead
erCells[this.weekHeaderCells.length]=cell;}else
if(this.Config.Options.SHOW_WEEK_FOOTER&&c==(this.he
aderCell.colSpan-1)){cell=document.createElement("TH&
quot;);this.weekFooterCells[this.weekFooterCells.length]=cel
l;}else{cell=document.createElement("TD");this.c
ells[this.cells.length]=cell;YAHOO.widget.Calendar_Core.setC
ssClasses(cell,[this.Style.CSS_CELL]);YAHOO.util.Event.addLi
stener(cell,"click",this.doSelectCell,this);YAHO
O.util.Event.addListener(cell,"mouseover",this.d
oCellMouseOver,this);YAHOO.util.Event.addListener(cell,&quo
t;mouseout",this.doCellMouseOut,this);}
row.appendChild(cell);}
this.tbody.appendChild(row);}
this.table.appendChild(this.tbody);};YAHOO.widget.Calendar_C
ore.prototype.buildShellFooter=function(){};YAHOO.widget.Cal
endar_Core.prototype.renderShell=function(){this.oDomContain
er.appendChild(this.table);this.shellRendered=true;};YAHOO.w
idget.Calendar_Core.prototype.render=function(){if(!this.she
llRendered)
{this.buildShell();this.renderShell();}
this.resetRenderers();this.cellDates.length=0;var
workingDate=YAHOO.widget.DateMath.findMonthStart(this.pageDa
te);this.renderHeader();this.renderBody(workingDate);this.re
nderFooter();this.onRender();};YAHOO.widget.Calendar_Core.pr
ototype.renderHeader=function(){this.headerCell.innerHTML=&
quot;";var
headerContainer=document.createElement("DIV");he
aderContainer.className=this.Style.CSS_HEADER;headerContaine
r.appendChild(document.createTextNode(this.buildMonthLabel()
));this.headerCell.appendChild(headerContainer);};YAHOO.widg
et.Calendar_Core.prototype.renderBody=function(workingDate){
this.preMonthDays=workingDate.getDay();if(this.Options.START
_WEEKDAY>0){this.preMonthDays-=this.Options.START_WEEKDAY
;}
if(this.preMonthDays<0){this.preMonthDays+=7;}
this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDat
e).getDate();this.postMonthDays=YAHOO.widget.Calendar_Core.D
ISPLAY_DAYS-this.preMonthDays-this.monthDays;workingDate=YAH
OO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMat
h.DAY,this.preMonthDays);var weekRowIndex=0;for(var
c=0;c<this.cells.length;++c)
{var cellRenderers=new Array();var
cell=this.cells[c];this.clearElement(cell);cell.index=c;cell
.id=this.id+"_cell"+c;this.cellDates[this.cellDa
tes.length]=[workingDate.getFullYear(),workingDate.getMonth(
)+1,workingDate.getDate()];if(workingDate.getDay()==this.Opt
ions.START_WEEKDAY){var rowHeaderCell=null;var
rowFooterCell=null;if(this.Options.SHOW_WEEK_HEADER){rowHead
erCell=this.weekHeaderCells[weekRowIndex];this.clearElement(
rowHeaderCell);}
if(this.Options.SHOW_WEEK_FOOTER){rowFooterCell=this.weekFoo
terCells[weekRowIndex];this.clearElement(rowFooterCell);}
if(this.Options.HIDE_BLANK_WEEKS&&this.isDateOOM(wor
kingDate)&&!YAHOO.widget.DateMath.isMonthOverlapWeek
(workingDate)){continue;}else{if(rowHeaderCell){this.renderR
owHeader(workingDate,rowHeaderCell);}
if(rowFooterCell){this.renderRowFooter(workingDate,rowFooter
Cell);}}}
var
renderer=null;if(workingDate.getFullYear()==this.today.getFu
llYear()&&workingDate.getMonth()==this.today.getMont
h()&&workingDate.getDate()==this.today.getDate())
{cellRenderers[cellRenderers.length]=this.renderCellStyleTod
ay;}
if(this.isDateOOM(workingDate))
{cellRenderers[cellRenderers.length]=this.renderCellNotThisM
onth;}else{for(var r=0;r<this.renderStack.length;++r)
{var rArray=this.renderStack[r];var type=rArray[0];var
month;var day;var year;switch(type){case
YAHOO.widget.Calendar_Core.DATE:month=rArray[1][1];day=rArra
y[1][2];year=rArray[1][0];if(workingDate.getMonth()+1==month
&&workingDate.getDate()==day&&workingDate.ge
tFullYear()==year)
{renderer=rArray[2];this.renderStack.splice(r,1);}
break;case
YAHOO.widget.Calendar_Core.MONTH_DAY:month=rArray[1][0];day=
rArray[1][1];if(workingDate.getMonth()+1==month&&wor
kingDate.getDate()==day)
{renderer=rArray[2];this.renderStack.splice(r,1);}
break;case YAHOO.widget.Calendar_Core.RANGE:var
date1=rArray[1][0];var date2=rArray[1][1];var
d1month=date1[1];var d1day=date1[2];var d1year=date1[0];var
d1=new Date(d1year,d1month-1,d1day);var d2month=date2[1];var
d2day=date2[2];var d2year=date2[0];var d2=new
Date(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1
.getTime()&&workingDate.getTime()<=d2.getTime())
{renderer=rArray[2];if(workingDate.getTime()==d2.getTime()){
this.renderStack.splice(r,1);}}
break;case YAHOO.widget.Calendar_Core.WEEKDAY:var
weekday=rArray[1][0];if(workingDate.getDay()+1==weekday)
{renderer=rArray[2];}
break;case
YAHOO.widget.Calendar_Core.MONTH:month=rArray[1][0];if(worki
ngDate.getMonth()+1==month)
{renderer=rArray[2];}
break;}
if(renderer){cellRenderers[cellRenderers.length]=renderer;}}
}
if(this._indexOfSelectedFieldArray([workingDate.getFullYear(
),workingDate.getMonth()+1,workingDate.getDate()])>-1)
{cellRenderers[cellRenderers.length]=this.renderCellStyleSel
ected;}
if(this.minDate)
{this.minDate=YAHOO.widget.DateMath.clearTime(this.minDate);
}
if(this.maxDate)
{this.maxDate=YAHOO.widget.DateMath.clearTime(this.maxDate);
}
if((this.minDate&&(workingDate.getTime()<this.min
Date.getTime()))||(this.maxDate&&(workingDate.getTim
e()>this.maxDate.getTime()))){cellRenderers[cellRenderers
.length]=this.renderOutOfBoundsDate;}else{cellRenderers[cell
Renderers.length]=this.renderCellDefault;}
for(var x=0;x<cellRenderers.length;++x)
{var
ren=cellRenderers[x];if(ren.call(this,workingDate,cell)==YAH
OO.widget.Calendar_Core.STOP_RENDER){break;}}
workingDate=YAHOO.widget.DateMath.add(workingDate,YAHOO.widg
et.DateMath.DAY,1);if(workingDate.getDay()==this.Options.STA
RT_WEEKDAY){weekRowIndex+=1;}
YAHOO.widget.Calendar_Core.addCssClass(cell,this.Style.CSS_C
ELL);if(c>=0&&c<=6){YAHOO.widget.Calendar_Core
.addCssClass(cell,this.Style.CSS_CELL_TOP);}
if((c%7)==0){YAHOO.widget.Calendar_Core.addCssClass(cell,thi
s.Style.CSS_CELL_LEFT);}
if(((c+1)%7)==0){YAHOO.widget.Calendar_Core.addCssClass(cell
,this.Style.CSS_CELL_RIGHT);}
var
postDays=this.postMonthDays;if(postDays>=7&&this.
Options.HIDE_BLANK_WEEKS){var
blankWeeks=Math.floor(postDays/7);for(var
p=0;p<blankWeeks;++p){postDays-=7;}}
if(c>=((this.preMonthDays+postDays+this.monthDays)-7)){YA
HOO.widget.Calendar_Core.addCssClass(cell,this.Style.CSS_CEL
L_BOTTOM);}}};YAHOO.widget.Calendar_Core.prototype.renderFoo
ter=function(){};YAHOO.widget.Calendar_Core.prototype._unloa
d=function(e,cal){for(var c in cal.cells){c=null;}
cal.cells=null;cal.tbody=null;cal.oDomContainer=null;cal.tab
le=null;cal.headerCell=null;cal=null;};YAHOO.widget.Calendar
_Core.prototype.renderOutOfBoundsDate=function(workingDate,c
ell){YAHOO.widget.Calendar_Core.addCssClass(cell,this.Style.
CSS_CELL_OOB);cell.innerHTML=workingDate.getDate();return
YAHOO.widget.Calendar_Core.STOP_RENDER;}
YAHOO.widget.Calendar_Core.prototype.renderRowHeader=functio
n(workingDate,cell){YAHOO.widget.Calendar_Core.addCssClass(c
ell,this.Style.CSS_ROW_HEADER);var
useYear=this.pageDate.getFullYear();if(!YAHOO.widget.DateMat
h.isYearOverlapWeek(workingDate)){useYear=workingDate.getFul
lYear();}
var
weekNum=YAHOO.widget.DateMath.getWeekNumber(workingDate,useY
ear,this.Options.START_WEEKDAY);cell.innerHTML=weekNum;if(th
is.isDateOOM(workingDate)&&!YAHOO.widget.DateMath.is
MonthOverlapWeek(workingDate)){YAHOO.widget.Calendar_Core.ad
dCssClass(cell,this.Style.CSS_CELL_OOM);}};YAHOO.widget.Cale
ndar_Core.prototype.renderRowFooter=function(workingDate,cel
l){YAHOO.widget.Calendar_Core.addCssClass(cell,this.Style.CS
S_ROW_FOOTER);if(this.isDateOOM(workingDate)&&!YAHOO
.widget.DateMath.isMonthOverlapWeek(workingDate)){YAHOO.widg
et.Calendar_Core.addCssClass(cell,this.Style.CSS_CELL_OOM);}
};YAHOO.widget.Calendar_Core.prototype.renderCellDefault=fun
ction(workingDate,cell){cell.innerHTML="";var
link=document.createElement("a");link.href=&quo
t;javascript:void(null);";link.name=this.id+"__
"+workingDate.getFullYear()+"_"+(workingDat
e.getMonth()+1)+"_"+workingDate.getDate();link.a
ppendChild(document.createTextNode(this.buildDayLabel(workin
gDate)));cell.appendChild(link);};YAHOO.widget.Calendar_
 Core.prototype.renderCellStyleHighlight1=function(workingDa
te,cell){YAHOO.widget.Calendar_Core.addCssClass(cell,this.St
yle.CSS_CELL_HIGHLIGHT1);};YAHOO.widget.Calendar_Core.protot
ype.renderCellStyleHighlight2=function(workingDate,cell){YAH
OO.widget.Calendar_Core.addCssClass(cell,this.Style.CSS_CELL
_HIGHLIGHT2);};YAHOO.widget.Calendar_Core.prototype.renderCe
llStyleHighlight3=function(workingDate,cell){YAHOO.widget.Ca
lendar_Core.addCssClass(cell,this.Style.CSS_CELL_HIGHLIGHT3)
;};YAHOO.widget.Calendar_Core.prototype.renderCellStyleHighl
ight4=function(workingDate,cell){YAHOO.widget.Calendar_Core.
addCssClass(cell,this.Style.CSS_CELL_HIGHLIGHT4);};YAHOO.wid
get.Calendar_Core.prototype.renderCellStyleToday=function(wo
rkingDate,cell){YAHOO.widget.Calendar_Core.addCssClass(cell,
this.Style.CSS_CELL_TODAY);};YAHOO.widget.Calendar_Core.prot
otype.renderCellStyleSelected=function(workingDate,cell){YAH
OO.widget.Calendar_Core.addCssClass(cell,this.Style.CSS_CELL
_SELECTED);};YAHOO.widget.Cale
 ndar_Core.prototype.renderCellNotThisMonth=function(working
Date,cell){YAHOO.widget.Calendar_Core.addCssClass(cell,this.
Style.CSS_CELL_OOM);cell.innerHTML=workingDate.getDate();ret
urn
YAHOO.widget.Calendar_Core.STOP_RENDER;};YAHOO.widget.Calend
ar_Core.prototype.renderBodyCellRestricted=function(workingD
ate,cell){YAHOO.widget.Calendar_Core.setCssClasses(cell,[thi
s.Style.CSS_CELL,this.Style.CSS_CELL_RESTRICTED]);cell.inner
HTML=workingDate.getDate();return
YAHOO.widget.Calendar_Core.STOP_RENDER;};YAHOO.widget.Calend
ar_Core.prototype.addMonths=function(count){this.pageDate=YA
HOO.widget.DateMath.add(this.pageDate,YAHOO.widget.DateMath.
MONTH,count);this.resetRenderers();this.onChangePage();};YAH
OO.widget.Calendar_Core.prototype.subtractMonths=function(co
unt){this.pageDate=YAHOO.widget.DateMath.subtract(this.pageD
ate,YAHOO.widget.DateMath.MONTH,count);this.resetRenderers()
;this.onChangePage();};YAHOO.widget.Calendar_Core.prototype.
addYears=function(count){this.pageDate=YAHOO.widget.
 DateMath.add(this.pageDate,YAHOO.widget.DateMath.YEAR,count
);this.resetRenderers();this.onChangePage();};YAHOO.widget.C
alendar_Core.prototype.subtractYears=function(count){this.pa
geDate=YAHOO.widget.DateMath.subtract(this.pageDate,YAHOO.wi
dget.DateMath.YEAR,count);this.resetRenderers();this.onChang
ePage();};YAHOO.widget.Calendar_Core.prototype.nextMonth=fun
ction(){this.addMonths(1);};YAHOO.widget.Calendar_Core.proto
type.previousMonth=function(){this.subtractMonths(1);};YAHOO
.widget.Calendar_Core.prototype.nextYear=function(){this.add
Years(1);};YAHOO.widget.Calendar_Core.prototype.previousYear
=function(){this.subtractYears(1);};YAHOO.widget.Calendar_Co
re.prototype.reset=function(){this.selectedDates.length=0;th
is.selectedDates=this._selectedDates.concat();this.pageDate=
new
Date(this._pageDate.getTime());this.onReset();};YAHOO.widget
.Calendar_Core.prototype.clear=function(){this.selectedDates
.length=0;this.pageDate=new
Date(this.today.getTime());this.onClear();};YAHOO.widget.C
 alendar_Core.prototype.select=function(date){this.onBeforeS
elect();var aToBeSelected=this._toFieldArray(date);for(var
a=0;a<aToBeSelected.length;++a)
{var
toSelect=aToBeSelected[a];if(this._indexOfSelectedFieldArray
(toSelect)==-1)
{this.selectedDates[this.selectedDates.length]=toSelect;}}
if(this.parent){this.parent.sync(this);}
this.onSelect();return
this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototy
pe.selectCell=function(cellIndex){this.onBeforeSelect();this
.cells=this.tbody.getElementsByTagName("TD");var
cell=this.cells[cellIndex];var
cellDate=this.cellDates[cellIndex];var
dCellDate=this._toDate(cellDate);var
selectDate=cellDate.concat();this.selectedDates.push(selectD
ate);if(this.parent){this.parent.sync(this);}
this.renderCellStyleSelected(dCellDate,cell);this.onSelect()
;this.doCellMouseOut.call(cell,null,this);return
this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototy
pe.deselect=function(date){this.onBeforeDeselect();var
aToBeSelected=this._toFieldArray(date);for(var
a=0;a<aToBeSelected.length;++a)
{var toSelect=aToBeSelected[a];var
index=this._indexOfSelectedFieldArray(toSelect);if(index!=-1
)
{this.selectedDates.splice(index,1);}}
if(this.parent){this.parent.sync(this);}
this.onDeselect();return
this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototy
pe.deselectCell=function(i){this.onBeforeDeselect();this.cel
ls=this.tbody.getElementsByTagName("TD");var
cell=this.cells[i];var cellDate=this.cellDates[i];var
cellDateIndex=this._indexOfSelectedFieldArray(cellDate);var
dCellDate=this._toDate(cellDate);var
selectDate=cellDate.concat();if(cellDateIndex>-1)
{if(this.pageDate.getMonth()==dCellDate.getMonth()&&
this.pageDate.getFullYear()==dCellDate.getFullYear())
{YAHOO.widget.Calendar_Core.removeCssClass(cell,this.Style.C
SS_CELL_SELECTED);}
this.selectedDates.splice(cellDateIndex,1);}
if(this.parent){this.parent.sync(this);}
this.onDeselect();return
this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototy
pe.deselectAll=function(){this.onBeforeDeselect();var
count=this.selectedDates.length;this.selectedDates.length=0;
if(this.parent){this.parent.sync(this);}
if(count>0){this.onDeselect();}
return
this.getSelectedDates();};YAHOO.widget.Calendar_Core.prototy
pe._toFieldArray=function(date){var returnDate=new
Array();if(date instanceof Date)
{returnDate=[[date.getFullYear(),date.getMonth()+1,date.getD
ate()]];}
else if(typeof date=='string')
{returnDate=this._parseDates(date);}
else if(date instanceof Array)
{for(var i=0;i<date.length;++i)
{var
d=date[i];returnDate[returnDate.length]=[d.getFullYear(),d.g
etMonth()+1,d.getDate()];}}
return
returnDate;};YAHOO.widget.Calendar_Core.prototype._toDate=fu
nction(dateFieldArray){if(dateFieldArray instanceof Date)
{return dateFieldArray;}else
{return new
Date(dateFieldArray[0],dateFieldArray[1]-1,dateFieldArray[2]
);}};YAHOO.widget.Calendar_Core.prototype._fieldArraysAreEqu
al=function(array1,array2){var
match=false;if(array1[0]==array2[0]&&array1[1]==arra
y2[1]&&array1[2]==array2[2])
{match=true;}
return
match;};YAHOO.widget.Calendar_Core.prototype._indexOfSelecte
dFieldArray=function(find){var selected=-1;for(var
s=0;s<this.selectedDates.length;++s)
{var
sArray=this.selectedDates[s];if(find[0]==sArray[0]&&
find[1]==sArray[1]&&find[2]==sArray[2])
{selected=s;break;}}
return
selected;};YAHOO.widget.Calendar_Core.prototype.isDateOOM=fu
nction(date){var
isOOM=false;if(date.getMonth()!=this.pageDate.getMonth()){is
OOM=true;}
return
isOOM;};YAHOO.widget.Calendar_Core.prototype.onBeforeSelect=
function(){if(!this.Options.MULTI_SELECT){this.clearAllBodyC
ellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}
};YAHOO.widget.Calendar_Core.prototype.onSelect=function(){}
;YAHOO.widget.Calendar_Core.prototype.onBeforeDeselect=funct
ion(){};YAHOO.widget.Calendar_Core.prototype.onDeselect=func
tion(){};YAHOO.widget.Calendar_Core.prototype.onChangePage=f
unction(){var
me=this;this.renderHeader();if(this.renderProcId){clearTimeo
ut(this.renderProcId);}
this.renderProcId=setTimeout(function(){me.render();me.rende
rProcId=null;},1);};YAHOO.widget.Calendar_Core.prototype.onR
ender=function(){};YAHOO.widget.Calendar_Core.prototype.onRe
set=function(){this.render();};YAHOO.widget.Calendar_Core.pr
ototype.onClear=function(){this.render();};YAHOO.widget.Cale
ndar_Core.prototype.validate=function(){return
true;};YAHOO.widget.Calendar_Core.prototype._parseDate=funct
ion(sDate){var
aDate=sDate.split(this.Locale.DATE_FIELD_DELIMITER);var
rArray;if(aDate.length==2)
{rArray=[aDate[this.Locale.MD_MONTH_POSITION-1],aDate[this.L
ocale.MD_DAY_POSITION-1]];rArray.type=YAHOO.widget.Calendar_
Core.MONTH_DAY;}else{rArray=[aDate[this.Locale.MDY_YEAR_POSI
TION-1],aDate[this.Locale.MDY_MONTH_POSITION-1],aDate[this.L
ocale.MDY_DAY_POSITION-1]];rArray.type=YAHOO.widget.Calendar
_Core.DATE;}
return
rArray;};YAHOO.widget.Calendar_Core.prototype._parseDates=fu
nction(sDates){var aReturn=new Array();var
aDates=sDates.split(this.Locale.DATE_DELIMITER);for(var
d=0;d<aDates.length;++d)
{var
sDate=aDates[d];if(sDate.indexOf(this.Locale.DATE_RANGE_DELI
MITER)!=-1){var
aRange=sDate.split(this.Locale.DATE_RANGE_DELIMITER);var
dateStart=this._parseDate(aRange[0]);var
dateEnd=this._parseDate(aRange[1]);var
fullRange=this._parseRange(dateStart,dateEnd);aReturn=aRetur
n.concat(fullRange);}else{var
aDate=this._parseDate(sDate);aReturn.push(aDate);}}
return
aReturn;};YAHOO.widget.Calendar_Core.prototype._parseRange=f
unction(startDate,endDate){var dStart=new
Date(startDate[0],startDate[1]-1,startDate[2]);var
dCurrent=YAHOO.widget.DateMath.add(new
Date(startDate[0],startDate[1]-1,startDate[2]),YAHOO.widget.
DateMath.DAY,1);var dEnd=new
Date(endDate[0],endDate[1]-1,endDate[2]);var results=new
Array();results.push(startDate);while(dCurrent.getTime()<
=dEnd.getTime())
{results.push([dCurrent.getFullYear(),dCurrent.getMonth()+1,
dCurrent.getDate()]);dCurrent=YAHOO.widget.DateMath.add(dCur
rent,YAHOO.widget.DateMath.DAY,1);}
return
results;};YAHOO.widget.Calendar_Core.prototype.resetRenderer
s=function(){this.renderStack=this._renderStack.concat();};Y
AHOO.widget.Calendar_Core.prototype.clearElement=function(ce
ll){cell.innerHTML="&nbsp;";cell.className=
"";};YAHOO.widget.Calendar_Core.prototype.addRend
erer=function(sDates,fnRender){var
aDates=this._parseDates(sDates);for(var
i=0;i<aDates.length;++i)
{var aDate=aDates[i];if(aDate.length==2)
{if(aDate[0]instanceof Array)
{this._addRenderer(YAHOO.widget.Calendar_Core.RANGE,aDate,fn
Render);}else{this._addRenderer(YAHOO.widget.Calendar_Core.M
ONTH_DAY,aDate,fnRender);}}else if(aDate.length==3)
{this._addRenderer(YAHOO.widget.Calendar_Core.DATE,aDate,fnR
ender);}}};YAHOO.widget.Calendar_Core.prototype._addRenderer
=function(type,aDates,fnRender){var
add=[type,aDates,fnRender];this.renderStack.unshift(add);thi
s._renderStack=this.renderStack.concat();};YAHOO.widget.Cale
ndar_Core.prototype.addMonthRenderer=function(month,fnRender
){this._addRenderer(YAHOO.widget.Calendar_Core.MONTH,[month]
,fnRender);};YAHOO.widget.Calendar_Core.prototype.addWeekday
Renderer=function(weekday,fnRender){this._addRenderer(YAHOO.
widget.Calendar_Core.WEEKDAY,[weekday],fnRender);};YAHOO.wid
get.Calendar_Core.addCssClass=function(element,style){if(ele
ment.className.length===0)
{element.className+=style;}else{element.className+="
"+style;}};YAHOO.widget.Calendar_Core.prependCssClass=
function(element,style){element.className=style+"
"+element.className;}
YAHOO.widget.Calendar_Core.removeCssClass=function(element,s
tyle){var aStyles=element.className.split("
");for(var s=0;s<aStyles.length;++s)
{if(aStyles[s]==style)
{aStyles.splice(s,1);break;}}
YAHOO.widget.Calendar_Core.setCssClasses(element,aStyles);};
YAHOO.widget.Calendar_Core.setCssClasses=function(element,aS
tyles){element.className="";var
className=aStyles.join("
");element.className=className;};YAHOO.widget.Calendar
_Core.prototype.clearAllBodyCellStyles=function(style){for(v
ar c=0;c<this.cells.length;++c)
{YAHOO.widget.Calendar_Core.removeCssClass(this.cells[c],sty
le);}};YAHOO.widget.Calendar_Core.prototype.setMonth=functio
n(month){this.pageDate.setMonth(month);};YAHOO.widget.Calend
ar_Core.prototype.setYear=function(year){this.pageDate.setFu
llYear(year);};YAHOO.widget.Calendar_Core.prototype.getSelec
tedDates=function(){var returnDates=new Array();for(var
d=0;d<this.selectedDates.length;++d)
{var dateArray=this.selectedDates[d];var date=new
Date(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.p
ush(date);}
returnDates.sort();return
returnDates;};YAHOO.widget.Calendar_Core._getBrowser=functio
n()
{var
ua=navigator.userAgent.toLowerCase();if(ua.indexOf('opera'
)!=-1)
return'opera';else if(ua.indexOf('msie')!=-1)
return'ie';else if(ua.indexOf('safari')!=-1)
return'safari';else if(ua.indexOf('gecko')!=-1)
return'gecko';else
return false;}
YAHOO.widget.Cal_Core=YAHOO.widget.Calendar_Core;YAHOO.widge
t.Calendar=function(id,containerId,monthyear,selected){if(ar
guments.length>0)
{this.init(id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar.prototype=new
YAHOO.widget.Calendar_Core();YAHOO.widget.Calendar.prototype
.buildShell=function(){this.border=document.createElement(&
quot;DIV");this.border.className=this.Style.CSS_BORDER
;this.table=document.createElement("TABLE");this
.table.cellSpacing=0;YAHOO.widget.Calendar_Core.setCssClasse
s(this.table,[this.Style.CSS_CALENDAR]);this.border.id=this.
id;this.buildShellHeader();this.buildShellBody();this.buildS
hellFooter();};YAHOO.widget.Calendar.prototype.renderShell=f
unction(){this.border.appendChild(this.table);this.oDomConta
iner.appendChild(this.border);this.shellRendered=true;};YAHO
O.widget.Calendar.prototype.renderHeader=function(){this.hea
derCell.innerHTML="";var
headerContainer=document.createElement("DIV");he
aderContainer.className=this.Style.CSS_HEADER;var
linkLeft=document.createElement("A");linkLeft.hr
ef="javascript:"+this.id+".previousMonth()
";var
imgLeft=document.createElement("IMG");imgLeft.sr
c=this.Options.NAV_ARROW_LEFT;imgLeft.className=thi
 s.Style.CSS_NAV_LEFT;linkLeft.appendChild(imgLeft);var
linkRight=document.createElement("A");linkRight.
href="javascript:"+this.id+".nextMonth()&
quot;;var
imgRight=document.createElement("IMG");imgRight.
src=this.Options.NAV_ARROW_RIGHT;imgRight.className=this.Sty
le.CSS_NAV_RIGHT;linkRight.appendChild(imgRight);headerConta
iner.appendChild(linkLeft);headerContainer.appendChild(docum
ent.createTextNode(this.buildMonthLabel()));headerContainer.
appendChild(linkRight);this.headerCell.appendChild(headerCon
tainer);};YAHOO.widget.Cal=YAHOO.widget.Calendar;YAHOO.widge
t.CalendarGroup=function(pageCount,id,containerId,monthyear,
selected){if(arguments.length>0)
{this.init(pageCount,id,containerId,monthyear,selected);}}
YAHOO.widget.CalendarGroup.prototype.init=function(pageCount
,id,containerId,monthyear,selected){this.id=id;this.selected
Dates=new
Array();this.containerId=containerId;this.pageCount=pageCoun
t;this.pages=new Array();for(var p=0;p<pageCount;++p)
{var
cal=this.constructChild(id+"_"+p,this.containerI
d+"_"+p,monthyear,selected);cal.parent=this;cal.
index=p;cal.pageDate.setMonth(cal.pageDate.getMonth()+p);cal
._pageDate=new
Date(cal.pageDate.getFullYear(),cal.pageDate.getMonth(),cal.
pageDate.getDate());this.pages.push(cal);}
this.doNextMonth=function(e,calGroup){calGroup.nextMonth();}
this.doPreviousMonth=function(e,calGroup){calGroup.previousM
onth();}};YAHOO.widget.CalendarGroup.prototype.setChildFunct
ion=function(fnName,fn){for(var
p=0;p<this.pageCount;++p){this.pages[p][fnName]=fn;}}
YAHOO.widget.CalendarGroup.prototype.callChildFunction=funct
ion(fnName,args){for(var p=0;p<this.pageCount;++p){var
page=this.pages[p];if(page[fnName]){var
fn=page[fnName];fn.call(page,args);}}}
YAHOO.widget.CalendarGroup.prototype.constructChild=function
(id,containerId,monthyear,selected){return new
YAHOO.widget.Calendar_Core(id,containerId,monthyear,selected
);};YAHOO.widget.CalendarGroup.prototype.setMonth=function(m
onth){for(var p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.setMonth(month+p);}};YAHOO.widget.Cale
ndarGroup.prototype.setYear=function(year){for(var
p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];if((cal.pageDate.getMonth()+1)==1&&
;p>0)
{year+=1;}
cal.setYear(year);}};YAHOO.widget.CalendarGroup.prototype.re
nder=function(){for(var p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.render();}};YAHOO.widget.CalendarGroup
.prototype.select=function(date){var ret;for(var
p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.select(date);}
return
ret;};YAHOO.widget.CalendarGroup.prototype.selectCell=functi
on(cellIndex){var ret;for(var
p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.selectCell(cellIndex);}
return
ret;};YAHOO.widget.CalendarGroup.prototype.deselect=function
(date){var ret;for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.deselect(date);}
return
ret;};YAHOO.widget.CalendarGroup.prototype.deselectAll=funct
ion(){var ret;for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];ret=cal.deselectAll();}
return
ret;};YAHOO.widget.CalendarGroup.prototype.deselectCell=func
tion(cellIndex){for(var p=0;p<this.pages.length;++p)
{var cal=this.pages[p];cal.deselectCell(cellIndex);}
return
this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototy
pe.reset=function(){for(var p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.reset();}};YAHOO.widget.CalendarGroup.
prototype.clear=function(){for(var
p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.clear();}};YAHOO.widget.CalendarGroup.
prototype.nextMonth=function(){for(var
p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.nextMonth();}};YAHOO.widget.CalendarGr
oup.prototype.previousMonth=function(){for(var
p=this.pages.length-1;p>=0;--p)
{var
cal=this.pages[p];cal.previousMonth();}};YAHOO.widget.Calend
arGroup.prototype.nextYear=function(){for(var
p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.nextYear();}};YAHOO.widget.CalendarGro
up.prototype.previousYear=function(){for(var
p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.previousYear();}};YAHOO.widget.Calenda
rGroup.prototype.sync=function(caller){var
calendar;if(caller)
{this.selectedDates=caller.selectedDates.concat();}else{var
hash=new Object();var combinedDates=new Array();for(var
p=0;p<this.pages.length;++p)
{calendar=this.pages[p];var
values=calendar.selectedDates;for(var
v=0;v<values.length;++v)
{var
valueArray=values[v];hash[valueArray.toString()]=valueArray;
}}
for(var val in hash)
{combinedDates[combinedDates.length]=hash[val];}
this.selectedDates=combinedDates.concat();}
for(p=0;p<this.pages.length;++p)
{calendar=this.pages[p];if(!calendar.Options.MULTI_SELECT){c
alendar.clearAllBodyCellStyles(calendar.Config.Style.CSS_CEL
L_SELECTED);}
calendar.selectedDates=this.selectedDates.concat();}
return
this.getSelectedDates();};YAHOO.widget.CalendarGroup.prototy
pe.getSelectedDates=function(){var returnDates=new
Array();for(var d=0;d<this.selectedDates.length;++d)
{var dateArray=this.selectedDates[d];var date=new
Date(dateArray[0],dateArray[1]-1,dateArray[2]);returnDates.p
ush(date);}
returnDates.sort();return
returnDates;};YAHOO.widget.CalendarGroup.prototype.addRender
er=function(sDates,fnRender){for(var
p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.addRenderer(sDates,fnRender);}};YAHOO.
widget.CalendarGroup.prototype.addMonthRenderer=function(mon
th,fnRender){for(var p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.addMonthRenderer(month,fnRender);}};YA
HOO.widget.CalendarGroup.prototype.addWeekdayRenderer=functi
on(weekday,fnRender){for(var p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal.addWeekdayRenderer(weekday,fnRender);}
};YAHOO.widget.CalendarGroup.prototype.wireEvent=function(ev
entName,fn){for(var p=0;p<this.pages.length;++p)
{var
cal=this.pages[p];cal[eventName]=fn;}};YAHOO.widget.CalGrp=Y
AHOO.widget.CalendarGroup;YAHOO.widget.Calendar2up_Cal=funct
ion(id,containerId,monthyear,selected){if(arguments.length&g
t;0)
{this.init(id,containerId,monthyear,selected);}}
YAHOO.widget.Calendar2up_Cal.prototype=new
YAHOO.widget.Calendar_Core();YAHOO.widget.Calendar2up_Cal.pr
ototype.renderHeader=function(){this.headerCell.innerHTML=&
quot;";var
headerContainer=document.createElement("DIV");he
aderContainer.className=this.Style.CSS_HEADER;if(this.index=
=0){var
linkLeft=document.createElement("A");linkLeft.hr
ef="javascript:void(null)";YAHOO.util.Event.addL
istener(linkLeft,"click",this.parent.doPreviousM
onth,this.parent);var
imgLeft=document.createElement("IMG");imgLeft.sr
c=this.Options.NAV_ARROW_LEFT;imgLeft.className=this.Style.C
SS_NAV_LEFT;linkLeft.appendChild(imgLeft);headerContainer.ap
pendChild(linkLeft);}
headerContainer.appendChild(document.createTextNode(this.bui
ldMonthLabel()));if(this.index==1){var
linkRight=document.createElement("A");linkRight.
href="javascript:void(null)";YAHOO.util.Event.ad
dListener(linkRight,"click",this.parent.doNextMo
nth,this.parent);var
imgRight=document.createElement("IMG");imgRight.
src=this.Options.NAV_ARROW_RIGHT;imgRight.className=this.Sty
le.CSS_NAV_RIGHT;linkRight.appendChild(imgRight);headerConta
iner.appendChild(linkRight);}
this.headerCell.appendChild(headerContainer);};YAHOO.widget.
Calendar2up=function(id,containerId,monthyear,selected){if(a
rguments.length>0)
{this.buildWrapper(containerId);this.init(2,id,containerId,m
onthyear,selected);}}
YAHOO.widget.Calendar2up.prototype=new
YAHOO.widget.CalendarGroup();YAHOO.widget.Calendar2up.protot
ype.constructChild=function(id,containerId,monthyear,selecte
d){var cal=new
YAHOO.widget.Calendar2up_Cal(id,containerId,monthyear,select
ed);return
cal;};YAHOO.widget.Calendar2up.prototype.buildWrapper=functi
on(containerId){var
outerContainer=document.getElementById(containerId);outerCon
tainer.className="calcontainer";var
innerContainer=document.createElement("DIV");inn
erContainer.className="calbordered";innerContain
er.id=containerId+"_inner";var
cal1Container=document.createElement("DIV");cal1
Container.id=containerId+"_0";cal1Container.clas
sName="cal2up";cal1Container.style.marginRight=
"10px";var
cal2Container=document.createElement("DIV");cal2
Container.id=containerId+"_1";cal2Container.clas
sName="cal2up";outerContainer.appendChild(innerC
ontainer);innerContainer.appendChild(cal1Container);innerCon
tainer.appendChild(cal2Container);this.innerContainer=innerC
ontainer;this.outerConta
 iner=outerContainer;}
YAHOO.widget.Calendar2up.prototype.render=function(){this.re
nderHeader();YAHOO.widget.CalendarGroup.prototype.render.cal
l(this);this.renderFooter();};YAHOO.widget.Calendar2up.proto
type.renderHeader=function(){if(!this.title){this.title=&qu
ot;";}
if(!this.titleDiv)
{this.titleDiv=document.createElement("DIV");if(
this.title=="")
{this.titleDiv.style.display="none";}}
this.titleDiv.className="title";this.titleDiv.in
nerHTML=this.title;if(this.outerContainer.style.position==&
quot;absolute")
{var
linkClose=document.createElement("A");linkClose.
href="javascript:void(null)";YAHOO.util.Event.ad
dListener(linkClose,"click",this.hide,this);var
imgClose=document.createElement("IMG");imgClose.
src=YAHOO.widget.Calendar_Core.IMG_ROOT+"us/my/bn/x_d.
gif";imgClose.className="close-icon";linkC
lose.appendChild(imgClose);this.linkClose=linkClose;this.tit
leDiv.appendChild(linkClose);}
this.innerContainer.insertBefore(this.titleDiv,this.innerCon
tainer.firstChild);}
YAHOO.widget.Calendar2up.prototype.hide=function(e,cal){if(!
cal)
{cal=this;}
cal.outerContainer.style.display="none";}
YAHOO.widget.Calendar2up.prototype.renderFooter=function(){}
YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;
--- NEW FILE: calendar.js ---
/*
Copyright (c) 2006, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://dev
eloper.yahoo.net/yui/license.txt
version: 0.10.0
*/
/**
* class
* <p>YAHOO.widget.DateMath is used for simple date
manipulation. The class is a static utility
* used for adding, subtracting, and comparing
dates.</p>
*/
YAHOO.widget.DateMath = new function() {

	/**
	* Constant field representing Day
	* type String
	*/
	this.DAY = "D";

[...2779 lines suppressed...]
}

/**
* Hides the 2-up calendar's outer container from view.
*/
YAHOO.widget.Calendar2up.prototype.hide = function(e, cal) {
	if (! cal)
	{
		cal = this;
	}
	cal.outerContainer.style.display = "none";
}

/**
* Renders a footer for the 2-up calendar container. By
default, this method is
* unimplemented.
*/
YAHOO.widget.Calendar2up.prototype.renderFooter = function()
{}

YAHOO.widget.Cal2up = YAHOO.widget.Calendar2up;
_______________________________________________
geeklog2-cvs mailing list
geeklog2-cvslists.geeklog.net
http://lists.geeklog.net/mailman/listinfo/geeklog2-cvs

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )