Frame 1
function calendarHandler() {
txtDate = _root.cpCalendar.getSelectedItem();
tempStr = txtDate.toString();
tempStr = tempStr.substr(0, 3);
switch (tempStr) {
case "Sun" :
getCWeekDay = "Sunday";
break;
case "Mon" :
getCWeekDay = "Monday";
break;
case "Tue" :
getCWeekDay = "Tuesday";
break;
case "Wed" :
getCWeekDay = "Wednesday";
break;
case "Thu" :
getCWeekDay = "Thursday";
break;
case "Fri" :
getCWeekDay = "Friday";
break;
case "Sat" :
getCWeekDay = "Saturday";
}
tempStr = txtDate.toString();
tempStr = tempStr.substr(4, 3);
switch (tempStr) {
case "Jan" :
getCMonth = "January";
break;
case "Feb" :
getCMonth = "February";
break;
case "Mar" :
getCMonth = "March";
break;
case "Apr" :
getCMonth = "April";
break;
case "May" :
getCMonth = "May";
break;
case "Jun" :
getCMonth = "Jun";
break;
case "Jul" :
getCMonth = "July";
break;
case "Aug" :
getCMonth = "August";
break;
case "Sep" :
getCMonth = "September";
break;
case "Oct" :
getCMonth = "October";
break;
case "Nov" :
getCMonth = "November";
break;
case "Dec" :
getCMonth = "December";
}
tempStr = txtDate.toString();
tempStr = tempStr.substr(8, 2);
if (parseInt(tempStr) < 10) {
tempStr = tempStr.substr(0, 1);
}
getCDay = tempStr;
switch (parseInt(getCDay)) {
case 1 :
getExt = "st";
break;
case 21 :
getExt = "st";
break;
case 31 :
getExt = "st";
break;
case 2 :
getExt = "nd";
break;
case 22 :
getExt = "nd";
break;
case 3 :
getExt = "rd";
break;
case 23 :
getExt = "rd";
break;
default :
getExt = "th";
}
tempStr = txtDate.toString();
tempStr = tempStr.substr(-4, 4);
getCYear = tempStr;
getCDate = getCWeekDay + ", ";
getCDate = getCDate + (getCMonth + " ");
getCDate = getCDate + ((getCDay + getExt) + " ");
getCDate = getCDate + getCYear;
txtDate2 = getCDate;
if (!getCYear) {
txtDate2 = "";
}
}
if (!started) {
frmCalendar = new FStyleFormat();
frmCalendar.addListener(cpCalendar);
frmCalendar.face = 3355443 /* 0x333333 */;
frmCalendar.shadow = 6710886 /* 0x666666 */;
frmCalendar.darkShadow = 3355443 /* 0x333333 */;
frmCalendar.highlight = 1776411 /* 0x1B1B1B */;
frmCalendar.highlight3D = 10066329 /* 0x999999 */;
frmCalendar.arrow = 13421772 /* 0xCCCCCC */;
frmCalendar.foregroundDisabled = 16711680 /* 0xFF0000 */;
frmCalendar.dayBackground = 1776411 /* 0x1B1B1B */;
frmCalendar.dayBorder = 0;
frmCalendar.background = 1776411 /* 0x1B1B1B */;
frmCalendar.dateBackground = 3355443 /* 0x333333 */;
frmCalendar.dateBorder = 0;
frmCalendar.emptyDateBackground = 3355443 /* 0x333333 */;
frmCalendar.emptyDateBorder = 0;
frmCalendar.selectedDateBackground = 6710886 /* 0x666666 */;
frmCalendar.selectedDateBorder = 3355443 /* 0x333333 */;
frmCalendar.todayBorder = 16763904 /* 0xFFCC00 */;
frmCalendar.backgroundDisabled = 3355443 /* 0x333333 */;
frmCalendar.textFont = "Trebuchet MS, Arial, _sans";
frmCalendar.textColor = 13421772 /* 0xCCCCCC */;
frmCalendar.applyChanges();
started = true;
}
stop();
Instance of Symbol 95 MovieClip [FCalendarSymbol] "cpCalendar" in Frame 1
//component parameters
onClipEvent (initialize) {
selectionType = "multiple";
changeHandler = "calendarHandler";
monthNames = [];
monthNames[0] = "January";
monthNames[1] = "February";
monthNames[2] = "March";
monthNames[3] = "April";
monthNames[4] = "May";
monthNames[5] = "June";
monthNames[6] = "July";
monthNames[7] = "August";
monthNames[8] = "September";
monthNames[9] = "October";
monthNames[10] = "November";
monthNames[11] = "December";
dayOfWeekNames = [];
dayOfWeekNames[0] = "Sun";
dayOfWeekNames[1] = "Mon";
dayOfWeekNames[2] = "Tue";
dayOfWeekNames[3] = "Wed";
dayOfWeekNames[4] = "Thu";
dayOfWeekNames[5] = "Fri";
dayOfWeekNames[6] = "Sat";
firstDayOfWeek = 0;
}
Symbol 8 MovieClip [fcal_monthDay_mc] Frame 1
var component = _parent._parent;
component.registerSkinElement(fill, "dateBackground");
component.registerSkinElement(bottom, "dateBorder");
component.registerSkinElement(right, "dateBorder");
component.registerSkinElement(left, "dateBorder");
component.registerSkinElement(top, "dateBorder");
Symbol 15 MovieClip [fcal_monthDaySelected_mc] Frame 1
var component = _parent._parent;
component.registerSkinElement(fill, "selectedDateBackground");
component.registerSkinElement(bottom, "selectedDateBorder");
component.registerSkinElement(right, "selectedDateBorder");
component.registerSkinElement(left, "selectedDateBorder");
component.registerSkinElement(top, "selectedDateBorder");
Symbol 22 MovieClip [fcal_monthDay_empty_mc] Frame 1
var component = _parent._parent;
component.registerSkinElement(fill, "emptyDateBackground");
component.registerSkinElement(bottom, "emptyDateBorder");
component.registerSkinElement(right, "emptyDateBorder");
component.registerSkinElement(left, "emptyDateBorder");
component.registerSkinElement(top, "emptyDateBorder");
Symbol 26 MovieClip [FLabelSymbol] Frame 1
#initclip 3
_global.FLabelClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.customTextStyle == undefined) {
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var _local2 = this.hostComponent.styleTable.embedFonts.value;
if (_local2 != undefined) {
this.labelField.embedFonts = _local2;
}
this.labelField.setNewTextFormat(this.textStyle);
this.labelField.text = label;
this.labelField._height = this.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
this.enable = enable;
var _local2 = this.hostComponent.styleTable[(enable ? "textColor" : "textDisabled")].value;
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
this.setColor(_local2);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 28 MovieClip [FMultiTextComponentSymbol] Frame 1
#initclip 1
FMultiTextComponentClass = function () {
if (this.hostComponent == undefined) {
this.hostComponent = ((this._parent.controller == undefined) ? (this._parent) : (this._parent.controller));
}
if (this.hostComponent.textStyle == undefined) {
this.hostComponent.textStyle = new TextFormat();
}
this.textStyle = this.hostComponent.textStyle;
this.enable = true;
this.registerTextElement = FMultiTextComponentClass.prototype.registerTextElement;
this.setCustomStyleProperty = FMultiTextComponentClass.prototype.setCustomStyleProperty;
};
FMultiTextComponentClass.prototype.registerTextElement = function (fLabelInstance, propertyName) {
if (this.textFormatTable == undefined) {
this.textFormatTable = new Object();
}
this.textFormatTable[propertyName] = true;
if (this.styleTable == undefined) {
this.styleTable = new Object();
}
if (this.styleTable[propertyName] == undefined) {
this.styleTable[propertyName] = new Object();
this.styleTable[propertyName].useGlobal = true;
}
if (this.styleTable[propertyName].textInstances == undefined) {
this.styleTable[propertyName].textInstances = new Object();
}
this.styleTable[propertyName].textInstances[fLabelInstance] = fLabelInstance;
if (fLabelInstance.prototype.setEnabledFixed == undefined) {
fLabelInstance.setEnabled = FMultiTextComponentClass.prototype.setEnabledFixed;
}
if (this.styleTable[propertyName].value != undefined) {
fLabelInstance.textStyle = this.styleTable[propertyName].value;
fLabelInstance.setLabel(fLabelInstance.getLabel());
}
};
FMultiTextComponentClass.prototype.setCustomStyleProperty = function (propertyName, value) {
if (!this.textFormatTable[propertyName]) {
return(false);
}
this.invalidate("setSize");
for (var _local5 in this.styleTable[propertyName].textInstances) {
var _local2 = this.styleTable[propertyName].textInstances[_local5];
_local2.textStyle = value;
_local2.labelField.embedFonts = ((this.styleTable.embedFonts != undefined) ? (this.styleTable.embedFonts.value) : false);
_local2.setLabel(_local2.getLabel());
}
return(true);
};
FMultiTextComponentClass.prototype.setEnabledFixed = function (enable) {
this.enable = enable;
var _local2 = (enable ? (this.textStyle.color) : (this.hostComponent.styleTable.textDisabled.value));
if (_local2 == undefined) {
_local2 = (enable ? 0 : 8947848);
}
this.setColor(_local2);
};
#endinitclip
Symbol 34 MovieClip [fcal_todayIndicator_mc] Frame 1
var component = _parent._parent;
component.registerSkinElement(bottom, "todayBorder");
component.registerSkinElement(right, "todayBorder");
component.registerSkinElement(left, "todayBorder");
component.registerSkinElement(top, "todayBorder");
Symbol 41 MovieClip [fcal_dayOfWeek_mc] Frame 1
var component = _parent;
component.registerSkinElement(fill, "dayBackground");
component.registerSkinElement(bottom, "dayBorder");
component.registerSkinElement(right, "dayBorder");
component.registerSkinElement(left, "dayBorder");
component.registerSkinElement(top, "dayBorder");
Symbol 42 MovieClip [FUIComponentSymbol] Frame 1
#initclip 2
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
this.enable = true;
this.focused = false;
this.useHandCursor = false;
this._accImpl = new Object();
this._accImpl.stub = true;
this.styleTable = new Array();
if (_global.globalStyleFormat == undefined) {
_global.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_global._focusControl = new Object();
_global._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_global._focusControl);
}
if (this._name != undefined) {
this._focusrect = false;
this.tabEnabled = true;
this.focusEnabled = true;
this.tabChildren = false;
this.tabFocused = true;
if (this.hostStyle == undefined) {
globalStyleFormat.addListener(this);
} else {
this.styleTable = this.hostStyle;
}
this.deadPreview._visible = false;
this.deadPreview._width = (this.deadPreview._height = 1);
this.methodTable = new Object();
this.keyListener = new Object();
this.keyListener.controller = this;
this.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
this.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local3 in this.styleFormat_prm) {
this.setStyleProperty(_local3, this.styleFormat_prm[_local3]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
this.enable = ((arguments.length > 0) ? (enabledFlag) : true);
this.tabEnabled = (this.focusEnabled = enabledFlag);
if ((!this.enable) && (this.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
this.width = w;
this.height = h;
this.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
this.handlerObj = ((obj == undefined) ? (this._parent) : (obj));
this.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
this.methodTable[methodName] = true;
this.onEnterFrame = this.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
if (this.methodTable.setSize) {
this.setSize(this.width, this.height);
} else {
this.cleanUINotSize();
}
this.methodTable = new Object();
delete this.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
for (var _local2 in this.methodTable) {
this[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local4 = this.styleTable.focusRectInner.value;
var _local5 = this.styleTable.focusRectOuter.value;
if (_local4 == undefined) {
_local4 = 16777215 /* 0xFFFFFF */;
}
if (_local5 == undefined) {
_local5 = 0;
}
this.createEmptyMovieClip("focusRect", 1000);
this.focusRect.controller = this;
this.focusRect.lineStyle(1, _local5);
this.focusRect.moveTo(x, y);
this.focusRect.lineTo(x + w, y);
this.focusRect.lineTo(x + w, y + h);
this.focusRect.lineTo(x, y + h);
this.focusRect.lineTo(x, y);
this.focusRect.lineStyle(1, _local4);
this.focusRect.moveTo(x + 1, y + 1);
this.focusRect.lineTo((x + w) - 1, y + 1);
this.focusRect.lineTo((x + w) - 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, (y + h) - 1);
this.focusRect.lineTo(x + 1, y + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
this.tabFocused = false;
this.focusRect.removeMovieClip();
Selection.setFocus(this);
};
FUIComponentClass.prototype.drawFocusRect = function () {
this.drawRect(-2, -2, this.width + 4, this.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
this.focused = true;
Key.addListener(this.keyListener);
if (this.tabFocused) {
this.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
this.tabFocused = true;
this.focused = false;
this.focusRect.removeMovieClip();
Key.removeListener(this.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
this.handlerObj[this.changeHandler](this);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
if (value == "") {
return(undefined);
}
var _local17 = parseInt(value);
if (!isNaN(_local17)) {
value = _local17;
}
var _local16 = ((arguments.length > 2) ? (isGlobal) : false);
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].useGlobal || (!_local16)) {
this.styleTable[propName].value = value;
if (this.setCustomStyleProperty(propName, value)) {
} else if (propName == "embedFonts") {
this.invalidate("setSize");
} else if (propName.subString(0, 4) == "text") {
if (this.textStyle == undefined) {
this.textStyle = new TextFormat();
}
var _local18 = propName.subString(4, propName.length);
this.textStyle[_local18] = value;
this.invalidate("setSize");
} else {
for (var _local15 in this.styleTable[propName].coloredMCs) {
var _local4 = new Color(this.styleTable[propName].coloredMCs[_local15]);
if (this.styleTable[propName].value == undefined) {
var _local5 = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local4.setTransform(_local5);
} else {
_local4.setRGB(value);
}
}
}
this.styleTable[propName].useGlobal = _local16;
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
if (this.styleTable[propName] == undefined) {
this.styleTable[propName] = new Object();
this.styleTable[propName].useGlobal = true;
}
if (this.styleTable[propName].coloredMCs == undefined) {
this.styleTable[propName].coloredMCs = new Object();
}
this.styleTable[propName].coloredMCs[skinMCRef] = skinMCRef;
if (this.styleTable[propName].value != undefined) {
var _local3 = new Color(skinMCRef);
_local3.setRGB(this.styleTable[propName].value);
}
};
_global.FStyleFormat = function () {
this.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
this.listeners = new Object();
this.isGlobal = false;
if (arguments.length > 0) {
for (var _local3 in arguments[0]) {
this[_local3] = arguments[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local3 = 0;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
this.listeners[arguments[_local3]] = _local4;
for (var _local5 in this) {
if (this.isAStyle(_local5)) {
_local4.updateStyleProperty(this, _local5.toString());
}
}
_local3++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
this.listeners[component] = undefined;
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
if (component.styleTable[_local4].useGlobal == this.isGlobal) {
component.styleTable[_local4].useGlobal = true;
var _local3 = (this.isGlobal ? undefined : (globalStyleFormat[_local4]));
component.setStyleProperty(_local4, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local6 = 0;
for (var _local5 in this.listeners) {
var _local3 = this.listeners[_local5];
if (arguments.length > 0) {
var _local4 = 0;
while (_local4 < arguments.length) {
if (this.isAStyle(arguments[_local4])) {
_local3.updateStyleProperty(this, arguments[_local4]);
}
_local4++;
}
} else {
for (var _local4 in this) {
if (this.isAStyle(_local4)) {
_local3.updateStyleProperty(this, _local4.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 49 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 57 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 62 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame4, "shadow");
component.registerSkinElement(frame2, "darkshadow");
component.registerSkinElement(frame3, "highlight");
component.registerSkinElement(frame1, "highlight3D");
Symbol 68 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(frame5, "face");
component.registerSkinElement(frame3, "shadow");
component.registerSkinElement(frame1, "darkshadow");
component.registerSkinElement(frame4, "highlight");
component.registerSkinElement(frame2, "highlight3D");
Symbol 71 MovieClip [fcal_fwdMonth_mc] Frame 1
var component = _parent;
component.registerSkinElement(arrow_up, "arrow");
component.registerSkinElement(arrow_over, "arrow");
component.registerSkinElement(arrow_down, "arrow");
component.registerSkinElement(arrow_disabled, "foregroundDisabled");
this.onPress = function () {
var _local2 = this._parent;
_local2.StepDate(0, 1);
};
stop();
Symbol 76 MovieClip [fcal_backMonth_mc] Frame 1
var component = _parent;
component.registerSkinElement(arrow_up, "arrow");
component.registerSkinElement(arrow_over, "arrow");
component.registerSkinElement(arrow_down, "arrow");
component.registerSkinElement(arrow_disabled, "foregroundDisabled");
this.onPress = function () {
var _local2 = this._parent;
_local2.StepDate(0, -1);
};
stop();
Symbol 81 MovieClip [fcal_backYear_mc] Frame 1
var component = _parent;
component.registerSkinElement(arrow_up, "arrow");
component.registerSkinElement(arrow_over, "arrow");
component.registerSkinElement(arrow_down, "arrow");
component.registerSkinElement(arrow_disabled, "foregroundDisabled");
this.onPress = function () {
var _local2 = this._parent;
_local2.StepDate(-1, 0);
};
stop();
Symbol 83 MovieClip [fcal_header_mc] Frame 1
var component = _parent;
component.registerSkinElement(fill, "background");
Symbol 87 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 87 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 92 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(arrow_up, "arrow");
component.registerSkinElement(arrow_over, "arrow");
component.registerSkinElement(arrow_down, "arrow");
component.registerSkinElement(arrow_disabled, "foregroundDisabled");
this.onPress = function () {
var _local2 = this._parent;
_local2.StepDate(1, 0);
};
stop();
Symbol 95 MovieClip [FCalendarSymbol] Frame 1
#initclip 4
FCalendarClass = function () {
FMultiTextComponentClass.apply(this);
this.init();
};
FCalendarClass.prototype = new FUIComponentClass();
Object.registerClass("FCalendarSymbol", FCalendarClass);
FCalendarClass.prototype.init = function () {
this.controller = this;
super.setSize(this._width, this._height);
this.boundingBox_mc.unloadMovie();
this.boundingBox_mc._x = this.boundingBox_mc._x + 100;
super.init();
this.setChangeHandler(this.changeHandler);
this.dayWidth = 30;
this.dayHeight = 22;
this.dayTextHeight = 20;
this.headerHeight = this.headerArea._y + this.headerArea._height;
this.leftEdge = 1;
this.controller = this;
this.setDayOfWeekNames(this.dayOfWeekNames, false);
this.setMonthNames(this.monthNames, false);
this.defaultFont = "Verdana";
this.selections = new Object();
this.anchor = undefined;
if (this.selectionType == undefined) {
this.selectionType = "multiple";
}
this.selectionRequired = false;
this.enabled = true;
if (this.firstDayOfWeek == undefined) {
this.firstDayOfWeek = 0;
}
this.dateFilter = undefined;
this.displayRange = new Object();
this.displayRange.beginTime = -1.79769313486232E308;
this.displayRange.endTime = Number.MAX_VALUE;
this.showAsDisabled = true;
this.dragListener = new Object();
this.dragListener.component = this;
this.dragListener.onMouseMove = function () {
this.component.updateDragSelection();
};
this.dragListener.onMouseUp = function () {
this.component.endDragSelection();
};
this.theBaseDate = new Date();
this.today = new Date(this.theBaseDate.getFullYear(), this.theBaseDate.getMonth(), this.theBaseDate.getDate());
this.caret = this.today;
this.guiInitPending = true;
this.invalidate("setSize");
this.tabChildren = false;
};
FCalendarClass.prototype.getSelectedItem = function () {
var _local3 = -1.79769313486232E308;
var _local4;
for (x in this.selections) {
var _local2 = this.selections[x];
if (_local2.getTime() >= _local3) {
_local3 = _local2.getTime();
_local4 = _local2;
}
}
return(_local4);
};
FCalendarClass.prototype.getSelectedItems = function () {
var _local2 = new Array();
for (x in this.selections) {
_local2.push(this.selections[x]);
}
return(_local2);
};
FCalendarClass.prototype.setSelectedItem = function (theDate, append, flag) {
if (arguments.length < 2) {
append = false;
}
if ((theDate.getFullYear() == undefined) && (theDate.length >= 1)) {
theDate = theDate[0];
}
if (this.selectionType == "single") {
append = false;
}
if (!append) {
this.selections = new Object();
}
if (theDate != undefined) {
this.selectDate(theDate);
}
if (flag != false) {
this.executeCallBack();
}
this.redraw();
return(true);
};
FCalendarClass.prototype.setSelectedItems = function (dates, append, flag) {
if (arguments.length < 2) {
append = false;
}
if (!append) {
this.selections = new Object();
}
if (dates == undefined) {
return(true);
}
i = 0;
while (i < dates.length) {
if (dates[i] != undefined) {
this.selectDate(dates[i]);
}
i++;
}
if (flag != false) {
this.executeCallBack();
}
this.redraw();
return(true);
};
FCalendarClass.prototype.getDisplayedMonth = function () {
return(this.currDisplay);
};
FCalendarClass.prototype.setDisplayedMonth = function (newMonth) {
this.currDisplay = newMonth;
this.redraw();
};
FCalendarClass.prototype.getDisplayRange = function () {
return(this.displayRange);
};
FCalendarClass.prototype.setDisplayRange = function (dateRange) {
var _local3 = dateRange.begin;
this.displayRange.beginTime = -1.79769313486232E308;
this.displayRange.endTime = Number.MAX_VALUE;
if (_local3 != undefined) {
_local3 = new Date(_local3.getFullYear(), _local3.getMonth(), _local3.getDate());
this.displayRange.beginTime = _local3.getTime();
}
var _local2 = dateRange.end;
if (_local2 != undefined) {
_local2 = new Date(_local2.getFullYear(), _local2.getMonth(), _local2.getDate(), 23, 59, 59);
this.displayRange.endTime = _local2.getTime();
}
this.displayRange.begin = _local3;
this.displayRange.end = _local2;
this.redraw();
return(true);
};
FCalendarClass.prototype.setDateFilter = function (aDateFilter) {
var _local2 = this.dateFilter;
this.dateFilter = aDateFilter;
this.redraw();
return(_local2);
};
FCalendarClass.prototype.getDayOfWeekNames = function () {
return(this.myDayOfWeekNames);
};
FCalendarClass.prototype.setDayOfWeekNames = function (dayNames, redraw) {
this.defaultDayOfWeekNames = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
if (this.myDayOfWeekNames == undefined) {
this.myDayOfWeekNames = this.defaultDayOfWeekNames;
}
i = 0;
while ((i < 7) && (i < dayNames.length)) {
this.myDayOfWeekNames[i] = dayNames[i];
i++;
}
if ((redraw == undefined) || (redraw == true)) {
this.redraw();
}
};
FCalendarClass.prototype.getMonthNames = function () {
return(this.myMonthNames);
};
FCalendarClass.prototype.setMonthNames = function (monthNames, redraw) {
this.defaultMonthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
if (this.myMonthNames == undefined) {
this.myMonthNames = this.defaultMonthNames;
}
i = 0;
while ((i < 12) && (i < monthNames.length)) {
this.myMonthNames[i] = monthNames[i];
i++;
}
if ((redraw == undefined) || (redraw == true)) {
this.redraw();
}
};
FCalendarClass.prototype.setFirstDayOfWeek = function (dayOfWeek) {
var _local2 = this.firstDayOfWeek;
this.firstDayOfWeek = dayOfWeek;
if (_local2 != dayOfWeek) {
this.redraw();
}
return(true);
};
FCalendarClass.prototype.getFirstDayOfWeek = function () {
return(this.firstDayOfWeek);
};
FCalendarClass.prototype.setShowAsDisabled = function (disableFlag) {
var _local4 = this.showAsDisabled;
if (arguments.length < 1) {
disableFlag = true;
}
this.showAsDisabled = disableFlag;
if (_local4 != disableFlag) {
this.redraw();
}
};
FCalendarClass.prototype.getShowAsDisabled = function (disableFlag) {
return(this.showAsDisabled);
};
FCalendarClass.prototype.setSize = function (width, ht) {
if (width == undefined) {
width = this._width;
}
if (ht == undefined) {
ht = this._height;
}
var _local3 = (this._xscale * width) / this._width;
var _local8 = this.dayWidth * _local3;
_local3 = _local3 * (Math.floor(_local8) / _local8);
width = (this._width * _local3) / this._xscale;
this._xscale = _local3;
var _local4 = (this._yscale * ht) / this._height;
var _local7 = this.dayHeight * _local4;
_local4 = _local4 * (Math.floor(_local7) / _local7);
ht = (this._height * _local4) / this._yscale;
this._yscale = _local4;
super.setSize(width, ht);
if (this.guiInitPending) {
this.guiInitPending = undefined;
this.initGrid();
this.drawDays();
this.initMonth(this.today);
}
};
FCalendarClass.prototype.setEnabled = function (enable) {
var _local3 = this.enable;
if ((enable == true) || (enable == undefined)) {
this.enable = true;
super.setEnabled(true);
} else {
this.enable = false;
super.setEnabled(false);
}
if (_local3 != this.enable) {
this.backMonth_btn.enabled = this.enable;
this.backYear_btn.enabled = this.enable;
this.fwdMonth_btn.enabled = this.enable;
this.fwdYear_btn.enabled = this.enable;
this.backMonth_btn.gotoAndStop((this.enable ? "_up" : "disabled"));
this.backYear_btn.gotoAndStop((this.enable ? "_up" : "disabled"));
this.fwdMonth_btn.gotoAndStop((this.enable ? "_up" : "disabled"));
this.fwdYear_btn.gotoAndStop((this.enable ? "_up" : "disabled"));
this.redraw();
}
};
FCalendarClass.prototype.getEnabled = function () {
return(this.enable);
};
FCalendarClass.prototype.setSelectionType = function (selType) {
if (arguments.length < 1) {
selType = "multiple";
}
var _local3 = this.selectionType;
this.selectionType = new String(selType);
this.selectionType = this.selectionType.toLowerCase();
if (_local3 != this.selectionType) {
this.initSelectionType();
}
this.redraw();
};
FCalendarClass.prototype.getSelectionType = function () {
return(this.selectionType);
};
FCalendarClass.prototype.getSelectionRequired = function () {
return(this.selectionRequired);
};
FCalendarClass.prototype.setSelectionRequired = function (required) {
this.selectionRequired = required;
if (required && (this.isSelectionEmpty())) {
this.setSelectedItem(this.today);
}
this.redraw();
return(true);
};
FCalendarClass.prototype.StepDate = function (deltaY, deltaM) {
var _local2 = this.currDisplay.getMonth() + deltaM;
var _local3 = this.currDisplay.getFullYear() + deltaY;
while (_local2 < 0) {
_local3--;
_local2 = _local2 + 12;
}
while (_local2 > 11) {
_local2 = _local2 - 12;
_local3++;
}
var _local4 = this.limitDisplay(new Date(_local3, _local2, 1));
this.initMonth(_local4);
};
FCalendarClass.prototype.limitDisplay = function (theDate) {
if ((this.displayRange.begin != undefined) && (this.displayRange.begin.getTime() > theDate.getTime())) {
theDate = this.displayRange.begin;
}
if ((this.displayRange.end != undefined) && (this.displayRange.end.getTime() < theDate.getTime())) {
theDate = this.displayRange.end;
}
return(theDate);
};
FCalendarClass.prototype.drawDays = function () {
var _local12 = this.headerHeight;
var _local9 = this.leftEdge;
day = 0;
while (day < 7) {
var _local2;
if (this["head_day" + day] == undefined) {
this.attachMovie("fcal_dayOfWeek_mc", "head_day" + day, 80 + day);
_local2 = this["head_day" + day];
_local2.attachMovie("FLabelSymbol", "dayText", 1, {controller:this, hostComponent:this});
this.registerTextElement(_local2.dayText, "FCalendarDayText");
}
_local2 = this["head_day" + day];
var _local3 = {x:_local9, y:_local12};
this.localToGlobal(_local3);
_local3.x = Math.floor(_local3.x);
_local3.y = Math.round(_local3.y);
this.globalToLocal(_local3);
_local2._x = _local3.x;
_local2._y = _local3.y;
var _local7 = (day + this.firstDayOfWeek) % 7;
_local2.dayText.labelField.multiline = false;
_local2.dayText.labelField.wordWrap = false;
_local2.dayText.labelField.restrict = true;
_local2.dayText.setLabel(this.myDayOfWeekNames[_local7]);
var _local8 = _local2.dayText.labelfield.textWidth;
var _local4 = Math.floor((this.dayWidth - _local2.dayText.labelfield.textWidth) / 2) - 2;
var _local6 = Math.floor((this.dayTextHeight - _local2.dayText.labelfield.textHeight) / 2);
var _local5 = new String(this.myDayOfWeekNames[_local7]);
if (_local5.charAt(0) == "W") {
_local5 = " " + _local5;
_local2.dayText.setLabel(_local5);
_local4 = _local4 - (_local2.dayText.labelfield.textWidth - _local8);
}
_local3 = {x:_local4, y:_local6};
_local3.x = Math.floor(_local3.x);
_local3.y = Math.round(_local3.y);
_local4 = _local3.x;
_local6 = _local3.y;
var _local10 = this.dayWidth - _local4;
_local2.dayText._x = Math.max(0, _local4);
_local2.dayText._y = _local6;
_local2.dayText.labelfield._x = 0;
_local2.dayText.textStyle.align = "left";
_local2.dayText.setSize(_local10, this.dayTextHeight - _local6);
_local2.dayText.setLabel(_local5);
_local2.dayText.setEnabled(this.enable);
_local9 = _local9 + this.dayWidth;
day++;
}
};
FCalendarClass.prototype.initGrid = function () {
cell = 1;
while (cell <= 42) {
this["cell" + cell].removeMovieClip();
this.attachMovie("fcal_dayStates_mc", "cell" + cell, cell);
var _local2 = this["cell" + cell];
_local2.attachMovie("FLabelSymbol", "dayText", 1, {controller:this, hostComponent:this});
_local2.dayText.labelField.autoSize = "left";
_local2.dayText.labelField.multiline = false;
_local2.dayText.labelField.wordWrap = false;
_local2.dayText.labelField.restrict = true;
this.registerTextElement(_local2.dayText, "FCalendarDateText");
_local2.dayText._visible = false;
_local2._visible = false;
cell++;
}
};
FCalendarClass.prototype.initMonth = function (dateObj) {
if (dateObj == null) {
dateObj = new Date();
}
this.offset = this.getOffsetOfMonth(dateObj);
this.last = this.getLastOfMonth(dateObj);
var _local5 = this.leftEdge;
var _local6 = this.dayTextHeight + this.headerHeight;
var _local4 = 1;
i = 1;
while (i <= this.offset) {
var _local2 = this["cell" + (_local4++)];
_local2.todayIndicator_mc.removeMovieClip();
var _local3 = {x:_local5, y:_local6};
this.localToGlobal(_local3);
_local3.x = Math.round(_local3.x);
_local3.y = Math.round(_local3.y);
this.globalToLocal(_local3);
_local2.gotoAndStop("notaday");
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2._width = this.dayWidth;
_local2._height = this.dayHeight;
_local2._visible = true;
_local2.dayText._visible = false;
_local5 = _local5 + this.dayWidth;
i++;
}
_local5 = (this.offset * this.dayWidth) + this.leftEdge;
var _local13 = dateObj.getFullYear();
var _local8 = dateObj.getMonth();
var _local20 = dateObj.getDate();
var _local7 = new Date(_local13, _local8, 1);
this.currDisplay = _local7;
this.headerTextMonth = this.myMonthNames[_local8];
this.headerTextYear = _local13;
this.setHeaders();
var _local9 = 1;
var _local14 = globalStyleFormat.textColor;
if (_local14 == undefined) {
_local14 = 0;
}
var _local12 = globalStyleFormat.textDisabled;
if (_local12 == undefined) {
_local12 = 11184810 /* 0xAAAAAA */;
}
while (_local7.getMonth() == _local8) {
this.drawCell(_local7, _local14, _local12);
_local9++;
_local7 = new Date(_local13, _local8, _local9);
_local4++;
}
var _local19 = (_local4 - 1) % 7;
var _local16 = Math.floor((_local4 - 1) / 7);
var _local18 = this.leftEdge;
var _local17 = this.dayTextHeight + this.headerHeight;
_local5 = (_local19 * this.dayWidth) + _local18;
_local6 = (_local16 * this.dayHeight) + _local17;
while (_local4 <= 42) {
var _local2 = this["cell" + _local4];
_local2.gotoAndStop("notaday");
_local2.todayIndicator_mc.removeMovieClip();
var _local3 = {x:_local5, y:_local6};
this.localToGlobal(_local3);
_local3.x = Math.round(_local3.x);
_local3.y = Math.round(_local3.y);
this.globalToLocal(_local3);
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2._width = this.dayWidth;
_local2._height = this.dayHeight;
_local2._visible = true;
_local2.dayText._visible = false;
_local4++;
if ((_local4 % 7) == 1) {
_local5 = this.leftEdge;
_local6 = _local6 + this.dayHeight;
} else {
_local5 = _local5 + this.dayWidth;
}
}
};
FCalendarClass.prototype.selectiveRedraw = function () {
this.offset = this.getOffsetOfMonth(this.currDisplay);
this.last = this.getLastOfMonth(this.currDisplay);
var _local5 = globalStyleFormat.textColor;
if (_local5 == undefined) {
_local5 = 0;
}
var _local4 = globalStyleFormat.textDisabled;
if (_local4 == undefined) {
_local4 = 11184810 /* 0xAAAAAA */;
}
var _local3 = this.getSelectionDelta();
for (x in _local3) {
var _local2 = _local3[x];
this.drawCell(_local2, _local5, _local4);
}
};
FCalendarClass.prototype.drawCell = function (curr_date, textColor, disabledColor) {
var _local4 = curr_date.getDate();
var _local6 = _local4 + this.offset;
var _local11 = (_local6 - 1) % 7;
var _local8 = Math.floor((_local6 - 1) / 7);
var _local10 = this.leftEdge;
var _local9 = this.dayTextHeight + this.headerHeight;
var _local3 = {x:(_local11 * this.dayWidth) + _local10, y:(_local8 * this.dayHeight) + _local9};
this.localToGlobal(_local3);
_local3.x = Math.round(_local3.x);
_local3.y = Math.round(_local3.y);
this.globalToLocal(_local3);
var _local2 = this["cell" + _local6];
_local2.gotoAndStop((this.isSelected(curr_date) ? "selected" : "normal"));
_local2.myDate = curr_date;
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2._width = this.dayWidth;
_local2._height = this.dayHeight;
_local2.day = _local4;
_local2._visible = true;
_local2.dayText._visible = true;
_local2.dayText._x = 2;
_local2.dayText._y = 2;
_local2.dayText.setSize(this.dayWidth - 4, this.dayTextHeight - 4);
_local2.dayText.setLabel(_local4);
_local2.dayText.setEnabled(this.enabled);
var _local7 = true;
if ((!this.enable) || (!this.isSelectable(curr_date))) {
if (this.showAsDisabled) {
_local2.dayText.setEnabled(false);
}
_local7 = false;
}
if (_local7) {
_local2.onPress = function () {
this._parent.selectHandler(this.day);
};
} else {
delete _local2.onPress;
}
if (curr_date.getTime() == this.today.getTime()) {
_local2.attachMovie("fcal_todayIndicator_mc", "todayIndicator_mc", 5);
} else {
_local2.todayIndicator_mc.removeMovieClip();
}
};
FCalendarClass.prototype.setHeaders = function () {
var _local3 = (this.headerTextMonth + " ") + this.headerTextYear;
if (this.headerArea.title == undefined) {
this.headerArea.attachMovie("FLabelSymbol", "title", 1, {controller:this, hostComponent:this});
this.registerTextElement(this.headerArea.title, "FCalendarHeadText");
}
this.headerArea.title.labelField.multiline = false;
this.headerArea.title.labelField.wordWrap = false;
this.headerArea.title.labelField.restrict = true;
this.headerArea.title.setLabel(_local3);
var _local2 = Math.floor((this.headerArea._width - this.headerArea.title.labelfield.textWidth) / 2);
var _local4 = this.headerArea._width - _local2;
this.headerArea.title._x = Math.max(0, _local2);
this.headerArea.title._y = 0;
this.headerArea.title.setSize(_local4, this.headerArea._height);
this.headerArea.title.setEnabled(this.enable);
};
FCalendarClass.prototype.getFont = function () {
var _local2 = globalStyleFormat.textFont;
if (_local2 == undefined) {
_local2 = this.defaultFont;
}
return(_local2);
};
FCalendarClass.prototype.getOffsetOfMonth = function (theBaseDate) {
var _local3 = new Date(theBaseDate.getFullYear(), theBaseDate.getMonth(), 1);
var _local2 = _local3.getDay() - this.firstDayOfWeek;
return(((_local2 < 0) ? (_local2 + 7) : (_local2)));
};
FCalendarClass.prototype.getLastOfMonth = function (theBaseDate) {
var _local1 = "";
var _local2 = theBaseDate.getMonth();
var _local3 = theBaseDate.getFullYear();
endDate = "";
if (_local2 == 1) {
if (((_local3 % 4) != 0) && ((((_local3 != 1200) || (_local3 != 1600)) || (_local3 != 2000)) || (_local3 != 2400))) {
_local1 = 28;
} else {
_local1 = 29;
}
} else if ((((_local2 == 3) || (_local2 == 5)) || (_local2 == 8)) || (_local2 == 10)) {
_local1 = 30;
} else {
_local1 = 31;
}
return(_local1);
};
FCalendarClass.prototype.startSelection = function () {
this.oldSelections = new Object();
for (x in this.selections) {
var _local2 = this.selections[x];
if ((_local2.getFullYear() == this.currDisplay.getFullYear()) && (_local2.getMonth() == this.currDisplay.getMonth())) {
this.oldSelections[x] = _local2;
}
}
};
FCalendarClass.prototype.getSelectionDelta = function () {
var _local3 = new Object();
for (x in this.selections) {
if (this.oldSelections[x] == undefined) {
var _local2 = this.selections[x];
if ((_local2.getFullYear() == this.currDisplay.getFullYear()) && (_local2.getMonth() == this.currDisplay.getMonth())) {
_local3[x] = _local2;
}
}
}
for (x in this.oldSelections) {
if (this.selections[x] == undefined) {
var _local2 = this.oldSelections[x];
_local3[x] = _local2;
}
}
return(_local3);
};
FCalendarClass.prototype.startDrag = function (day) {
this.dragAnchor = day;
this.dragLast = day;
Mouse.addListener(this.dragListener);
};
FCalendarClass.prototype.updateDragSelection = function () {
point = new object();
point.x = _root._xmouse;
point.y = _root._ymouse;
this.globalToLocal(point);
var _local14 = this.leftEdge;
var _local13 = this.dayTextHeight + this.headerHeight;
var _local6 = Math.floor((point.y - _local13) / this.dayHeight);
var _local5 = Math.floor((point.x - _local14) / this.dayWidth);
var _local3;
var _local11 = this.getLastOfMonth(this.currDisplay);
if (_local6 < 0) {
_local3 = 1;
} else if (_local6 > 5) {
_local3 = _local11;
} else {
_local5 = Math.max(_local5, 0);
_local5 = Math.min(_local5, 6);
_local3 = (((_local6 * 7) + _local5) - this.offset) + 1;
}
_local3 = Math.max(_local3, 1);
_local3 = Math.min(_local3, _local11);
if (_local3 != this.dragLast) {
this.startSelection();
var _local10 = false;
var _local8 = this.currDisplay.getFullYear();
var _local7 = this.currDisplay.getMonth();
var _local4 = new Date(_local8, _local7, _local3);
_local10 = true;
if (this.selectionType == "single") {
this.anchor = _local4;
if ((this.isSelected(_local4) && (!this.selectionRequired)) && (this.getSelectionCount() == 1)) {
_local4 = undefined;
}
this.selections = new Object();
this.selectDate(_local4);
} else {
var _local12 = new Date(_local8, _local7, this.dragAnchor);
var _local9 = new Date(_local8, _local7, this.dragLast);
if (((this.dragLast <= this.dragAnchor) && (_local3 <= this.dragLast)) || ((this.dragLast >= this.dragAnchor) && (_local3 >= this.dragLast))) {
this.selectAppendRange(_local9, _local4);
} else {
this.deselectRange(_local9, _local12);
this.selectAppendRange(_local12, _local4);
}
}
this.dragLast = _local3;
this.caret = _local4;
if (_local10) {
this.executeCallBack();
}
this.selectiveRedraw();
}
};
FCalendarClass.prototype.endDragSelection = function () {
Mouse.removeListener(this.dragListener);
};
FCalendarClass.prototype.selectHandler = function (day) {
Selection.setFocus(this);
this.startDrag(day);
var _local4 = (Key.isDown(17) && (this.selectionType != "range")) && (this.selectionType != "single");
var _local5 = Key.isDown(16) && (this.selectionType != "single");
year = this.currDisplay.getFullYear();
var _local2 = new Date(year, this.currDisplay.getMonth(), day);
this.caret = _local2;
var key = ((((_local2.getFullYear() + "/") + _local2.getMonth()) + "/") + day);
var _local3 = false;
this.startSelection();
if ((_local4 && (_local5)) && (this.anchor != undefined)) {
this.selectAppendRange(this.anchor, _local2);
_local3 = true;
} else if (_local4) {
this.anchor = _local2;
if (this.isSelected(_local2) && ((!this.selectionRequired) || (this.getSelectionCount() > 1))) {
_local2 = undefined;
}
this.selections[key] = _local2;
_local3 = true;
} else if (_local5 && (this.anchor != undefined)) {
this.selections = new Object();
this.selectAppendRange(this.anchor, _local2);
_local3 = true;
} else {
this.anchor = _local2;
if ((this.isSelected(_local2) && (!this.selectionRequired)) && (this.getSelectionCount() == 1)) {
_local2 = undefined;
}
this.selections = new Object();
this.selections[key] = _local2;
_local3 = true;
}
if (_local3) {
this.executeCallBack();
}
this.selectiveRedraw();
};
FCalendarClass.prototype.isSelectionEmpty = function () {
for (x in this.selections) {
return(false);
}
return(true);
};
FCalendarClass.prototype.getSelectionCount = function () {
var _local2 = 0;
for (x in this.selections) {
_local2++;
}
return(_local2);
};
FCalendarClass.prototype.selectDate = function (theDate) {
var _local3 = (((theDate.getFullYear() + "/") + theDate.getMonth()) + "/") + theDate.getDate();
this.selections[_local3] = theDate;
};
FCalendarClass.prototype.selectAppendRange = function (date1, date2, deselect) {
if (deselect == undefined) {
deselect = false;
}
if (date1.getTime() > date2.getTime()) {
var _local9 = date2;
date2 = date1;
date1 = _local9;
}
date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
var _local2 = date1;
var _local8 = date2.getTime();
while (_local2.getTime() <= _local8) {
var _local3 = _local2.getDate();
if (this.isSelectable(_local2)) {
var _local4 = (((_local2.getFullYear() + "/") + _local2.getMonth()) + "/") + _local3;
this.selections[_local4] = (deselect ? undefined : (_local2));
}
_local3++;
_local2 = new Date(_local2.getFullYear(), _local2.getMonth(), _local3);
}
};
FCalendarClass.prototype.deselectRange = function (date1, date2) {
this.selectAppendRange(date1, date2, true);
};
FCalendarClass.prototype.isSelected = function (aDate) {
var _local2 = (((aDate.getFullYear() + "/") + aDate.getMonth()) + "/") + aDate.getDate();
if (this.selections[_local2] != undefined) {
return(true);
}
return(false);
};
FCalendarClass.prototype.onSetPress = function () {
Selection.setFocus(this);
};
FCalendarClass.prototype.myOnSetFocus = function () {
Key.addListener(this.keyListener);
this.focused = true;
this.drawFocusRect();
};
FCalendarClass.prototype.myOnKillFocus = function () {
super.myOnKillFocus();
this.focusRect.removeMovieClip();
};
FCalendarClass.prototype.drawFocusRect = function () {
var _local2 = {x:-2, y:-2};
this.drawRect(_local2.x, _local2.y, ((this._width + 4) * 100) / this._xscale, ((this._height + 4) * 100) / this._yscale);
};
FCalendarClass.prototype.myOnKeyDown = function () {
var _local6 = Key.isDown(16) && (this.selectionType != "single");
var _local4 = Key.isDown(17) && (this.selectionType != "single");
var _local3 = this.caret;
var _local2 = false;
if (Key.getCode() == 39) {
this.kbdSelect(1, _local6 || (_local4), false);
_local2 = true;
} else if (Key.getCode() == 37) {
this.kbdSelect(-1, _local6 || (_local4), true);
_local2 = true;
} else if (Key.getCode() == 32) {
if (this.isSelectable(_local3)) {
this.startSelection();
if ((!this.selectionRequired) || (this.getSelectionCount() > 1)) {
var _local5 = this.isSelected(_local3);
if (_local5 || (this.selectionType == "multiple")) {
this.selectAppendRange(_local3, _local3, _local5);
_local2 = true;
this.selectiveRedraw();
}
}
}
} else if (Key.getCode() == 36) {
this.kbdSelect(1 - this.caret.getDate(), false, false);
this.anchor = this.caret;
_local2 = true;
} else if (Key.getCode() == 35) {
var _local7 = this.getLastOfMonth(_local3);
if (_local7 != this.caret.getDate()) {
this.kbdSelect(_local7 - this.caret.getDate(), false, true);
this.anchor = this.caret;
_local2 = true;
}
} else if (Key.getCode() == 34) {
if (Key.isDown(17)) {
this.stepDate(1, 0);
} else {
this.stepDate(0, 1);
}
} else if (Key.getCode() == 33) {
if (Key.isDown(17)) {
this.stepDate(-1, 0);
} else {
this.stepDate(0, -1);
}
}
if (_local2) {
this.executeCallBack();
}
};
FCalendarClass.prototype.kbdSelect = function (deltaDays, append, before) {
this.startSelection();
if (arguments.length < 3) {
before = false;
}
var _local11 = this.currDisplay.getMonth();
var _local10 = this.currDisplay.getFullYear();
this.currDisplay = this.caret;
var _local5 = this.caret.getDate() + deltaDays;
var _local6 = this.caret.getMonth();
var _local7 = this.caret.getFullYear();
var _local3 = new Date(_local7, _local6, _local5);
var _local8 = 0;
if ((this.displayRange.begin != undefined) && (this.displayRange.begin.getTime() > _local3.getTime())) {
_local3 = this.displayRange.begin;
before = false;
}
if ((this.displayRange.end != undefined) && (this.displayRange.end.getTime() < _local3.getTime())) {
_local3 = this.displayRange.end;
before = true;
}
while ((!this.isSelectable(_local3)) && (_local8 < 100000)) {
var _local4 = (before ? -1 : 1);
_local5 = _local3.getDate() + _local4;
_local6 = _local3.getMonth();
_local7 = _local3.getFullYear();
_local3 = new Date(_local7, _local6, _local5);
_local8++;
}
var _local12 = (((_local3.getFullYear() + "/") + _local3.getMonth()) + "/") + _local3.getDate();
if (!append) {
this.selections = new Object();
}
this.selections[_local12] = _local3;
this.caret = _local3;
if ((_local11 != _local3.getMonth()) || (_local10 != _local3.getFullYear())) {
this.stepDate(_local3.getFullYear() - _local10, _local3.getMonth() - _local11);
} else {
this.selectiveRedraw();
}
};
FCalendarClass.prototype.setCaret = function (day) {
this.caret.setDate(day);
};
FCalendarClass.prototype.initSelectionType = function () {
this.selections = new Object();
if (this.selectionRequired) {
this.setSelectedItem(new Date());
}
};
FCalendarClass.prototype.isDisplayable = function (day) {
if ((day.getTime() < this.displayRange.beginTime) || (day.getTime() > this.displayRange.endTime)) {
return(false);
}
return(true);
};
FCalendarClass.prototype.isSelectable = function (day) {
if (!this.isDisplayable(day)) {
return(false);
}
if ((this.dateFilter.isSelectable != undefined) && (!this.dateFilter.isSelectable(this, day))) {
return(false);
}
return(true);
};
FCalendarClass.prototype.redraw = function () {
this.drawDays();
this.initMonth(this.currDisplay);
};
#endinitclip
Instance of Symbol 81 MovieClip [fcal_backYear_mc] "backYear_btn" in Symbol 95 MovieClip [FCalendarSymbol] Frame 1
/* no clip actions */