function getAnchorPosition(_1){
var _2=false;
var _3=new Object();
var x=0,y=0;
var _6=false,_7=false,_8=false;
if(document.getElementById){
_6=true;
}else{
if(document.all){
_7=true;
}else{
if(document.layers){
_8=true;
}
}
}
if(_6&&document.all){
x=AnchorPosition_getPageOffsetLeft(document.all[_1]);
y=AnchorPosition_getPageOffsetTop(document.all[_1]);
}else{
if(_6){
var o=document.getElementById(_1);
x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o);
}else{
if(_7){
x=AnchorPosition_getPageOffsetLeft(document.all[_1]);
y=AnchorPosition_getPageOffsetTop(document.all[_1]);
}else{
if(_8){
var _a=0;
for(var i=0;i<document.anchors.length;i++){
if(document.anchors[i].name==_1){
_a=1;
break;
}
}
if(_a==0){
_3.x=0;
_3.y=0;
return _3;
}
x=document.anchors[i].x;
y=document.anchors[i].y;
}else{
_3.x=0;
_3.y=0;
return _3;
}
}
}
}
_3.x=x;
_3.y=y;
return _3;
};
function getAnchorWindowPosition(_c){
var _d=getAnchorPosition(_c);
var x=0;
var y=0;
if(document.getElementById){
if(isNaN(window.screenX)){
x=_d.x-document.body.scrollLeft+window.screenLeft;
y=_d.y-document.body.scrollTop+window.screenTop;
}else{
x=_d.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
y=_d.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
}
}else{
if(document.all){
x=_d.x-document.body.scrollLeft+window.screenLeft;
y=_d.y-document.body.scrollTop+window.screenTop;
}else{
if(document.layers){
x=_d.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
y=_d.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
}
}
}
_d.x=x;
_d.y=y;
return _d;
};
function AnchorPosition_getPageOffsetLeft(el){
var ol=el.offsetLeft;
while((el=el.offsetParent)!=null){
ol+=el.offsetLeft;
}
return ol;
};
function AnchorPosition_getWindowOffsetLeft(el){
return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
};
function AnchorPosition_getPageOffsetTop(el){
var ot=el.offsetTop;
while((el=el.offsetParent)!=null){
ot+=el.offsetTop;
}
return ot;
};
function AnchorPosition_getWindowOffsetTop(el){
return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
};
var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");
function LZ(x){
return (x<0||x>9?"":"0")+x;
};
function isDate(val,_18){
var _19=getDateFromFormat(val,_18);
if(_19==0){
return false;
}
return true;
};
function compareDates(_1a,_1b,_1c,_1d){
var d1=getDateFromFormat(_1a,_1b);
var d2=getDateFromFormat(_1c,_1d);
if(d1==0||d2==0){
return -1;
}else{
if(d1>d2){
return 1;
}
}
return 0;
};
function formatDate(_20,_21){
_21=_21+"";
var _22="";
var _23=0;
var c="";
var _25="";
var y=_20.getYear()+"";
var M=_20.getMonth()+1;
var d=_20.getDate();
var E=_20.getDay();
var H=_20.getHours();
var m=_20.getMinutes();
var s=_20.getSeconds();
var _2d,yy,MMM,MM,dd,hh,h,mm,ss,_36,HH,H,KK,K,kk,k;
var _3c=new Object();
if(y.length<4){
y=""+(y-0+1900);
}
_3c["y"]=""+y;
_3c["yyyy"]=y;
_3c["yy"]=y.substring(2,4);
_3c["M"]=M;
_3c["MM"]=LZ(M);
_3c["MMM"]=MONTH_NAMES[M-1];
_3c["NNN"]=MONTH_NAMES[M+11];
_3c["d"]=d;
_3c["dd"]=LZ(d);
_3c["E"]=DAY_NAMES[E+7];
_3c["EE"]=DAY_NAMES[E];
_3c["H"]=H;
_3c["HH"]=LZ(H);
if(H==0){
_3c["h"]=12;
}else{
if(H>12){
_3c["h"]=H-12;
}else{
_3c["h"]=H;
}
}
_3c["hh"]=LZ(_3c["h"]);
if(H>11){
_3c["K"]=H-12;
}else{
_3c["K"]=H;
}
_3c["k"]=H+1;
_3c["KK"]=LZ(_3c["K"]);
_3c["kk"]=LZ(_3c["k"]);
if(H>11){
_3c["a"]="PM";
}else{
_3c["a"]="AM";
}
_3c["m"]=m;
_3c["mm"]=LZ(m);
_3c["s"]=s;
_3c["ss"]=LZ(s);
while(_23<_21.length){
c=_21.charAt(_23);
_25="";
while((_21.charAt(_23)==c)&&(_23<_21.length)){
_25+=_21.charAt(_23++);
}
if(_3c[_25]!=null){
_22=_22+_3c[_25];
}else{
_22=_22+_25;
}
}
return _22;
};
function _isInteger(val){
var _3e="1234567890";
for(var i=0;i<val.length;i++){
if(_3e.indexOf(val.charAt(i))==-1){
return false;
}
}
return true;
};
function _getInt(str,i,_42,_43){
for(var x=_43;x>=_42;x--){
var _45=str.substring(i,i+x);
if(_45.length<_42){
return null;
}
if(_isInteger(_45)){
return _45;
}
}
return null;
};
function getDateFromFormat(val,_47){
val=val+"";
_47=_47+"";
var _48=0;
var _49=0;
var c="";
var _4b="";
var _4c="";
var x,y;
var now=new Date();
var _50=now.getYear();
var _51=now.getMonth()+1;
var _52=1;
var hh=now.getHours();
var mm=now.getMinutes();
var ss=now.getSeconds();
var _56="";
while(_49<_47.length){
c=_47.charAt(_49);
_4b="";
while((_47.charAt(_49)==c)&&(_49<_47.length)){
_4b+=_47.charAt(_49++);
}
if(_4b=="yyyy"||_4b=="yy"||_4b=="y"){
if(_4b=="yyyy"){
x=4;
y=4;
}
if(_4b=="yy"){
x=2;
y=2;
}
if(_4b=="y"){
x=2;
y=4;
}
_50=_getInt(val,_48,x,y);
if(_50==null){
return 0;
}
_48+=_50.length;
if(_50.length==2){
if(_50>70){
_50=1900+(_50-0);
}else{
_50=2000+(_50-0);
}
}
}else{
if(_4b=="MMM"||_4b=="NNN"){
_51=0;
for(var i=0;i<MONTH_NAMES.length;i++){
var _58=MONTH_NAMES[i];
if(val.substring(_48,_48+_58.length).toLowerCase()==_58.toLowerCase()){
if(_4b=="MMM"||(_4b=="NNN"&&i>11)){
_51=i+1;
if(_51>12){
_51-=12;
}
_48+=_58.length;
break;
}
}
}
if((_51<1)||(_51>12)){
return 0;
}
}else{
if(_4b=="EE"||_4b=="E"){
for(var i=0;i<DAY_NAMES.length;i++){
var _59=DAY_NAMES[i];
if(val.substring(_48,_48+_59.length).toLowerCase()==_59.toLowerCase()){
_48+=_59.length;
break;
}
}
}else{
if(_4b=="MM"||_4b=="M"){
_51=_getInt(val,_48,_4b.length,2);
if(_51==null||(_51<1)||(_51>12)){
return 0;
}
_48+=_51.length;
}else{
if(_4b=="dd"||_4b=="d"){
_52=_getInt(val,_48,_4b.length,2);
if(_52==null||(_52<1)||(_52>31)){
return 0;
}
_48+=_52.length;
}else{
if(_4b=="hh"||_4b=="h"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<1)||(hh>12)){
return 0;
}
_48+=hh.length;
}else{
if(_4b=="HH"||_4b=="H"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<0)||(hh>23)){
return 0;
}
_48+=hh.length;
}else{
if(_4b=="KK"||_4b=="K"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<0)||(hh>11)){
return 0;
}
_48+=hh.length;
}else{
if(_4b=="kk"||_4b=="k"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<1)||(hh>24)){
return 0;
}
_48+=hh.length;
hh--;
}else{
if(_4b=="mm"||_4b=="m"){
mm=_getInt(val,_48,_4b.length,2);
if(mm==null||(mm<0)||(mm>59)){
return 0;
}
_48+=mm.length;
}else{
if(_4b=="ss"||_4b=="s"){
ss=_getInt(val,_48,_4b.length,2);
if(ss==null||(ss<0)||(ss>59)){
return 0;
}
_48+=ss.length;
}else{
if(_4b=="a"){
if(val.substring(_48,_48+2).toLowerCase()=="am"){
_56="AM";
}else{
if(val.substring(_48,_48+2).toLowerCase()=="pm"){
_56="PM";
}else{
return 0;
}
}
_48+=2;
}else{
if(val.substring(_48,_48+_4b.length)!=_4b){
return 0;
}else{
_48+=_4b.length;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(_48!=val.length){
return 0;
}
if(_51==2){
if(((_50%4==0)&&(_50%100!=0))||(_50%400==0)){
if(_52>29){
return 0;
}
}else{
if(_52>28){
return 0;
}
}
}
if((_51==4)||(_51==6)||(_51==9)||(_51==11)){
if(_52>30){
return 0;
}
}
if(hh<12&&_56=="PM"){
hh=hh-0+12;
}else{
if(hh>11&&_56=="AM"){
hh-=12;
}
}
var _5a=new Date(_50,_51-1,_52,hh,mm,ss);
return _5a.getTime();
};
function parseDate(val){
var _5c=(arguments.length==2)?arguments[1]:false;
generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");
monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");
dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");
var _5d=new Array("generalFormats",_5c?"dateFirst":"monthFirst",_5c?"monthFirst":"dateFirst");
var d=null;
for(var i=0;i<_5d.length;i++){
var l=window[_5d[i]];
for(var j=0;j<l.length;j++){
d=getDateFromFormat(val,l[j]);
if(d!=0){
return new Date(d);
}
}
}
return null;
};
function PopupWindow_getXYPosition(_62){
var _63;
if(this.type=="WINDOW"){
_63=getAnchorWindowPosition(_62);
}else{
_63=getAnchorPosition(_62);
}
this.x=_63.x;
this.y=_63.y;
};
function PopupWindow_setSize(_64,_65){
this.width=_64;
this.height=_65;
};
function PopupWindow_populate(_66){
this.contents=_66;
this.populated=false;
};
function PopupWindow_setUrl(url){
this.url=url;
};
function PopupWindow_setWindowProperties(_68){
this.windowProperties=_68;
};
function PopupWindow_refresh(){
if(this.divName!=null){
if(this.use_gebi){
document.getElementById(this.divName).innerHTML=this.contents;
}else{
if(this.use_css){
document.all[this.divName].innerHTML=this.contents;
}else{
if(this.use_layers){
var d=document.layers[this.divName];
d.document.open();
d.document.writeln(this.contents);
d.document.close();
}
}
}
}else{
if(this.popupWindow!=null&&!this.popupWindow.closed){
if(this.url!=""){
this.popupWindow.location.href=this.url;
}else{
this.popupWindow.document.open();
this.popupWindow.document.writeln(this.contents);
this.popupWindow.document.close();
}
this.popupWindow.focus();
}
}
};
function PopupWindow_showPopup(_6a){
this.getXYPosition(_6a);
this.x+=this.offsetX;
this.y+=this.offsetY;
if(!this.populated&&(this.contents!="")){
this.populated=true;
this.refresh();
}
if(this.divName!=null){
if(this.use_gebi){
document.getElementById(this.divName).style.left=this.x+"px";
document.getElementById(this.divName).style.top=this.y+"px";
document.getElementById(this.divName).style.visibility="visible";
}else{
if(this.use_css){
document.all[this.divName].style.left=this.x;
document.all[this.divName].style.top=this.y;
document.all[this.divName].style.visibility="visible";
}else{
if(this.use_layers){
document.layers[this.divName].left=this.x;
document.layers[this.divName].top=this.y;
document.layers[this.divName].visibility="visible";
}
}
}
}else{
if(this.popupWindow==null||this.popupWindow.closed){
if(this.x<0){
this.x=0;
}
if(this.y<0){
this.y=0;
}
if(screen&&screen.availHeight){
if((this.y+this.height)>screen.availHeight){
this.y=screen.availHeight-this.height;
}
}
if(screen&&screen.availWidth){
if((this.x+this.width)>screen.availWidth){
this.x=screen.availWidth-this.width;
}
}
var _6b=window.opera||(document.layers&&!navigator.mimeTypes["*"])||navigator.vendor=="KDE"||(document.childNodes&&!document.all&&!navigator.taintEnabled);
this.popupWindow=window.open(_6b?"":"about:blank","window_"+_6a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
}
this.refresh();
}
};
function PopupWindow_hidePopup(){
if(this.divName!=null){
if(this.use_gebi){
document.getElementById(this.divName).style.visibility="hidden";
}else{
if(this.use_css){
document.all[this.divName].style.visibility="hidden";
}else{
if(this.use_layers){
document.layers[this.divName].visibility="hidden";
}
}
}
}else{
if(this.popupWindow&&!this.popupWindow.closed){
this.popupWindow.close();
this.popupWindow=null;
}
}
};
function PopupWindow_isClicked(e){
if(this.divName!=null){
if(this.use_layers){
var _6d=e.pageX;
var _6e=e.pageY;
var t=document.layers[this.divName];
if((_6d>t.left)&&(_6d<t.left+t.clip.width)&&(_6e>t.top)&&(_6e<t.top+t.clip.height)){
return true;
}else{
return false;
}
}else{
if(document.all){
var t=window.event.srcElement;
while(t.parentElement!=null){
if(t.id==this.divName){
return true;
}
t=t.parentElement;
}
return false;
}else{
if(this.use_gebi&&e){
var t=e.target;
while(t.parentNode!=null){
if(t.id==this.divName){
return true;
}
t=t.parentNode;
}
return false;
}
}
}
return false;
}
return false;
};
function PopupWindow_hideIfNotClicked(e){
if(this.autoHideEnabled&&!this.isClicked(e)){
this.hidePopup();
}
};
function PopupWindow_autoHide(){
this.autoHideEnabled=true;
};
function PopupWindow_hidePopupWindows(e){
for(var i=0;i<popupWindowObjects.length;i++){
if(popupWindowObjects[i]!=null){
var p=popupWindowObjects[i];
p.hideIfNotClicked(e);
}
}
};
function PopupWindow_attachListener(){
if(document.layers){
document.captureEvents(Event.MOUSEUP);
}
window.popupWindowOldEventListener=document.onmouseup;
if(window.popupWindowOldEventListener!=null){
document.onmouseup=new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();");
}else{
document.onmouseup=PopupWindow_hidePopupWindows;
}
};
function PopupWindow(){
if(!window.popupWindowIndex){
window.popupWindowIndex=0;
}
if(!window.popupWindowObjects){
window.popupWindowObjects=new Array();
}
if(!window.listenerAttached){
window.listenerAttached=true;
PopupWindow_attachListener();
}
this.index=popupWindowIndex++;
popupWindowObjects[this.index]=this;
this.divName=null;
this.popupWindow=null;
this.width=0;
this.height=0;
this.populated=false;
this.visible=false;
this.autoHideEnabled=false;
this.contents="";
this.url="";
this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
if(arguments.length>0){
this.type="DIV";
this.divName=arguments[0];
}else{
this.type="WINDOW";
}
this.use_gebi=false;
this.use_css=false;
this.use_layers=false;
if(document.getElementById){
this.use_gebi=true;
}else{
if(document.all){
this.use_css=true;
}else{
if(document.layers){
this.use_layers=true;
}else{
this.type="WINDOW";
}
}
}
this.offsetX=0;
this.offsetY=0;
this.getXYPosition=PopupWindow_getXYPosition;
this.populate=PopupWindow_populate;
this.setUrl=PopupWindow_setUrl;
this.setWindowProperties=PopupWindow_setWindowProperties;
this.refresh=PopupWindow_refresh;
this.showPopup=PopupWindow_showPopup;
this.hidePopup=PopupWindow_hidePopup;
this.setSize=PopupWindow_setSize;
this.isClicked=PopupWindow_isClicked;
this.autoHide=PopupWindow_autoHide;
this.hideIfNotClicked=PopupWindow_hideIfNotClicked;
};
function CalendarPopup(){
var c;
if(arguments.length>0){
c=new PopupWindow(arguments[0]);
}else{
c=new PopupWindow();
c.setSize(150,175);
}
c.offsetX=0;
c.offsetY=20;
c.autoHide();
c.monthNames=new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
c.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
c.dayHeaders=new Array("D","L","M","M","J","V","S");
c.returnFunction="CP_tmpReturnFunction";
c.returnMonthFunction="CP_tmpReturnMonthFunction";
c.returnQuarterFunction="CP_tmpReturnQuarterFunction";
c.returnYearFunction="CP_tmpReturnYearFunction";
c.weekStartDay=0;
c.isShowYearNavigation=false;
c.displayType="date";
c.disabledWeekDays=new Object();
c.disabledDatesExpression="";
c.yearSelectStartOffset=2;
c.currentDate=null;
c.todayText="";
c.cssPrefix="";
c.isShowNavigationDropdowns=false;
c.isShowYearNavigationInput=false;
window.CP_calendarObject=null;
window.CP_targetInput=null;
window.CP_dateFormat="MM/dd/yyyy";
c.copyMonthNamesToWindow=CP_copyMonthNamesToWindow;
c.setReturnFunction=CP_setReturnFunction;
c.setReturnMonthFunction=CP_setReturnMonthFunction;
c.setReturnQuarterFunction=CP_setReturnQuarterFunction;
c.setReturnYearFunction=CP_setReturnYearFunction;
c.setMonthNames=CP_setMonthNames;
c.setMonthAbbreviations=CP_setMonthAbbreviations;
c.setDayHeaders=CP_setDayHeaders;
c.setWeekStartDay=CP_setWeekStartDay;
c.setDisplayType=CP_setDisplayType;
c.setDisabledWeekDays=CP_setDisabledWeekDays;
c.addDisabledDates=CP_addDisabledDates;
c.setYearSelectStartOffset=CP_setYearSelectStartOffset;
c.setTodayText=CP_setTodayText;
c.showYearNavigation=CP_showYearNavigation;
c.showCalendar=CP_showCalendar;
c.hideCalendar=CP_hideCalendar;
c.getStyles=getCalendarStyles;
c.refreshCalendar=CP_refreshCalendar;
c.getCalendar=CP_getCalendar;
c.select=CP_select;
c.setCssPrefix=CP_setCssPrefix;
c.showNavigationDropdowns=CP_showNavigationDropdowns;
c.showYearNavigationInput=CP_showYearNavigationInput;
c.copyMonthNamesToWindow();
return c;
};
function CP_copyMonthNamesToWindow(){
if(typeof (window.MONTH_NAMES)!="undefined"&&window.MONTH_NAMES!=null){
window.MONTH_NAMES=new Array();
for(var i=0;i<this.monthNames.length;i++){
window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthNames[i];
}
for(var i=0;i<this.monthAbbreviations.length;i++){
window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthAbbreviations[i];
}
}
};
function getday(_76,_77,_78){
if(_78){
dateD=_76[0]+_76[1];
dateM=_76[3]+_76[4];
dateY=_76.substr(6,4);
_76=dateM+"/"+dateD+"/"+dateY;
}
var d=new Date(_76);
var _7a=new Array(7);
_7a[0]="Domingo";
_7a[1]="Lunes";
_7a[2]="Martes";
_7a[3]="Miercoles";
_7a[4]="Jueves";
_7a[5]="Viernes";
_7a[6]="Sabado";
day=_7a[d.getDay()];
tagDay=_77+"_day";
if(day){
t=document.getElementById(tagDay);
if(t){
t.innerHTML=day;
}
}
};
function CP_tmpReturnFunction(y,m,d){
if(window.CP_targetInput!=null){
var dt=new Date(y,m-1,d,0,0,0);
if(window.CP_calendarObject!=null){
window.CP_calendarObject.copyMonthNamesToWindow();
}
window.CP_targetInput.value=formatDate(dt,window.CP_dateFormat);
}else{
alert("Use setReturnFunction() to define which function will get the clicked results!");
}
tagDate=window.CP_targetInput.name;
window.getday(window.CP_targetInput.value,tagDate,true);
};
function CP_tmpReturnMonthFunction(y,m){
alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , month="+m);
};
function CP_tmpReturnQuarterFunction(y,q){
alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , quarter="+q);
};
function CP_tmpReturnYearFunction(y){
alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+y);
};
function CP_setReturnFunction(_84){
this.returnFunction=_84;
};
function CP_setReturnMonthFunction(_85){
this.returnMonthFunction=_85;
};
function CP_setReturnQuarterFunction(_86){
this.returnQuarterFunction=_86;
};
function CP_setReturnYearFunction(_87){
this.returnYearFunction=_87;
};
function CP_setMonthNames(){
for(var i=0;i<arguments.length;i++){
this.monthNames[i]=arguments[i];
}
this.copyMonthNamesToWindow();
};
function CP_setMonthAbbreviations(){
for(var i=0;i<arguments.length;i++){
this.monthAbbreviations[i]=arguments[i];
}
this.copyMonthNamesToWindow();
};
function CP_setDayHeaders(){
for(var i=0;i<arguments.length;i++){
this.dayHeaders[i]=arguments[i];
}
};
function CP_setWeekStartDay(day){
this.weekStartDay=day;
};
function CP_showYearNavigation(){
this.isShowYearNavigation=(arguments.length>0)?arguments[0]:true;
};
function CP_setDisplayType(_8c){
if(_8c!="date"&&_8c!="week-end"&&_8c!="month"&&_8c!="quarter"&&_8c!="year"){
alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");
return false;
}
this.displayType=_8c;
};
function CP_setYearSelectStartOffset(num){
this.yearSelectStartOffset=num;
};
function CP_setDisabledWeekDays(){
this.disabledWeekDays=new Object();
for(var i=0;i<arguments.length;i++){
this.disabledWeekDays[arguments[i]]=true;
}
};
function CP_addDisabledDates(_8f,end){
if(arguments.length==1){
end=_8f;
}
if(_8f==null&&end==null){
return;
}
if(this.disabledDatesExpression!=""){
this.disabledDatesExpression+="||";
}
if(_8f!=null){
_8f=parseDate(_8f);
_8f=""+_8f.getFullYear()+LZ(_8f.getMonth()+1)+LZ(_8f.getDate());
}
if(end!=null){
end=parseDate(end);
end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());
}
if(_8f==null){
this.disabledDatesExpression+="(ds<="+end+")";
}else{
if(end==null){
this.disabledDatesExpression+="(ds>="+_8f+")";
}else{
this.disabledDatesExpression+="(ds>="+_8f+"&&ds<="+end+")";
}
}
};
function CP_setTodayText(_91){
this.todayText=_91;
};
function CP_setCssPrefix(val){
this.cssPrefix=val;
};
function CP_showNavigationDropdowns(){
this.isShowNavigationDropdowns=(arguments.length>0)?arguments[0]:true;
};
function CP_showYearNavigationInput(){
this.isShowYearNavigationInput=(arguments.length>0)?arguments[0]:true;
};
function CP_hideCalendar(){
if(arguments.length>0){
window.popupWindowObjects[arguments[0]].hidePopup();
}else{
this.hidePopup();
}
};
function CP_refreshCalendar(_93){
var _94=window.popupWindowObjects[_93];
if(arguments.length>1){
_94.populate(_94.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));
}else{
_94.populate(_94.getCalendar());
}
_94.refresh();
};
function CP_showCalendar(_95){
if(arguments.length>1){
if(arguments[1]==null||arguments[1]==""){
this.currentDate=new Date();
}else{
this.currentDate=new Date(parseDate(arguments[1]));
}
}
this.populate(this.getCalendar());
this.showPopup(_95);
};
function CP_select(_96,_97,_98){
var _99=(arguments.length>3)?arguments[3]:null;
if(!window.getDateFromFormat){
alert("calendar.select: To use this method you must also include 'date.js' for date formatting");
return;
}
if(this.displayType!="date"&&this.displayType!="week-end"){
alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");
return;
}
if(_96.type!="text"&&_96.type!="hidden"&&_96.type!="textarea"){
alert("calendar.select: Input object passed is not a valid form input object");
window.CP_targetInput=null;
return;
}
if(_96.disabled){
return;
}
window.CP_targetInput=_96;
window.CP_calendarObject=this;
this.currentDate=null;
var _9a=0;
if(_99!=null){
_9a=getDateFromFormat(_99,_98);
}else{
if(_96.value!=""){
_9a=getDateFromFormat(_96.value,_98);
}
}
if(_99!=null||_96.value!=""){
if(_9a==0){
this.currentDate=null;
}else{
this.currentDate=new Date(_9a);
}
}
window.CP_dateFormat=_98;
this.showCalendar(_97);
};
function getCalendarStyles(){
var _9b="";
var p="";
if(this!=null&&typeof (this.cssPrefix)!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!=""){
p=this.cssPrefix;
}
_9b+="<STYLE>\n";
_9b+="."+p+"cpYearNavigation,."+p+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";
_9b+="."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText{font-family:arial;font-size:8pt;}\n";
_9b+="TD."+p+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0px 0px 1px 0px;}\n";
_9b+="."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate{text-align:right;text-decoration:none;}\n";
_9b+="."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";
_9b+="."+p+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";
_9b+="."+p+"cpOtherMonthDate{color:#808080;}\n";
_9b+="TD."+p+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1px;border:solid thin #800000;}\n";
_9b+="TD."+p+"cpCurrentDateDisabled{border-width:1px;border:solid thin #FFAAAA;}\n";
_9b+="TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1px 0px 0px 0px;}\n";
_9b+="A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled{height:20px;}\n";
_9b+="A."+p+"cpTodayText{color:black;}\n";
_9b+="."+p+"cpTodayTextDisabled{color:#D0D0D0;}\n";
_9b+="."+p+"cpBorder{border:solid thin #808080;}\n";
_9b+="</STYLE>\n";
return _9b;
};
function CP_getCalendar(){
var now=new Date();
if(this.type=="WINDOW"){
var _9e="window.opener.";
}else{
var _9e="";
}
var _9f="";
if(this.type=="WINDOW"){
_9f+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
_9f+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n";
}else{
_9f+="<TABLE CLASS=\""+this.cssPrefix+"cpBorder\" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n";
_9f+="<TR><TD ALIGN=CENTER>\n";
_9f+="<CENTER>\n";
}
if(this.displayType=="date"||this.displayType=="week-end"){
if(this.currentDate==null){
this.currentDate=now;
}
if(arguments.length>0){
var _a0=arguments[0];
}else{
var _a0=this.currentDate.getMonth()+1;
}
if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1]){
var _a1=arguments[1];
}else{
var _a1=this.currentDate.getFullYear();
}
var _a2=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if(((_a1%4==0)&&(_a1%100!=0))||(_a1%400==0)){
_a2[2]=29;
}
var _a3=new Date(_a1,_a0-1,1);
var _a4=_a1;
var _a5=_a0;
var _a6=1;
var _a7=_a3.getDay();
var _a8=0;
_a8=(_a7>=this.weekStartDay)?_a7-this.weekStartDay:7-this.weekStartDay+_a7;
if(_a8>0){
_a5--;
if(_a5<1){
_a5=12;
_a4--;
}
_a6=_a2[_a5]-_a8+1;
}
var _a9=_a0+1;
var _aa=_a1;
if(_a9>12){
_a9=1;
_aa++;
}
var _ab=_a0-1;
var _ac=_a1;
if(_ab<1){
_ab=12;
_ac--;
}
var _ad;
if(this.type!="WINDOW"){
_9f+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
}
_9f+="<TR>\n";
var _ae=_9e+"CP_refreshCalendar";
var _af="javascript:"+_ae;
if(this.isShowNavigationDropdowns){
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"78\" COLSPAN=\"3\"><select CLASS=\""+this.cssPrefix+"cpMonthNavigation\" name=\"cpMonth\" onChange=\""+_ae+"("+this.index+",this.options[this.selectedIndex].value-0,"+(_a1-0)+");\">";
for(var _b0=1;_b0<=12;_b0++){
var _b1=(_b0==_a0)?"SELECTED":"";
_9f+="<option value=\""+_b0+"\" "+_b1+">"+this.monthNames[_b0-1]+"</option>";
}
_9f+="</select></TD>";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\">&nbsp;</TD>";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"56\" COLSPAN=\"3\"><select CLASS=\""+this.cssPrefix+"cpYearNavigation\" name=\"cpYear\" onChange=\""+_ae+"("+this.index+","+_a0+",this.options[this.selectedIndex].value-0);\">";
for(var _b2=_a1-this.yearSelectStartOffset;_b2<=_a1+this.yearSelectStartOffset;_b2++){
var _b1=(_b2==_a1)?"SELECTED":"";
_9f+="<option value=\""+_b2+"\" "+_b1+">"+_b2+"</option>";
}
_9f+="</select></TD>";
}else{
if(this.isShowYearNavigation){
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_af+"("+this.index+","+_ab+","+_ac+");\">&lt;</A></TD>";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"58\"><SPAN CLASS=\""+this.cssPrefix+"cpMonthNavigation\">"+this.monthNames[_a0-1]+"</SPAN></TD>";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_af+"("+this.index+","+_a9+","+_aa+");\">&gt;</A></TD>";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\">&nbsp;</TD>";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\""+_af+"("+this.index+","+_a0+","+(_a1-1)+");\">&lt;</A></TD>";
if(this.isShowYearNavigationInput){
_9f+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"36\"><INPUT NAME=\"cpYear\" CLASS=\""+this.cssPrefix+"cpYearNavigation\" SIZE=\"4\" MAXLENGTH=\"4\" VALUE=\""+_a1+"\" onBlur=\""+_ae+"("+this.index+","+_a0+",this.value-0);\"></TD>";
}else{
_9f+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"36\"><SPAN CLASS=\""+this.cssPrefix+"cpYearNavigation\">"+_a1+"</SPAN></TD>";
}
_9f+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\""+_af+"("+this.index+","+_a0+","+(_a1+1)+");\">&gt;</A></TD>";
}else{
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_af+"("+this.index+","+_ab+","+_ac+");\">&lt;&lt;</A></TD>\n";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"100\"><SPAN CLASS=\""+this.cssPrefix+"cpMonthNavigation\">"+this.monthNames[_a0-1]+" "+_a1+"</SPAN></TD>\n";
_9f+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_af+"("+this.index+","+_a9+","+_aa+");\">&gt;&gt;</A></TD>\n";
}
}
_9f+="</TR></TABLE>\n";
_9f+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";
_9f+="<TR>\n";
for(var j=0;j<7;j++){
_9f+="<TD CLASS=\""+this.cssPrefix+"cpDayColumnHeader\" WIDTH=\"14%\"><SPAN CLASS=\""+this.cssPrefix+"cpDayColumnHeader\">"+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n";
}
_9f+="</TR>\n";
for(var row=1;row<=6;row++){
_9f+="<TR>\n";
for(var col=1;col<=7;col++){
var _b6=false;
if(this.disabledDatesExpression!=""){
var ds=""+_a4+LZ(_a5)+LZ(_a6);
eval("disabled=("+this.disabledDatesExpression+")");
}
var _b8="";
if((_a5==this.currentDate.getMonth()+1)&&(_a6==this.currentDate.getDate())&&(_a4==this.currentDate.getFullYear())){
_b8="cpCurrentDate";
}else{
if(_a5==_a0){
_b8="cpCurrentMonthDate";
}else{
_b8="cpOtherMonthDate";
}
}
if(_b6||this.disabledWeekDays[col-1]){
_9f+="\t<TD CLASS=\""+this.cssPrefix+_b8+"\"><SPAN CLASS=\""+this.cssPrefix+_b8+"Disabled\">"+_a6+"</SPAN></TD>\n";
}else{
var _b9=_a6;
var _ba=_a5;
var _bb=_a4;
if(this.displayType=="week-end"){
var d=new Date(_bb,_ba-1,_b9,0,0,0,0);
d.setDate(d.getDate()+(7-col));
_bb=d.getYear();
if(_bb<1000){
_bb+=1900;
}
_ba=d.getMonth()+1;
_b9=d.getDate();
}
_9f+="\t<TD CLASS=\""+this.cssPrefix+_b8+"\"><A HREF=\"javascript:"+_9e+this.returnFunction+"("+_bb+","+_ba+","+_b9+");"+_9e+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+this.cssPrefix+_b8+"\">"+_a6+"</A></TD>\n";
}
_a6++;
if(_a6>_a2[_a5]){
_a6=1;
_a5++;
}
if(_a5>12){
_a5=1;
_a4++;
}
}
_9f+="</TR>";
}
var _bd=now.getDay()-this.weekStartDay;
if(_bd<0){
_bd+=7;
}
_9f+="<TR>\n";
_9f+="\t<TD COLSPAN=7 ALIGN=CENTER CLASS=\""+this.cssPrefix+"cpTodayText\">\n";
if(this.disabledDatesExpression!=""){
var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());
eval("disabled=("+this.disabledDatesExpression+")");
}
if(_b6||this.disabledWeekDays[_bd+1]){
_9f+="\t\t<SPAN CLASS=\""+this.cssPrefix+"cpTodayTextDisabled\">"+this.todayText+"</SPAN>\n";
}else{
_9f+="\t\t<A CLASS=\""+this.cssPrefix+"cpTodayText\" HREF=\"javascript:"+_9e+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+_9e+"CP_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n";
}
_9f+="\t\t<BR>\n";
_9f+="\t</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){
if(arguments.length>0){
var _a1=arguments[0];
}else{
if(this.displayType=="year"){
var _a1=now.getFullYear()-this.yearSelectStartOffset;
}else{
var _a1=now.getFullYear();
}
}
if(this.displayType!="year"&&this.isShowYearNavigation){
_9f+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
_9f+="<TR>\n";
_9f+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9e+"CP_refreshCalendar("+this.index+","+(_a1-1)+");\">&lt;&lt;</A></TD>\n";
_9f+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"100\">"+_a1+"</TD>\n";
_9f+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9e+"CP_refreshCalendar("+this.index+","+(_a1+1)+");\">&gt;&gt;</A></TD>\n";
_9f+="</TR></TABLE>\n";
}
}
if(this.displayType=="month"){
_9f+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";
for(var i=0;i<4;i++){
_9f+="<TR>";
for(var j=0;j<3;j++){
var _bf=((i*3)+j);
_9f+="<TD WIDTH=33% ALIGN=CENTER><A CLASS=\""+this.cssPrefix+"cpText\" HREF=\"javascript:"+_9e+this.returnMonthFunction+"("+_a1+","+(_bf+1)+");"+_9e+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+_ad+"\">"+this.monthAbbreviations[_bf]+"</A></TD>";
}
_9f+="</TR>";
}
_9f+="</TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.displayType=="quarter"){
_9f+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";
for(var i=0;i<2;i++){
_9f+="<TR>";
for(var j=0;j<2;j++){
var _c0=((i*2)+j+1);
_9f+="<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS=\""+this.cssPrefix+"cpText\" HREF=\"javascript:"+_9e+this.returnQuarterFunction+"("+_a1+","+_c0+");"+_9e+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+_ad+"\">Q"+_c0+"</A><BR><BR></TD>";
}
_9f+="</TR>";
}
_9f+="</TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.displayType=="year"){
var _c1=4;
_9f+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
_9f+="<TR>\n";
_9f+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"50%\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9e+"CP_refreshCalendar("+this.index+","+(_a1-(_c1*2))+");\">&lt;&lt;</A></TD>\n";
_9f+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"50%\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9e+"CP_refreshCalendar("+this.index+","+(_a1+(_c1*2))+");\">&gt;&gt;</A></TD>\n";
_9f+="</TR></TABLE>\n";
_9f+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";
for(var i=0;i<_c1;i++){
for(var j=0;j<2;j++){
var _c2=_a1+(j*_c1)+i;
_9f+="<TD WIDTH=50% ALIGN=CENTER><A CLASS=\""+this.cssPrefix+"cpText\" HREF=\"javascript:"+_9e+this.returnYearFunction+"("+_c2+");"+_9e+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+_ad+"\">"+_c2+"</A></TD>";
}
_9f+="</TR>";
}
_9f+="</TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.type=="WINDOW"){
_9f+="</BODY></HTML>\n";
}
return _9f;
};

