﻿Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.ScrollBars = function() { }
AjaxControlToolkit.ScrollBars.prototype = {
None : 0x00,
Horizontal : 0x01,
Vertical : 0x02,
Both : 0x03,
Auto : 0x04
}
AjaxControlToolkit.ScrollBars.registerEnum("AjaxControlToolkit.ScrollBars", true);AjaxControlToolkit.TabContainer = function(element) {
AjaxControlToolkit.TabContainer.initializeBase(this, [element]);this._cachedActiveTabIndex = -1;this._activeTabIndex = -1;this._scrollBars = AjaxControlToolkit.ScrollBars.None;this._tabs = null;this._header = null;this._body = null;this._loaded = false;this._autoPostBackId = null;this._app_onload$delegate = Function.createDelegate(this, this._app_onload);}
AjaxControlToolkit.TabContainer.prototype = {
add_activeTabChanged : function(handler) {
this.get_events().addHandler("activeTabChanged", handler);},
remove_activeTabChanged : function(handler) {
this.get_events().removeHandler("activeTabChanged", handler);},
raiseActiveTabChanged : function() {
var eh = this.get_events().getHandler("activeTabChanged");if (eh) {
eh(this, Sys.EventArgs.Empty);}
if (this._autoPostBackId) {
__doPostBack(this._autoPostBackId, "activeTabChanged:" + this.get_activeTabIndex());}
},
get_activeTabIndex : function() { 
if (this._cachedActiveTabIndex > -1) {
return this._cachedActiveTabIndex;}
return this._activeTabIndex;},
set_activeTabIndex : function(value) {
if (!this.get_isInitialized()) {
this._cachedActiveTabIndex = value;} else {
if (value < -1 || value >= this.get_tabs().length) {
throw Error.argumentOutOfRange("value");}
if (this._activeTabIndex != -1) {
this.get_tabs()[this._activeTabIndex]._set_active(false);}
this._activeTabIndex = value;if (this._activeTabIndex != -1) {
this.get_tabs()[this._activeTabIndex]._set_active(true);}
if (this._loaded) {
this.raiseActiveTabChanged();}
this.raisePropertyChanged("activeTabIndex");}
},
get_tabs : function() { 
if (this._tabs == null) {
this._tabs = [];}
return this._tabs;},
get_activeTab : function() {
if (this._activeTabIndex > -1) {
return this.get_tabs()[this._activeTabIndex];}
return null;},
set_activeTab : function(value) {
var i = Array.indexOf(this.get_tabs(), value);if (i == -1) {
throw Error.argument("value", AjaxControlToolkit.Resources.Tabs_ActiveTabArgumentOutOfRange);}
this.set_activeTabIndex(i);},
get_autoPostBackId : function() {
return this._autoPostBackId;},
set_autoPostBackId : function(value) {
this._autoPostBackId = value;}, 
get_scrollBars : function() { 
return this._scrollBars;},
set_scrollBars : function(value) { 
if (this._scrollBars != value) {
this._scrollBars = value;this._invalidate();this.raisePropertyChanged("scrollBars");}
},
initialize : function() {
AjaxControlToolkit.TabContainer.callBaseMethod(this, "initialize");var elt = this.get_element();var header = this._header = $get(this.get_id() + "_header");var body = this._body = $get(this.get_id() + "_body");$common.addCssClasses(elt, [
"ajax__tab_container",
"ajax__tab_default"
]);Sys.UI.DomElement.addCssClass(header, "ajax__tab_header");Sys.UI.DomElement.addCssClass(body, "ajax__tab_body");this._invalidate();Sys.Application.add_load(this._app_onload$delegate);},
dispose : function() {
Sys.Application.remove_load(this._app_onload$delegate);AjaxControlToolkit.TabContainer.callBaseMethod(this, "dispose");},
getFirstTab : function(includeDisabled) {
var tabs = this.get_tabs();for(var i = 0;i < tabs.length;i++) {
if (includeDisabled || tabs[i].get_enabled()) {
return tabs[i];}
}
return null;},
getLastTab : function(includeDisabled) {
var tabs = this.get_tabs();for(var i = tabs.length -1;i >= 0;i--) {
if (includeDisabled || tabs[i].get_enabled()) {
return tabs[i];}
}
return null;},
getNextTab : function(includeDisabled) {
var tabs = this.get_tabs();var active = this.get_activeTabIndex();for (var i = 1;i < tabs.length;i++) {
var tabIndex = (active + i) % tabs.length;var tab = tabs[tabIndex];if (includeDisabled || tab.get_enabled()) 
return tab;}
return null;},
getPreviousTab : function(includeDisabled) {
var tabs = this.get_tabs();var active = this.get_activeTabIndex();for (var i = 1;i < tabs.length;i++) {
var tabIndex = (tabs.length + (active - i)) % tabs.length;var tab = tabs[tabIndex];if (includeDisabled || tab.get_enabled()) 
return tab;}
return null;},
getNearestTab : function() {
var prev = this.getPreviousTab(false);var next = this.getNextTab(false);if (prev && prev.get_tabIndex() < this._activeTabIndex) {
return prev;} else if(next && next.get_tabIndex() > this._activeTabIndex) {
return next;}
return null;},
saveClientState : function() {
var tabs = this.get_tabs();var tabState = [];for(var i = 0;i < tabs.length;i++) {
Array.add(tabState, tabs[i].get_enabled());} 
var state = {
ActiveTabIndex:this._activeTabIndex,
TabState:tabState
};return Sys.Serialization.JavaScriptSerializer.serialize(state);},
_invalidate : function() {
if (this.get_isInitialized()) {
$common.removeCssClasses(this._body, [
"ajax__scroll_horiz",
"ajax__scroll_vert",
"ajax__scroll_both",
"ajax__scroll_auto"
]);switch (this._scrollBars) {
case AjaxControlToolkit.ScrollBars.Horizontal: 
Sys.UI.DomElement.addCssClass(this._body, "ajax__scroll_horiz");break;case AjaxControlToolkit.ScrollBars.Vertical: 
Sys.UI.DomElement.addCssClass(this._body, "ajax__scroll_vert");break;case AjaxControlToolkit.ScrollBars.Both: 
Sys.UI.DomElement.addCssClass(this._body, "ajax__scroll_both");break;case AjaxControlToolkit.ScrollBars.Auto: 
Sys.UI.DomElement.addCssClass(this._body, "ajax__scroll_auto");break;}
}
},
_app_onload : function(sender, e) {
if (this._cachedActiveTabIndex != -1) {
this.set_activeTabIndex(this._cachedActiveTabIndex);this._cachedActiveTabIndex = -1;} 
this._loaded = true;}
}
AjaxControlToolkit.TabContainer.registerClass("AjaxControlToolkit.TabContainer", AjaxControlToolkit.ControlBase);AjaxControlToolkit.TabPanel = function(element) {
AjaxControlToolkit.TabPanel.initializeBase(this, [element]);this._active = false;this._tab = null;this._headerOuter = null;this._headerInner = null;this._header = null;this._owner = null;this._enabled = true;this._tabIndex = -1;this._dynamicContextKey = null;this._dynamicServicePath = null;this._dynamicServiceMethod = null;this._dynamicPopulateBehavior = null;this._scrollBars = AjaxControlToolkit.ScrollBars.None;this._header_onclick$delegate = Function.createDelegate(this, this._header_onclick);this._header_onmouseover$delegate = Function.createDelegate(this, this._header_onmouseover);this._header_onmouseout$delegate = Function.createDelegate(this, this._header_onmouseout);this._header_onmousedown$delegate = Function.createDelegate(this, this._header_onmousedown);this._dynamicPopulate_onpopulated$delegate = Function.createDelegate(this, this._dynamicPopulate_onpopulated);this._oncancel$delegate = Function.createDelegate(this, this._oncancel);}
AjaxControlToolkit.TabPanel.prototype = {
add_click : function(handler) {
this.get_events().addHandler("click", handler);},
remove_click : function(handler) {
this.get_events().removeHandler("click", handler);},
raiseClick : function() {
var eh = this.get_events().getHandler("click");if (eh) {
eh(this, Sys.EventArgs.Empty);}
},
add_populating : function(handler) {
this.get_events().addHandler("populating", handler);},
remove_populating : function(handler) {
this.get_events().removeHandler("populating", handler);},
raisePopulating : function() {
var eh = this.get_events().getHandler("populating");if (eh) {
eh(this, Sys.EventArgs.Empty);}
},
add_populated : function(handler) {
this.get_events().addHandler("populated", handler);},
remove_populated : function(handler) {
this.get_events().removeHandler("populated", handler);},
raisePopulated : function() {
var eh = this.get_events().getHandler("populated");if (eh) {
eh(this, Sys.EventArgs.Empty);}
},
get_headerText : function() { 
if (this.get_isInitialized()) {
return this._header.innerHTML;}
return "";},
set_headerText : function(value) { 
if (!this.get_isInitialized()) {
throw Error.invalidOperation(String.format(AjaxControlToolkit.Resources.Tabs_PropertySetBeforeInitialization, 'headerText'));}
if (this._headerText != value) {
this._headerTab.innerHTML = value;this.raisePropertyChanged("headerText");}
},
get_headerTab : function() {
return this._header;},
set_headerTab : function(value) {
if (this._header != value) {
if (this.get_isInitialized()) {
throw Error.invalidOperation(String.format(AjaxControlToolkit.Resources.Tabs_PropertySetAfterInitialization, 'headerTab'));}
this._header = value;this.raisePropertyChanged("value");}
},
get_enabled : function() {
return this._enabled;},
set_enabled : function(value) {
if (value != this._enabled) {
this._enabled = value;if (this.get_isInitialized()) {
if (!this._enabled) {
this._hide();} else {
this._show();}
}
this.raisePropertyChanged("enabled");}
},
get_owner : function() {
return this._owner;},
set_owner : function(value) {
if (this._owner != value) {
if (this.get_isInitialized()) {
throw Error.invalidOperation(String.format(AjaxControlToolkit.Resources.Tabs_PropertySetAfterInitialization, 'owner'));}
this._owner = value;this.raisePropertyChanged("owner");}
},
get_scrollBars : function() {
return this._scrollBars;},
set_scrollBars : function(value) {
if (this._scrollBars != value) {
this._scrollBars = value;this.raisePropertyChanged("scrollBars");}
},
get_tabIndex : function() {
return this._tabIndex;},
get_dynamicContextKey : function() {
return this._dynamicContextKey;},
set_dynamicContextKey : function(value) {
if (this._dynamicContextKey != value) {
this._dynamicContextKey = value;this.raisePropertyChanged('dynamicContextKey');}
},
get_dynamicServicePath : function() {
return this._dynamicServicePath;},
set_dynamicServicePath : function(value) {
if (this._dynamicServicePath != value) {
this._dynamicServicePath = value;this.raisePropertyChanged('dynamicServicePath');}
},
get_dynamicServiceMethod : function() {
return this._dynamicServiceMethod;},
set_dynamicServiceMethod : function(value) {
if (this._dynamicServiceMethod != value) {
this._dynamicServiceMethod = value;this.raisePropertyChanged('dynamicServiceMethod');}
},
_get_active : function() { 
return this._active;},
_set_active : function(value) { 
this._active = value;if (value) 
this._activate();else 
this._deactivate();},
initialize : function() {
AjaxControlToolkit.TabPanel.callBaseMethod(this, "initialize");var owner = this.get_owner();if (!owner) {
throw Error.invalidOperation(AjaxControlToolkit.Resources.Tabs_OwnerExpected);}
this._tabIndex = owner.get_tabs().length;Array.add(owner.get_tabs(), this);this._headerOuterWrapper = document.createElement('span');this._headerInnerWrapper = document.createElement('span');this._tab = document.createElement('span');this._tab.id = this.get_id() + "_tab";this._header.parentNode.replaceChild(this._tab, this._header);this._tab.appendChild(this._headerOuterWrapper);this._headerOuterWrapper.appendChild(this._headerInnerWrapper);this._headerInnerWrapper.appendChild(this._header);$addHandlers(this._header, {
click:this._header_onclick$delegate,
mouseover:this._header_onmouseover$delegate,
mouseout:this._header_onmouseout$delegate,
mousedown:this._header_onmousedown$delegate,
dragstart:this._oncancel$delegate,
selectstart:this._oncancel$delegate,
select:this._oncancel$delegate
});Sys.UI.DomElement.addCssClass(this._headerOuterWrapper, "ajax__tab_outer");Sys.UI.DomElement.addCssClass(this._headerInnerWrapper, "ajax__tab_inner");Sys.UI.DomElement.addCssClass(this._header, "ajax__tab_tab");Sys.UI.DomElement.addCssClass(this.get_element(), "ajax__tab_panel");if (!this._enabled) {
this._hide();}
},
dispose : function() { 
if (this._dynamicPopulateBehavior) {
this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior = null;}
$common.removeHandlers(this._header, {
click:this._header_onclick$delegate,
mouseover:this._header_onmouseover$delegate,
mouseout:this._header_onmouseout$delegate,
mousedown:this._header_onmousedown$delegate,
dragstart:this._oncancel$delegate,
selectstart:this._oncancel$delegate,
select:this._oncancel$delegate
});AjaxControlToolkit.TabPanel.callBaseMethod(this, "dispose");},
populate : function(contextKeyOverride) {
if (this._dynamicPopulateBehavior && (this._dynamicPopulateBehavior.get_element() != this.get_element())) {
this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior = null;}
if (!this._dynamicPopulateBehavior && this._dynamicServiceMethod) {
this._dynamicPopulateBehavior = $create(AjaxControlToolkit.DynamicPopulateBehavior,{"ContextKey":this._dynamicContextKey,"ServicePath":this._dynamicServicePath,"ServiceMethod":this._dynamicServiceMethod}, {"populated":this._dynamicPopulate_onpopulated$delegate}, null, this.get_element());}
if(this._dynamicPopulateBehavior) {
this.raisePopulating();this._dynamicPopulateBehavior.populate(contextKeyOverride ? contextKeyOverride : this._dynamicContextKey);}
},
_activate : function() {
var elt = this.get_element();$common.setVisible(elt, true);Sys.UI.DomElement.addCssClass(this._tab, "ajax__tab_active");this.populate();this._show();this._owner.get_element().style.visibility = 'visible';},
_deactivate : function() {
var elt = this.get_element();$common.setVisible(elt, false);Sys.UI.DomElement.removeCssClass(this._tab, "ajax__tab_active");},
_show : function() {
this._tab.style.display = '';},
_hide : function() {
this._tab.style.display = 'none';if (this._get_active()) {
var next = this._owner.getNearestTab(false);if (!!next) {
this._owner.set_activeTab(next);}
}
this._deactivate();},
_header_onclick : function(e) {
this.raiseClick();this.get_owner().set_activeTab(this);},
_header_onmouseover : function(e) {
Sys.UI.DomElement.addCssClass(this._tab, "ajax__tab_hover");},
_header_onmouseout : function(e) {
Sys.UI.DomElement.removeCssClass(this._tab, "ajax__tab_hover");},
_header_onmousedown : function(e) {
e.preventDefault();},
_oncancel : function(e) {
e.stopPropagation();e.preventDefault();},
_dynamicPopulate_onpopulated : function(sender, e) {
this.raisePopulated();}
}
AjaxControlToolkit.TabPanel.registerClass("AjaxControlToolkit.TabPanel", Sys.UI.Control);
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.DynamicPopulateBehavior = function(element) {
AjaxControlToolkit.DynamicPopulateBehavior.initializeBase(this, [element]);this._servicePath = null;this._serviceMethod = null;this._contextKey = null;this._cacheDynamicResults = false;this._populateTriggerID = null;this._setUpdatingCssClass = null;this._clearDuringUpdate = true;this._customScript = null;this._clickHandler = null;this._callID = 0;this._currentCallID = -1;this._populated = false;}
AjaxControlToolkit.DynamicPopulateBehavior.prototype = {
initialize : function() {
AjaxControlToolkit.DynamicPopulateBehavior.callBaseMethod(this, 'initialize');$common.prepareHiddenElementForATDeviceUpdate();if (this._populateTriggerID) {
var populateTrigger = $get(this._populateTriggerID);if (populateTrigger) {
this._clickHandler = Function.createDelegate(this, this._onPopulateTriggerClick);$addHandler(populateTrigger, "click", this._clickHandler);}
}
},
dispose : function() {
if (this._populateTriggerID && this._clickHandler) {
var populateTrigger = $get(this._populateTriggerID);if (populateTrigger) {
$removeHandler(populateTrigger, "click", this._clickHandler);}
this._populateTriggerID = null;this._clickHandler = null;}
AjaxControlToolkit.DynamicPopulateBehavior.callBaseMethod(this, 'dispose');},
populate : function(contextKey) {
if (this._populated && this._cacheDynamicResults) {
return;}
if (this._currentCallID == -1) {
var eventArgs = new Sys.CancelEventArgs();this.raisePopulating(eventArgs);if (eventArgs.get_cancel()) {
return;}
this._setUpdating(true);}
if (this._customScript) {
var scriptResult = eval(this._customScript);this._setTargetHtml(scriptResult);this._setUpdating(false);} else {
this._currentCallID = ++this._callID;if (this._servicePath && this._serviceMethod) {
Sys.Net.WebServiceProxy.invoke(this._servicePath, this._serviceMethod, false,
{ contextKey:(contextKey ? contextKey : this._contextKey) },
Function.createDelegate(this, this._onMethodComplete), Function.createDelegate(this, this._onMethodError),
this._currentCallID);$common.updateFormToRefreshATDeviceBuffer();}
}
},
_onMethodComplete : function (result, userContext, methodName) {
if (userContext != this._currentCallID) return;this._setTargetHtml(result);this._setUpdating(false);},
_onMethodError : function(webServiceError, userContext, methodName) {
if (userContext != this._currentCallID) return;if (webServiceError.get_timedOut()) {
this._setTargetHtml(AjaxControlToolkit.Resources.DynamicPopulate_WebServiceTimeout);} else {
this._setTargetHtml(String.format(AjaxControlToolkit.Resources.DynamicPopulate_WebServiceError, webServiceError.get_statusCode()));}
this._setUpdating(false);},
_onPopulateTriggerClick : function() {
this.populate(this._contextKey);},
_setUpdating : function(updating) {
this.setStyle(updating);if (!updating) {
this._currentCallID = -1;this._populated = true;this.raisePopulated(this, Sys.EventArgs.Empty);}
},
_setTargetHtml : function(value) {
var e = this.get_element()
if (e) {
if (e.tagName == "INPUT") {
e.value = value;} else {
e.innerHTML = value;}
}
},
setStyle : function(updating) {
var e = this.get_element();if (this._setUpdatingCssClass) {
if (!updating) {
e.className = this._oldCss;this._oldCss = null;} else {
this._oldCss = e.className;e.className = this._setUpdatingCssClass;}
}
if (updating && this._clearDuringUpdate) {
this._setTargetHtml("");}
},
get_ClearContentsDuringUpdate : function() {
return this._clearDuringUpdate;},
set_ClearContentsDuringUpdate : function(value) {
if (this._clearDuringUpdate != value) {
this._clearDuringUpdate = value;this.raisePropertyChanged('ClearContentsDuringUpdate');}
},
get_ContextKey : function() {
return this._contextKey;},
set_ContextKey : function(value) {
if (this._contextKey != value) {
this._contextKey = value;this.raisePropertyChanged('ContextKey');}
},
get_PopulateTriggerID : function() {
return this._populateTriggerID;},
set_PopulateTriggerID : function(value) {
if (this._populateTriggerID != value) {
this._populateTriggerID = value;this.raisePropertyChanged('PopulateTriggerID');}
},
get_ServicePath : function() {
return this._servicePath;},
set_ServicePath : function(value) {
if (this._servicePath != value) {
this._servicePath = value;this.raisePropertyChanged('ServicePath');}
},
get_ServiceMethod : function() {
return this._serviceMethod;},
set_ServiceMethod : function(value) {
if (this._serviceMethod != value) {
this._serviceMethod = value;this.raisePropertyChanged('ServiceMethod');}
},
get_cacheDynamicResults : function() {
return this._cacheDynamicResults;},
set_cacheDynamicResults : function(value) {
if (this._cacheDynamicResults != value) {
this._cacheDynamicResults = value;this.raisePropertyChanged('cacheDynamicResults');}
},
get_UpdatingCssClass : function() {
return this._setUpdatingCssClass;},
set_UpdatingCssClass : function(value) {
if (this._setUpdatingCssClass != value) {
this._setUpdatingCssClass = value;this.raisePropertyChanged('UpdatingCssClass');}
},
get_CustomScript : function() {
return this._customScript;}, 
set_CustomScript : function(value) {
if (this._customScript != value) {
this._customScript = value;this.raisePropertyChanged('CustomScript');}
},
add_populating : function(handler) {
this.get_events().addHandler('populating', handler);},
remove_populating : function(handler) {
this.get_events().removeHandler('populating', handler);},
raisePopulating : function(eventArgs) {
var handler = this.get_events().getHandler('populating');if (handler) {
handler(this, eventArgs);}
},
add_populated : function(handler) {
this.get_events().addHandler('populated', handler);},
remove_populated : function(handler) {
this.get_events().removeHandler('populated', handler);},
raisePopulated : function(eventArgs) {
var handler = this.get_events().getHandler('populated');if (handler) {
handler(this, eventArgs);}
}
}
AjaxControlToolkit.DynamicPopulateBehavior.registerClass('AjaxControlToolkit.DynamicPopulateBehavior', AjaxControlToolkit.BehaviorBase);
Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.TimeSpan = function() {
if (arguments.length == 0) this._ctor$0.apply(this, arguments);else if (arguments.length == 1) this._ctor$1.apply(this, arguments);else if (arguments.length == 3) this._ctor$2.apply(this, arguments);else if (arguments.length == 4) this._ctor$3.apply(this, arguments);else if (arguments.length == 5) this._ctor$4.apply(this, arguments);else throw Error.parameterCount();}
AjaxControlToolkit.TimeSpan.prototype = {
_ctor$0 : function() {
this._ticks = 0;}, 
_ctor$1 : function(ticks) {
this._ctor$0();this._ticks = ticks;},
_ctor$2 : function(hours, minutes, seconds) {
this._ctor$0();this._ticks = 
(hours * AjaxControlToolkit.TimeSpan.TicksPerHour) +
(minutes * AjaxControlToolkit.TimeSpan.TicksPerMinute) +
(seconds * AjaxControlToolkit.TimeSpan.TicksPerSecond);},
_ctor$3 : function(days, hours, minutes, seconds) {
this._ctor$0();this._ticks = 
(days * AjaxControlToolkit.TimeSpan.TicksPerDay) +
(hours * AjaxControlToolkit.TimeSpan.TicksPerHour) +
(minutes * AjaxControlToolkit.TimeSpan.TicksPerMinute) +
(seconds * AjaxControlToolkit.TimeSpan.TicksPerSecond);},
_ctor$4 : function(days, hours, minutes, seconds, milliseconds) {
this._ctor$0();this._ticks = 
(days * AjaxControlToolkit.TimeSpan.TicksPerDay) +
(hours * AjaxControlToolkit.TimeSpan.TicksPerHour) +
(minutes * AjaxControlToolkit.TimeSpan.TicksPerMinute) +
(seconds * AjaxControlToolkit.TimeSpan.TicksPerSecond) +
(milliseconds * AjaxControlToolkit.TimeSpan.TicksPerMillisecond);},
getDays : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerDay);},
getHours : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerHour) % 24;},
getMinutes : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerMinute) % 60;},
getSeconds : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerSecond) % 60;},
getMilliseconds : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerMillisecond) % 1000;},
getDuration : function() { 
return new AjaxControlToolkit.TimeSpan(Math.abs(this._ticks));},
getTicks : function() { 
return this._ticks;},
getTotalDays : function() { 
Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerDay);},
getTotalHours : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerHour);},
getTotalMinutes : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerMinute);},
getTotalSeconds : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerSecond);},
getTotalMilliseconds : function() { 
return Math.floor(this._ticks / AjaxControlToolkit.TimeSpan.TicksPerMillisecond);},
add : function(value) { 
return new AjaxControlToolkit.TimeSpan(this._ticks + value.getTicks());},
subtract : function(value) { 
return new AjaxControlToolkit.TimeSpan(this._ticks - value.getTicks());},
negate : function() { 
return new AjaxControlToolkit.TimeSpan(-this._ticks);},
equals : function(value) { 
return this._ticks == value.getTicks();},
compareTo : function(value) { 
if(this._ticks > value.getTicks()) 
return 1;else if(this._ticks < value.getTicks()) 
return -1;else 
return 0;},
toString : function() { 
return this.format("F");},
format : function(format) { 
if (!format) {
format = "F";}
if (format.length == 1) {
switch (format) {
case "t": format = AjaxControlToolkit.TimeSpan.ShortTimeSpanPattern;break;case "T": format = AjaxControlToolkit.TimeSpan.LongTimeSpanPattern;break;case "F": format = AjaxControlToolkit.TimeSpan.FullTimeSpanPattern;break;default: throw Error.createError(String.format(AjaxControlToolkit.Resources.Common_DateTime_InvalidTimeSpan, format));}
}
var regex = /dd|d|hh|h|mm|m|ss|s|nnnn|nnn|nn|n/g;var builder = new Sys.StringBuilder();var ticks = this._ticks;if (ticks < 0) {
builder.append("-");ticks = -ticks;}
for (;;) {
var index = regex.lastIndex;var ar = regex.exec(format);builder.append(format.slice(index, ar ? ar.index : format.length));if (!ar) break;switch (ar[0]) {
case "dd":
case "d":
builder.append($common.padLeft(Math.floor(ticks / AjaxControlToolkit.TimeSpan.TicksPerDay, ar[0].length, '0')));break;case "hh":
case "h":
builder.append($common.padLeft(Math.floor(ticks / AjaxControlToolkit.TimeSpan.TicksPerHour) % 24, ar[0].length, '0'));break;case "mm":
case "m":
builder.append($common.padLeft(Math.floor(ticks / AjaxControlToolkit.TimeSpan.TicksPerMinute) % 60, ar[0].length, '0'));break;case "ss":
case "s":
builder.append($common.padLeft(Math.floor(ticks / AjaxControlToolkit.TimeSpan.TicksPerSecond) % 60, ar[0].length, '0'));break;case "nnnn":
case "nnn":
case "nn":
case "n":
builder.append($common.padRight(Math.floor(ticks / AjaxControlToolkit.TimeSpan.TicksPerMillisecond) % 1000, ar[0].length, '0', true));break;default:
Sys.Debug.assert(false);}
}
return builder.toString();}
}
AjaxControlToolkit.TimeSpan.parse = function(text) {
var parts = text.split(":");var d = 0;var h = 0;var m = 0;var s = 0;var n = 0;var ticks = 0;switch(parts.length) {
case 1:
if (parts[0].indexOf(".") != -1) {
var parts2 = parts[0].split(".");s = parseInt(parts2[0]);n = parseInt(parts2[1]);} else {
ticks = parseInt(parts[0]);}
break;case 2:
h = parseInt(parts[0]);m = parseInt(parts[1]);break;case 3:
h = parseInt(parts[0]);m = parseInt(parts[1]);if (parts[2].indexOf(".") != -1) {
var parts2 = parts[2].split(".");s = parseInt(parts2[0]);n = parseInt(parts2[1]);} else {
s = parseInt(parts[2]);}
break;case 4:
d = parseInt(parts[0]);h = parseInt(parts[1]);m = parseInt(parts[2]);if (parts[3].indexOf(".") != -1) {
var parts2 = parts[3].split(".");s = parseInt(parts2[0]);n = parseInt(parts2[1]);} else {
s = parseInt(parts[3]);}
break;}
ticks += (d * AjaxControlToolkit.TimeSpan.TicksPerDay) +
(h * AjaxControlToolkit.TimeSpan.TicksPerHour) +
(m * AjaxControlToolkit.TimeSpan.TicksPerMinute) +
(s * AjaxControlToolkit.TimeSpan.TicksPerSecond) +
(n * AjaxControlToolkit.TimeSpan.TicksPerMillisecond);if(!isNaN(ticks)) {
return new AjaxControlToolkit.TimeSpan(ticks);} 
throw Error.create(AjaxControlToolkit.Resources.Common_DateTime_InvalidFormat);}
AjaxControlToolkit.TimeSpan.fromTicks = function(ticks) { 
return new AjaxControlToolkit.TimeSpan(ticks);}
AjaxControlToolkit.TimeSpan.fromDays = function(days) { 
return new AjaxControlToolkit.TimeSpan(days * AjaxControlToolkit.TimeSpan.TicksPerDay);}
AjaxControlToolkit.TimeSpan.fromHours = function(hours) { 
return new AjaxControlToolkit.TimeSpan(hours * AjaxControlToolkit.TimeSpan.TicksPerHour);}
AjaxControlToolkit.TimeSpan.fromMinutes = function(minutes) { 
return new AjaxControlToolkit.TimeSpan(minutes * AjaxControlToolkit.TimeSpan.TicksPerMinute);}
AjaxControlToolkit.TimeSpan.fromSeconds = function(seconds) { 
return new AjaxControlToolkit.TimeSpan(minutes * AjaxControlToolkit.TimeSpan.TicksPerSecond);}
AjaxControlToolkit.TimeSpan.fromMilliseconds = function(milliseconds) { 
return new AjaxControlToolkit.TimeSpan(minutes * AjaxControlToolkit.TimeSpan.TicksPerMillisecond);}
AjaxControlToolkit.TimeSpan.TicksPerDay = 864000000000;AjaxControlToolkit.TimeSpan.TicksPerHour = 36000000000;AjaxControlToolkit.TimeSpan.TicksPerMinute = 600000000;AjaxControlToolkit.TimeSpan.TicksPerSecond = 10000000;AjaxControlToolkit.TimeSpan.TicksPerMillisecond = 10000;AjaxControlToolkit.TimeSpan.FullTimeSpanPattern = "dd:hh:mm:ss.nnnn";AjaxControlToolkit.TimeSpan.ShortTimeSpanPattern = "hh:mm";AjaxControlToolkit.TimeSpan.LongTimeSpanPattern = "hh:mm:ss";Date.prototype.getTimeOfDay = function Date$getTimeOfDay() {
return new AjaxControlToolkit.TimeSpan(
0, 
this.getHours(), 
this.getMinutes(), 
this.getSeconds(), 
this.getMilliseconds());}
Date.prototype.getDateOnly = function Date$getDateOnly() {
return new Date(this.getFullYear(), this.getMonth(), this.getDate());}
Date.prototype.add = function Date$add(span) {
return new Date(this.getTime() + span.getTotalMilliseconds());}
Date.prototype.subtract = function Date$subtract(span) {
return this.add(span.negate());}
Date.prototype.getTicks = function Date$getTicks() {
return this.getTime() * AjaxControlToolkit.TimeSpan.TicksPerMillisecond;}
AjaxControlToolkit.FirstDayOfWeek = function() {
}
AjaxControlToolkit.FirstDayOfWeek.prototype = {
Sunday : 0,
Monday : 1,
Tuesday : 2,
Wednesday : 3,
Thursday : 4,
Friday : 5,
Saturday : 6,
Default : 7
}
AjaxControlToolkit.FirstDayOfWeek.registerEnum("AjaxControlToolkit.FirstDayOfWeek");
/////////////////////////////////////////////////////////////////////////////
Sys.Timer = function() {
Sys.Timer.initializeBase(this);this._interval = 1000;this._enabled = false;this._timer = null;}
Sys.Timer.prototype = {
get_interval: function() {
return this._interval;},
set_interval: function(value) {
if (this._interval !== value) {
this._interval = value;this.raisePropertyChanged('interval');if (!this.get_isUpdating() && (this._timer !== null)) {
this._stopTimer();this._startTimer();}
}
},
get_enabled: function() {
return this._enabled;},
set_enabled: function(value) {
if (value !== this.get_enabled()) {
this._enabled = value;this.raisePropertyChanged('enabled');if (!this.get_isUpdating()) {
if (value) {
this._startTimer();}
else {
this._stopTimer();}
}
}
},
add_tick: function(handler) {
this.get_events().addHandler("tick", handler);},
remove_tick: function(handler) {
this.get_events().removeHandler("tick", handler);},
dispose: function() {
this.set_enabled(false);this._stopTimer();Sys.Timer.callBaseMethod(this, 'dispose');},
updated: function() {
Sys.Timer.callBaseMethod(this, 'updated');if (this._enabled) {
this._stopTimer();this._startTimer();}
},
_timerCallback: function() {
var handler = this.get_events().getHandler("tick");if (handler) {
handler(this, Sys.EventArgs.Empty);}
},
_startTimer: function() {
this._timer = window.setInterval(Function.createDelegate(this, this._timerCallback), this._interval);},
_stopTimer: function() {
window.clearInterval(this._timer);this._timer = null;}
}
Sys.Timer.descriptor = {
properties: [ {name: 'interval', type: Number},
{name: 'enabled', type: Boolean} ],
events: [ {name: 'tick'} ]
}
Sys.Timer.registerClass('Sys.Timer', Sys.Component);
Type.registerNamespace('AjaxControlToolkit.Animation');var $AA = AjaxControlToolkit.Animation;$AA.registerAnimation = function(name, type) {
if (type && ((type === $AA.Animation) || (type.inheritsFrom && type.inheritsFrom($AA.Animation)))) {
if (!$AA.__animations) {
$AA.__animations = { };}
$AA.__animations[name.toLowerCase()] = type;type.play = function() {
var animation = new type();type.apply(animation, arguments);animation.initialize();var handler = Function.createDelegate(animation,
function() {
animation.remove_ended(handler);handler = null;animation.dispose();});animation.add_ended(handler);animation.play();}
} else {
throw Error.argumentType('type', type, $AA.Animation, AjaxControlToolkit.Resources.Animation_InvalidBaseType);}
}
$AA.buildAnimation = function(json, defaultTarget) {
if (!json || json === '') {
return null;}
var obj;json = '(' + json + ')';if (! Sys.Debug.isDebug) {
try { obj = Sys.Serialization.JavaScriptSerializer.deserialize(json);} catch (ex) { } 
} else {
obj = Sys.Serialization.JavaScriptSerializer.deserialize(json);}
return $AA.createAnimation(obj, defaultTarget);}
$AA.createAnimation = function(obj, defaultTarget) {
if (!obj || !obj.AnimationName) {
throw Error.argument('obj', AjaxControlToolkit.Resources.Animation_MissingAnimationName);}
var type = $AA.__animations[obj.AnimationName.toLowerCase()];if (!type) {
throw Error.argument('type', String.format(AjaxControlToolkit.Resources.Animation_UknownAnimationName, obj.AnimationName));}
var animation = new type();if (defaultTarget) {
animation.set_target(defaultTarget);}
if (obj.AnimationChildren && obj.AnimationChildren.length) {
if ($AA.ParentAnimation.isInstanceOfType(animation)) {
for (var i = 0;i < obj.AnimationChildren.length;i++) {
var child = $AA.createAnimation(obj.AnimationChildren[i]);if (child) {
animation.add(child);}
}
} else {
throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_ChildrenNotAllowed, type.getName()));}
}
var properties = type.__animationProperties;if (!properties) {
type.__animationProperties = { };type.resolveInheritance();for (var name in type.prototype) {
if (name.startsWith('set_')) {
type.__animationProperties[name.substr(4).toLowerCase()] = name;}
}
delete type.__animationProperties['id'];properties = type.__animationProperties;}
for (var property in obj) {
var prop = property.toLowerCase();if (prop == 'animationname' || prop == 'animationchildren') {
continue;}
var value = obj[property];var setter = properties[prop];if (setter && String.isInstanceOfType(setter) && animation[setter]) {
if (! Sys.Debug.isDebug) {
try { animation[setter](value);} catch (ex) { }
} else {
animation[setter](value);}
} else {
if (prop.endsWith('script')) {
setter = properties[prop.substr(0, property.length - 6)];if (setter && String.isInstanceOfType(setter) && animation[setter]) {
animation.DynamicProperties[setter] = value;} else if ( Sys.Debug.isDebug) {
throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_NoDynamicPropertyFound, property, property.substr(0, property.length - 5)));}
} else if ( Sys.Debug.isDebug) {
throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_NoPropertyFound, property));}
}
}
return animation;}
$AA.Animation = function(target, duration, fps) {
$AA.Animation.initializeBase(this);this._duration = 1;this._fps = 25;this._target = null;this._tickHandler = null;this._timer = null;this._percentComplete = 0;this._percentDelta = null;this._owner = null;this._parentAnimation = null;this.DynamicProperties = { };if (target) {
this.set_target(target);}
if (duration) {
this.set_duration(duration);}
if (fps) { 
this.set_fps(fps);}
}
$AA.Animation.prototype = {
dispose: function() {
if (this._timer) {
this._timer.dispose();this._timer = null;}
this._tickHandler = null;this._target = null;$AA.Animation.callBaseMethod(this, 'dispose');},
play: function() {
if (!this._owner) {
var resume = true;if (!this._timer) {
resume = false;if (!this._tickHandler) {
this._tickHandler = Function.createDelegate(this, this._onTimerTick);}
this._timer = new Sys.Timer();this._timer.add_tick(this._tickHandler);this.onStart();this._timer.set_interval(1000 / this._fps);this._percentDelta = 100 / (this._duration * this._fps);this._updatePercentComplete(0, true);}
this._timer.set_enabled(true);this.raisePropertyChanged('isPlaying');if (!resume) {
this.raisePropertyChanged('isActive');}
}
},
pause: function() {
if (!this._owner) {
if (this._timer) {
this._timer.set_enabled(false);this.raisePropertyChanged('isPlaying');}
}
},
stop: function(finish) {
if (!this._owner) {
var t = this._timer;this._timer = null;if (t) {
t.dispose();if (this._percentComplete !== 100) {
this._percentComplete = 100;this.raisePropertyChanged('percentComplete');if (finish || finish === undefined) {
this.onStep(100);}
}
this.onEnd();this.raisePropertyChanged('isPlaying');this.raisePropertyChanged('isActive');}
}
},
onStart: function() {
this.raiseStarted();for (var property in this.DynamicProperties) {
try {
this[property](eval(this.DynamicProperties[property]));} catch (ex) {
if (Sys.Debug.isDebug) {
throw ex;}
}
}
},
onStep: function(percentage) {
this.setValue(this.getAnimatedValue(percentage));this.raiseStep();},
onEnd: function() {
this.raiseEnded();},
getAnimatedValue: function(percentage) {
throw Error.notImplemented();},
setValue: function(value) {
throw Error.notImplemented();},
interpolate: function(start, end, percentage) {
return start + (end - start) * (percentage / 100);},
_onTimerTick: function() {
this._updatePercentComplete(this._percentComplete + this._percentDelta, true);},
_updatePercentComplete: function(percentComplete, animate) {
if (percentComplete > 100) {
percentComplete = 100;}
this._percentComplete = percentComplete;this.raisePropertyChanged('percentComplete');if (animate) {
this.onStep(percentComplete);}
if (percentComplete === 100) {
this.stop(false);}
},
setOwner: function(owner) {
this._owner = owner;},
raiseStarted: function() {
var handlers = this.get_events().getHandler('started');if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_started: function(handler) {
this.get_events().addHandler("started", handler);},
remove_started: function(handler) {
this.get_events().removeHandler("started", handler);},
raiseEnded: function() {
var handlers = this.get_events().getHandler('ended');if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_ended: function(handler) {
this.get_events().addHandler("ended", handler);},
remove_ended: function(handler) {
this.get_events().removeHandler("ended", handler);},
raiseStep: function() {
var handlers = this.get_events().getHandler('step');if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_step: function(handler) {
this.get_events().addHandler("step", handler);},
remove_step: function(handler) {
this.get_events().removeHandler("step", handler);},
get_target: function() {
if (!this._target && this._parentAnimation) {
return this._parentAnimation.get_target();}
return this._target;},
set_target: function(value) {
if (this._target != value) {
this._target = value;this.raisePropertyChanged('target');}
},
set_animationTarget: function(id) {
var target = null;var element = $get(id);if (element) {
target = element;} else {
var ctrl = $find(id);if (ctrl) {
element = ctrl.get_element();if (element) {
target = element;}
}
}
if (target) {
this.set_target(target);} else {
throw Error.argument('id', String.format(AjaxControlToolkit.Resources.Animation_TargetNotFound, id));}
},
get_duration: function() {
return this._duration;},
set_duration: function(value) {
value = this._getFloat(value);if (this._duration != value) {
this._duration = value;this.raisePropertyChanged('duration');}
},
get_fps: function() {
return this._fps;},
set_fps: function(value) {
value = this._getInteger(value);if (this.fps != value) {
this._fps = value;this.raisePropertyChanged('fps');}
},
get_isActive: function() {
return (this._timer !== null);},
get_isPlaying: function() {
return (this._timer !== null) && this._timer.get_enabled();},
get_percentComplete: function() {
return this._percentComplete;},
_getBoolean: function(value) {
if (String.isInstanceOfType(value)) {
return Boolean.parse(value);}
return value;},
_getInteger: function(value) {
if (String.isInstanceOfType(value)) {
return parseInt(value);}
return value;},
_getFloat: function(value) {
if (String.isInstanceOfType(value)) {
return parseFloat(value);}
return value;},
_getEnum: function(value, type) {
if (String.isInstanceOfType(value) && type && type.parse) {
return type.parse(value);}
return value;}
}
$AA.Animation.registerClass('AjaxControlToolkit.Animation.Animation', Sys.Component);$AA.registerAnimation('animation', $AA.Animation);$AA.ParentAnimation = function(target, duration, fps, animations) {
$AA.ParentAnimation.initializeBase(this, [target, duration, fps]);this._animations = [];if (animations && animations.length) {
for (var i = 0;i < animations.length;i++) {
this.add(animations[i]);}
}
}
$AA.ParentAnimation.prototype = {
initialize : function() {
$AA.ParentAnimation.callBaseMethod(this, 'initialize');if (this._animations) {
for (var i = 0;i < this._animations.length;i++) {
var animation = this._animations[i];if (animation && !animation.get_isInitialized) {
animation.initialize();}
}
}
},
dispose : function() {
this.clear();this._animations = null;$AA.ParentAnimation.callBaseMethod(this, 'dispose');},
get_animations : function() {
return this._animations;},
add : function(animation) {
if (this._animations) {
if (animation) {
animation._parentAnimation = this;}
Array.add(this._animations, animation);this.raisePropertyChanged('animations');}
},
remove : function(animation) {
if (this._animations) {
if (animation) {
animation.dispose();}
Array.remove(this._animations, animation);this.raisePropertyChanged('animations');}
},
removeAt : function(index) {
if (this._animations) {
var animation = this._animations[index];if (animation) {
animation.dispose();}
Array.removeAt(this._animations, index);this.raisePropertyChanged('animations');}
},
clear : function() {
if (this._animations) {
for (var i = this._animations.length - 1;i >= 0;i--) {
this._animations[i].dispose();this._animations[i] = null;}
Array.clear(this._animations);this._animations = [];this.raisePropertyChanged('animations');}
}
}
$AA.ParentAnimation.registerClass('AjaxControlToolkit.Animation.ParentAnimation', $AA.Animation);$AA.registerAnimation('parent', $AA.ParentAnimation);$AA.ParallelAnimation = function(target, duration, fps, animations) {
$AA.ParallelAnimation.initializeBase(this, [target, duration, fps, animations]);}
$AA.ParallelAnimation.prototype = {
add : function(animation) {
$AA.ParallelAnimation.callBaseMethod(this, 'add', [animation]);animation.setOwner(this);},
onStart : function() {
$AA.ParallelAnimation.callBaseMethod(this, 'onStart');var animations = this.get_animations();for (var i = 0;i < animations.length;i++) {
animations[i].onStart();}
},
onStep : function(percentage) {
var animations = this.get_animations();for (var i = 0;i < animations.length;i++) {
animations[i].onStep(percentage);}
},
onEnd : function() {
var animations = this.get_animations();for (var i = 0;i < animations.length;i++) {
animations[i].onEnd();}
$AA.ParallelAnimation.callBaseMethod(this, 'onEnd');}
}
$AA.ParallelAnimation.registerClass('AjaxControlToolkit.Animation.ParallelAnimation', $AA.ParentAnimation);$AA.registerAnimation('parallel', $AA.ParallelAnimation);$AA.SequenceAnimation = function(target, duration, fps, animations, iterations) {
$AA.SequenceAnimation.initializeBase(this, [target, duration, fps, animations]);this._handler = null;this._paused = false;this._playing = false;this._index = 0;this._remainingIterations = 0;this._iterations = (iterations !== undefined) ? iterations : 1;}
$AA.SequenceAnimation.prototype = {
dispose : function() {
this._handler = null;$AA.SequenceAnimation.callBaseMethod(this, 'dispose');},
stop : function() {
if (this._playing) {
var animations = this.get_animations();if (this._index < animations.length) {
animations[this._index].remove_ended(this._handler);for (var i = this._index;i < animations.length;i++) {
animations[i].stop();}
}
this._playing = false;this._paused = false;this.raisePropertyChanged('isPlaying');this.onEnd();}
},
pause : function() {
if (this.get_isPlaying()) {
var current = this.get_animations()[this._index];if (current != null) {
current.pause();}
this._paused = true;this.raisePropertyChanged('isPlaying');}
},
play : function() {
var animations = this.get_animations();if (!this._playing) {
this._playing = true;if (this._paused) {
this._paused = false;var current = animations[this._index];if (current != null) {
current.play();this.raisePropertyChanged('isPlaying');}
} else {
this.onStart();this._index = 0;var first = animations[this._index];if (first) {
first.add_ended(this._handler);first.play();this.raisePropertyChanged('isPlaying');} else {
this.stop();}
}
}
},
onStart : function() {
$AA.SequenceAnimation.callBaseMethod(this, 'onStart');this._remainingIterations = this._iterations - 1;if (!this._handler) {
this._handler = Function.createDelegate(this, this._onEndAnimation);}
},
_onEndAnimation : function() {
var animations = this.get_animations();var current = animations[this._index++];if (current) {
current.remove_ended(this._handler);}
if (this._index < animations.length) {
var next = animations[this._index];next.add_ended(this._handler);next.play();} else if (this._remainingIterations >= 1 || this._iterations <= 0) {
this._remainingIterations--;this._index = 0;var first = animations[0];first.add_ended(this._handler);first.play();} else {
this.stop();}
},
onStep : function(percentage) {
throw Error.invalidOperation(AjaxControlToolkit.Resources.Animation_CannotNestSequence);},
onEnd : function() {
this._remainingIterations = 0;$AA.SequenceAnimation.callBaseMethod(this, 'onEnd');},
get_isActive : function() {
return true;},
get_isPlaying : function() {
return this._playing && !this._paused;},
get_iterations : function() {
return this._iterations;},
set_iterations : function(value) {
value = this._getInteger(value);if (this._iterations != value) {
this._iterations = value;this.raisePropertyChanged('iterations');}
},
get_isInfinite : function() {
return this._iterations <= 0;}
}
$AA.SequenceAnimation.registerClass('AjaxControlToolkit.Animation.SequenceAnimation', $AA.ParentAnimation);$AA.registerAnimation('sequence', $AA.SequenceAnimation);$AA.SelectionAnimation = function(target, duration, fps, animations) {
$AA.SelectionAnimation.initializeBase(this, [target, duration, fps, animations]);this._selectedIndex = -1;this._selected = null;}
$AA.SelectionAnimation.prototype = { 
getSelectedIndex : function() {
throw Error.notImplemented();},
onStart : function() {
$AA.SelectionAnimation.callBaseMethod(this, 'onStart');var animations = this.get_animations();this._selectedIndex = this.getSelectedIndex();if (this._selectedIndex >= 0 && this._selectedIndex < animations.length) {
this._selected = animations[this._selectedIndex];if (this._selected) {
this._selected.setOwner(this);this._selected.onStart();}
}
},
onStep : function(percentage) {
if (this._selected) {
this._selected.onStep(percentage);}
},
onEnd : function() {
if (this._selected) {
this._selected.onEnd();this._selected.setOwner(null);}
this._selected = null;this._selectedIndex = null;$AA.SelectionAnimation.callBaseMethod(this, 'onEnd');}
}
$AA.SelectionAnimation.registerClass('AjaxControlToolkit.Animation.SelectionAnimation', $AA.ParentAnimation);$AA.registerAnimation('selection', $AA.SelectionAnimation);$AA.ConditionAnimation = function(target, duration, fps, animations, conditionScript) {
$AA.ConditionAnimation.initializeBase(this, [target, duration, fps, animations]);this._conditionScript = conditionScript;}
$AA.ConditionAnimation.prototype = { 
getSelectedIndex : function() {
var selected = -1;if (this._conditionScript && this._conditionScript.length > 0) {
try {
selected = eval(this._conditionScript) ? 0 : 1;} catch(ex) {
}
}
return selected;},
get_conditionScript : function() {
return this._conditionScript;},
set_conditionScript : function(value) {
if (this._conditionScript != value) {
this._conditionScript = value;this.raisePropertyChanged('conditionScript');}
}
}
$AA.ConditionAnimation.registerClass('AjaxControlToolkit.Animation.ConditionAnimation', $AA.SelectionAnimation);$AA.registerAnimation('condition', $AA.ConditionAnimation);$AA.CaseAnimation = function(target, duration, fps, animations, selectScript) {
$AA.CaseAnimation.initializeBase(this, [target, duration, fps, animations]);this._selectScript = selectScript;}
$AA.CaseAnimation.prototype = {
getSelectedIndex : function() {
var selected = -1;if (this._selectScript && this._selectScript.length > 0) {
try {
var result = eval(this._selectScript)
if (result !== undefined)
selected = result;} catch (ex) {
}
}
return selected;},
get_selectScript : function() {
return this._selectScript;},
set_selectScript : function(value) {
if (this._selectScript != value) {
this._selectScript = value;this.raisePropertyChanged('selectScript');}
}
}
$AA.CaseAnimation.registerClass('AjaxControlToolkit.Animation.CaseAnimation', $AA.SelectionAnimation);$AA.registerAnimation('case', $AA.CaseAnimation);$AA.FadeEffect = function() {
throw Error.invalidOperation();}
$AA.FadeEffect.prototype = {
FadeIn : 0,
FadeOut : 1
}
$AA.FadeEffect.registerEnum("AjaxControlToolkit.Animation.FadeEffect", false);$AA.FadeAnimation = function(target, duration, fps, effect, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.FadeAnimation.initializeBase(this, [target, duration, fps]);this._effect = (effect !== undefined) ? effect : $AA.FadeEffect.FadeIn;this._max = (maximumOpacity !== undefined) ? maximumOpacity : 1;this._min = (minimumOpacity !== undefined) ? minimumOpacity : 0;this._start = this._min;this._end = this._max;this._layoutCreated = false;this._forceLayoutInIE = (forceLayoutInIE === undefined || forceLayoutInIE === null) ? true : forceLayoutInIE;this._currentTarget = null;this._resetOpacities();}
$AA.FadeAnimation.prototype = {
_resetOpacities : function() {
if (this._effect == $AA.FadeEffect.FadeIn) {
this._start = this._min;this._end = this._max;} else {
this._start = this._max;this._end = this._min;}
},
_createLayout : function() {
var element = this._currentTarget;if (element) {
this._originalWidth = $common.getCurrentStyle(element, 'width');var originalHeight = $common.getCurrentStyle(element, 'height');this._originalBackColor = $common.getCurrentStyle(element, 'backgroundColor');if ((!this._originalWidth || this._originalWidth == '' || this._originalWidth == 'auto') &&
(!originalHeight || originalHeight == '' || originalHeight == 'auto')) {
element.style.width = element.offsetWidth + 'px';}
if (!this._originalBackColor || this._originalBackColor == '' || this._originalBackColor == 'transparent' || this._originalBackColor == 'rgba(0, 0, 0, 0)') {
element.style.backgroundColor = $common.getInheritedBackgroundColor(element);}
this._layoutCreated = true;}
},
onStart : function() {
$AA.FadeAnimation.callBaseMethod(this, 'onStart');this._currentTarget = this.get_target();this.setValue(this._start);if (this._forceLayoutInIE && !this._layoutCreated && Sys.Browser.agent == Sys.Browser.InternetExplorer) {
this._createLayout();}
},
getAnimatedValue : function(percentage) {
return this.interpolate(this._start, this._end, percentage);},
setValue : function(value) {
if (this._currentTarget) {
$common.setElementOpacity(this._currentTarget, value);}
},
get_effect : function() {
return this._effect;},
set_effect : function(value) {
value = this._getEnum(value, $AA.FadeEffect);if (this._effect != value) {
this._effect = value;this._resetOpacities();this.raisePropertyChanged('effect');}
},
get_minimumOpacity : function() {
return this._min;},
set_minimumOpacity : function(value) {
value = this._getFloat(value);if (this._min != value) {
this._min = value;this._resetOpacities();this.raisePropertyChanged('minimumOpacity');}
},
get_maximumOpacity : function() {
return this._max;},
set_maximumOpacity : function(value) {
value = this._getFloat(value);if (this._max != value) {
this._max = value;this._resetOpacities();this.raisePropertyChanged('maximumOpacity');}
},
get_forceLayoutInIE : function() {
return this._forceLayoutInIE;},
set_forceLayoutInIE : function(value) {
value = this._getBoolean(value);if (this._forceLayoutInIE != value) {
this._forceLayoutInIE = value;this.raisePropertyChanged('forceLayoutInIE');}
},
set_startValue : function(value) {
value = this._getFloat(value);this._start = value;}
}
$AA.FadeAnimation.registerClass('AjaxControlToolkit.Animation.FadeAnimation', $AA.Animation);$AA.registerAnimation('fade', $AA.FadeAnimation);$AA.FadeInAnimation = function(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.FadeInAnimation.initializeBase(this, [target, duration, fps, $AA.FadeEffect.FadeIn, minimumOpacity, maximumOpacity, forceLayoutInIE]);}
$AA.FadeInAnimation.prototype = {
onStart : function() {
$AA.FadeInAnimation.callBaseMethod(this, 'onStart');if (this._currentTarget) {
this.set_startValue($common.getElementOpacity(this._currentTarget));}
}
}
$AA.FadeInAnimation.registerClass('AjaxControlToolkit.Animation.FadeInAnimation', $AA.FadeAnimation);$AA.registerAnimation('fadeIn', $AA.FadeInAnimation);$AA.FadeOutAnimation = function(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.FadeOutAnimation.initializeBase(this, [target, duration, fps, $AA.FadeEffect.FadeOut, minimumOpacity, maximumOpacity, forceLayoutInIE]);}
$AA.FadeOutAnimation.prototype = {
onStart : function() {
$AA.FadeOutAnimation.callBaseMethod(this, 'onStart');if (this._currentTarget) {
this.set_startValue($common.getElementOpacity(this._currentTarget));}
}
}
$AA.FadeOutAnimation.registerClass('AjaxControlToolkit.Animation.FadeOutAnimation', $AA.FadeAnimation);$AA.registerAnimation('fadeOut', $AA.FadeOutAnimation);$AA.PulseAnimation = function(target, duration, fps, iterations, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.PulseAnimation.initializeBase(this, [target, duration, fps, null, ((iterations !== undefined) ? iterations : 3)]);this._out = new $AA.FadeOutAnimation(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE);this.add(this._out);this._in = new $AA.FadeInAnimation(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE);this.add(this._in);}
$AA.PulseAnimation.prototype = {
get_minimumOpacity : function() {
return this._out.get_minimumOpacity();},
set_minimumOpacity : function(value) {
value = this._getFloat(value);this._out.set_minimumOpacity(value);this._in.set_minimumOpacity(value);this.raisePropertyChanged('minimumOpacity');},
get_maximumOpacity : function() {
return this._out.get_maximumOpacity();},
set_maximumOpacity : function(value) {
value = this._getFloat(value);this._out.set_maximumOpacity(value);this._in.set_maximumOpacity(value);this.raisePropertyChanged('maximumOpacity');},
get_forceLayoutInIE : function() {
return this._out.get_forceLayoutInIE();},
set_forceLayoutInIE : function(value) {
value = this._getBoolean(value);this._out.set_forceLayoutInIE(value);this._in.set_forceLayoutInIE(value);this.raisePropertyChanged('forceLayoutInIE');},
set_duration : function(value) {
value = this._getFloat(value);$AA.PulseAnimation.callBaseMethod(this, 'set_duration', [value]);this._in.set_duration(value);this._out.set_duration(value);},
set_fps : function(value) {
value = this._getInteger(value);$AA.PulseAnimation.callBaseMethod(this, 'set_fps', [value]);this._in.set_fps(value);this._out.set_fps(value);}
}
$AA.PulseAnimation.registerClass('AjaxControlToolkit.Animation.PulseAnimation', $AA.SequenceAnimation);$AA.registerAnimation('pulse', $AA.PulseAnimation);$AA.PropertyAnimation = function(target, duration, fps, property, propertyKey) {
$AA.PropertyAnimation.initializeBase(this, [target, duration, fps]);this._property = property;this._propertyKey = propertyKey;this._currentTarget = null;}
$AA.PropertyAnimation.prototype = {
onStart : function() {
$AA.PropertyAnimation.callBaseMethod(this, 'onStart');this._currentTarget = this.get_target();},
setValue : function(value) {
var element = this._currentTarget;if (element && this._property && this._property.length > 0) { 
if (this._propertyKey && this._propertyKey.length > 0 && element[this._property]) {
element[this._property][this._propertyKey] = value;} else {
element[this._property] = value;}
}
},
getValue : function() {
var element = this.get_target();if (element && this._property && this._property.length > 0) { 
var property = element[this._property];if (property) {
if (this._propertyKey && this._propertyKey.length > 0) {
return property[this._propertyKey];}
return property;}
}
return null;},
get_property : function() {
return this._property;},
set_property : function(value) {
if (this._property != value) {
this._property = value;this.raisePropertyChanged('property');}
},
get_propertyKey : function() {
return this._propertyKey;},
set_propertyKey : function(value) {
if (this._propertyKey != value) {
this._propertyKey = value;this.raisePropertyChanged('propertyKey');}
}
}
$AA.PropertyAnimation.registerClass('AjaxControlToolkit.Animation.PropertyAnimation', $AA.Animation);$AA.registerAnimation('property', $AA.PropertyAnimation);$AA.DiscreteAnimation = function(target, duration, fps, property, propertyKey, values) {
$AA.DiscreteAnimation.initializeBase(this, [target, duration, fps, property, propertyKey]);this._values = (values && values.length) ? values : [];}
$AA.DiscreteAnimation.prototype = {
getAnimatedValue : function(percentage) {
var index = Math.floor(this.interpolate(0, this._values.length - 1, percentage));return this._values[index];},
get_values : function() {
return this._values;},
set_values : function(value) {
if (this._values != value) {
this._values = value;this.raisePropertyChanged('values');}
}
}
$AA.DiscreteAnimation.registerClass('AjaxControlToolkit.Animation.DiscreteAnimation', $AA.PropertyAnimation);$AA.registerAnimation('discrete', $AA.DiscreteAnimation);$AA.InterpolatedAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue) {
$AA.InterpolatedAnimation.initializeBase(this, [target, duration, fps, ((property !== undefined) ? property : 'style'), propertyKey]);this._startValue = startValue;this._endValue = endValue;}
$AA.InterpolatedAnimation.prototype = {
get_startValue : function() {
return this._startValue;},
set_startValue : function(value) {
value = this._getFloat(value);if (this._startValue != value) {
this._startValue = value;this.raisePropertyChanged('startValue');}
},
get_endValue : function() {
return this._endValue;},
set_endValue : function(value) {
value = this._getFloat(value);if (this._endValue != value) {
this._endValue = value;this.raisePropertyChanged('endValue');}
} 
}
$AA.InterpolatedAnimation.registerClass('AjaxControlToolkit.Animation.InterpolatedAnimation', $AA.PropertyAnimation);$AA.registerAnimation('interpolated', $AA.InterpolatedAnimation);$AA.ColorAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue) {
$AA.ColorAnimation.initializeBase(this, [target, duration, fps, property, propertyKey, startValue, endValue]);this._start = null;this._end = null;this._interpolateRed = false;this._interpolateGreen = false;this._interpolateBlue = false;}
$AA.ColorAnimation.prototype = {
onStart : function() {
$AA.ColorAnimation.callBaseMethod(this, 'onStart');this._start = $AA.ColorAnimation.getRGB(this.get_startValue());this._end = $AA.ColorAnimation.getRGB(this.get_endValue());this._interpolateRed = (this._start.Red != this._end.Red);this._interpolateGreen = (this._start.Green != this._end.Green);this._interpolateBlue = (this._start.Blue != this._end.Blue);},
getAnimatedValue : function(percentage) {
var r = this._start.Red;var g = this._start.Green;var b = this._start.Blue;if (this._interpolateRed)
r = Math.round(this.interpolate(r, this._end.Red, percentage));if (this._interpolateGreen)
g = Math.round(this.interpolate(g, this._end.Green, percentage));if (this._interpolateBlue)
b = Math.round(this.interpolate(b, this._end.Blue, percentage));return $AA.ColorAnimation.toColor(r, g, b);},
set_startValue : function(value) {
if (this._startValue != value) {
this._startValue = value;this.raisePropertyChanged('startValue');}
},
set_endValue : function(value) {
if (this._endValue != value) {
this._endValue = value;this.raisePropertyChanged('endValue');}
} 
}
$AA.ColorAnimation.getRGB = function(color) {
if (!color || color.length != 7) {
throw String.format(AjaxControlToolkit.Resources.Animation_InvalidColor, color);}
return { 'Red': parseInt(color.substr(1,2), 16),
'Green': parseInt(color.substr(3,2), 16),
'Blue': parseInt(color.substr(5,2), 16) };}
$AA.ColorAnimation.toColor = function(red, green, blue) {
var r = red.toString(16);var g = green.toString(16);var b = blue.toString(16);if (r.length == 1) r = '0' + r;if (g.length == 1) g = '0' + g;if (b.length == 1) b = '0' + b;return '#' + r + g + b;}
$AA.ColorAnimation.registerClass('AjaxControlToolkit.Animation.ColorAnimation', $AA.InterpolatedAnimation);$AA.registerAnimation('color', $AA.ColorAnimation);$AA.LengthAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue, unit) {
$AA.LengthAnimation.initializeBase(this, [target, duration, fps, property, propertyKey, startValue, endValue]);this._unit = (unit != null) ? unit : 'px';}
$AA.LengthAnimation.prototype = {
getAnimatedValue : function(percentage) {
var value = this.interpolate(this.get_startValue(), this.get_endValue(), percentage);return Math.round(value) + this._unit;},
get_unit : function() {
return this._unit;},
set_unit : function(value) {
if (this._unit != value) {
this._unit = value;this.raisePropertyChanged('unit');}
}
}
$AA.LengthAnimation.registerClass('AjaxControlToolkit.Animation.LengthAnimation', $AA.InterpolatedAnimation);$AA.registerAnimation('length', $AA.LengthAnimation);$AA.MoveAnimation = function(target, duration, fps, horizontal, vertical, relative, unit) {
$AA.MoveAnimation.initializeBase(this, [target, duration, fps, null]);this._horizontal = horizontal ? horizontal : 0;this._vertical = vertical ? vertical : 0;this._relative = (relative === undefined) ? true : relative;this._horizontalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'left', null, null, unit);this._verticalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'top', null, null, unit);this.add(this._verticalAnimation);this.add(this._horizontalAnimation);}
$AA.MoveAnimation.prototype = {
onStart : function() {
$AA.MoveAnimation.callBaseMethod(this, 'onStart');var element = this.get_target();this._horizontalAnimation.set_startValue(element.offsetLeft);this._horizontalAnimation.set_endValue(this._relative ? element.offsetLeft + this._horizontal : this._horizontal);this._verticalAnimation.set_startValue(element.offsetTop);this._verticalAnimation.set_endValue(this._relative ? element.offsetTop + this._vertical : this._vertical);},
get_horizontal : function() {
return this._horizontal;},
set_horizontal : function(value) {
value = this._getFloat(value);if (this._horizontal != value) {
this._horizontal = value;this.raisePropertyChanged('horizontal');}
},
get_vertical : function() {
return this._vertical;},
set_vertical : function(value) {
value = this._getFloat(value);if (this._vertical != value) {
this._vertical = value;this.raisePropertyChanged('vertical');}
},
get_relative : function() {
return this._relative;},
set_relative : function(value) {
value = this._getBoolean(value);if (this._relative != value) {
this._relative = value;this.raisePropertyChanged('relative');}
},
get_unit : function() {
this._horizontalAnimation.get_unit();},
set_unit : function(value) {
var unit = this._horizontalAnimation.get_unit();if (unit != value) {
this._horizontalAnimation.set_unit(value);this._verticalAnimation.set_unit(value);this.raisePropertyChanged('unit');}
}
}
$AA.MoveAnimation.registerClass('AjaxControlToolkit.Animation.MoveAnimation', $AA.ParallelAnimation);$AA.registerAnimation('move', $AA.MoveAnimation);$AA.ResizeAnimation = function(target, duration, fps, width, height, unit) {
$AA.ResizeAnimation.initializeBase(this, [target, duration, fps, null]);this._width = width;this._height = height;this._horizontalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'width', null, null, unit);this._verticalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'height', null, null, unit);this.add(this._horizontalAnimation);this.add(this._verticalAnimation);}
$AA.ResizeAnimation.prototype = {
onStart : function() {
$AA.ResizeAnimation.callBaseMethod(this, 'onStart');var element = this.get_target();this._horizontalAnimation.set_startValue(element.offsetWidth);this._verticalAnimation.set_startValue(element.offsetHeight);this._horizontalAnimation.set_endValue((this._width !== null && this._width !== undefined) ?
this._width : element.offsetWidth);this._verticalAnimation.set_endValue((this._height !== null && this._height !== undefined) ?
this._height : element.offsetHeight);},
get_width : function() {
return this._width;},
set_width : function(value) {
value = this._getFloat(value);if (this._width != value) {
this._width = value;this.raisePropertyChanged('width');}
},
get_height : function() {
return this._height;},
set_height : function(value) {
value = this._getFloat(value);if (this._height != value) {
this._height = value;this.raisePropertyChanged('height');}
},
get_unit : function() {
this._horizontalAnimation.get_unit();},
set_unit : function(value) {
var unit = this._horizontalAnimation.get_unit();if (unit != value) {
this._horizontalAnimation.set_unit(value);this._verticalAnimation.set_unit(value);this.raisePropertyChanged('unit');}
}
}
$AA.ResizeAnimation.registerClass('AjaxControlToolkit.Animation.ResizeAnimation', $AA.ParallelAnimation);$AA.registerAnimation('resize', $AA.ResizeAnimation);$AA.ScaleAnimation = function(target, duration, fps, scaleFactor, unit, center, scaleFont, fontUnit) {
$AA.ScaleAnimation.initializeBase(this, [target, duration, fps]);this._scaleFactor = (scaleFactor !== undefined) ? scaleFactor : 1;this._unit = (unit !== undefined) ? unit : 'px';this._center = center;this._scaleFont = scaleFont;this._fontUnit = (fontUnit !== undefined) ? fontUnit : 'pt';this._element = null;this._initialHeight = null;this._initialWidth = null;this._initialTop = null;this._initialLeft = null;this._initialFontSize = null;}
$AA.ScaleAnimation.prototype = { 
getAnimatedValue : function(percentage) {
return this.interpolate(1.0, this._scaleFactor, percentage);},
onStart : function() {
$AA.ScaleAnimation.callBaseMethod(this, 'onStart');this._element = this.get_target();if (this._element) {
this._initialHeight = this._element.offsetHeight;this._initialWidth = this._element.offsetWidth;if (this._center) {
this._initialTop = this._element.offsetTop;this._initialLeft = this._element.offsetLeft;}
if (this._scaleFont) {
this._initialFontSize = parseFloat(
$common.getCurrentStyle(this._element, 'fontSize'));}
}
},
setValue : function(scale) {
if (this._element) {
var width = Math.round(this._initialWidth * scale);var height = Math.round(this._initialHeight * scale);this._element.style.width = width + this._unit;this._element.style.height = height + this._unit;if (this._center) {
this._element.style.top = (this._initialTop +
Math.round((this._initialHeight - height) / 2)) + this._unit;this._element.style.left = (this._initialLeft +
Math.round((this._initialWidth - width) / 2)) + this._unit;}
if (this._scaleFont) {
var size = this._initialFontSize * scale;if (this._fontUnit == 'px' || this._fontUnit == 'pt') {
size = Math.round(size);}
this._element.style.fontSize = size + this._fontUnit;}
}
},
onEnd : function() {
this._element = null;this._initialHeight = null;this._initialWidth = null;this._initialTop = null;this._initialLeft = null;this._initialFontSize = null;$AA.ScaleAnimation.callBaseMethod(this, 'onEnd');},
get_scaleFactor : function() {
return this._scaleFactor;},
set_scaleFactor : function(value) {
value = this._getFloat(value);if (this._scaleFactor != value) {
this._scaleFactor = value;this.raisePropertyChanged('scaleFactor');}
},
get_unit : function() {
return this._unit;},
set_unit : function(value) {
if (this._unit != value) {
this._unit = value;this.raisePropertyChanged('unit');}
},
get_center : function() {
return this._center;},
set_center : function(value) {
value = this._getBoolean(value);if (this._center != value) {
this._center = value;this.raisePropertyChanged('center');}
},
get_scaleFont : function() {
return this._scaleFont;},
set_scaleFont : function(value) {
value = this._getBoolean(value);if (this._scaleFont != value) {
this._scaleFont = value;this.raisePropertyChanged('scaleFont');}
},
get_fontUnit : function() {
return this._fontUnit;},
set_fontUnit : function(value) {
if (this._fontUnit != value) { 
this._fontUnit = value;this.raisePropertyChanged('fontUnit');}
}
}
$AA.ScaleAnimation.registerClass('AjaxControlToolkit.Animation.ScaleAnimation', $AA.Animation);$AA.registerAnimation('scale', $AA.ScaleAnimation);$AA.Action = function(target, duration, fps) {
$AA.Action.initializeBase(this, [target, duration, fps]);if (duration === undefined) {
this.set_duration(0);}
}
$AA.Action.prototype = {
onEnd : function() {
this.doAction();$AA.Action.callBaseMethod(this, 'onEnd');},
doAction : function() {
throw Error.notImplemented();},
getAnimatedValue : function() {
},
setValue : function() {
}
}
$AA.Action.registerClass('AjaxControlToolkit.Animation.Action', $AA.Animation);$AA.registerAnimation('action', $AA.Action);$AA.EnableAction = function(target, duration, fps, enabled) {
$AA.EnableAction.initializeBase(this, [target, duration, fps]);this._enabled = (enabled !== undefined) ? enabled : true;}
$AA.EnableAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
element.disabled = !this._enabled;}
},
get_enabled : function() {
return this._enabled;},
set_enabled : function(value) {
value = this._getBoolean(value);if (this._enabled != value) {
this._enabled = value;this.raisePropertyChanged('enabled');}
}
}
$AA.EnableAction.registerClass('AjaxControlToolkit.Animation.EnableAction', $AA.Action);$AA.registerAnimation('enableAction', $AA.EnableAction);$AA.HideAction = function(target, duration, fps, visible) {
$AA.HideAction.initializeBase(this, [target, duration, fps]);this._visible = visible;}
$AA.HideAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
$common.setVisible(element, this._visible);}
},
get_visible : function() {
return this._visible;},
set_visible : function(value) {
if (this._visible != value) {
this._visible = value;this.raisePropertyChanged('visible');}
}
}
$AA.HideAction.registerClass('AjaxControlToolkit.Animation.HideAction', $AA.Action);$AA.registerAnimation('hideAction', $AA.HideAction);$AA.StyleAction = function(target, duration, fps, attribute, value) {
$AA.StyleAction.initializeBase(this, [target, duration, fps]);this._attribute = attribute;this._value = value;}
$AA.StyleAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
element.style[this._attribute] = this._value;}
},
get_attribute : function() {
return this._attribute;},
set_attribute : function(value) {
if (this._attribute != value) {
this._attribute = value;this.raisePropertyChanged('attribute');}
},
get_value : function() {
return this._value;},
set_value : function(value) {
if (this._value != value) {
this._value = value;this.raisePropertyChanged('value');}
}
}
$AA.StyleAction.registerClass('AjaxControlToolkit.Animation.StyleAction', $AA.Action);$AA.registerAnimation('styleAction', $AA.StyleAction);$AA.OpacityAction = function(target, duration, fps, opacity) {
$AA.OpacityAction.initializeBase(this, [target, duration, fps]);this._opacity = opacity;}
$AA.OpacityAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
$common.setElementOpacity(element, this._opacity);}
},
get_opacity : function() {
return this._opacity;},
set_opacity : function(value) {
value = this._getFloat(value);if (this._opacity != value) {
this._opacity = value;this.raisePropertyChanged('opacity');}
}
}
$AA.OpacityAction.registerClass('AjaxControlToolkit.Animation.OpacityAction', $AA.Action);$AA.registerAnimation('opacityAction', $AA.OpacityAction);$AA.ScriptAction = function(target, duration, fps, script) {
$AA.ScriptAction.initializeBase(this, [target, duration, fps]);this._script = script;}
$AA.ScriptAction.prototype = {
doAction : function() {
try {
eval(this._script);} catch (ex) {
}
},
get_script : function() {
return this._script;},
set_script : function(value) {
if (this._script != value) {
this._script = value;this.raisePropertyChanged('script');}
}
}
$AA.ScriptAction.registerClass('AjaxControlToolkit.Animation.ScriptAction', $AA.Action);$AA.registerAnimation('scriptAction', $AA.ScriptAction);
Type.registerNamespace('AjaxControlToolkit.Animation');AjaxControlToolkit.Animation.AnimationBehavior = function(element) {
AjaxControlToolkit.Animation.AnimationBehavior.initializeBase(this, [element]);this._onLoad = null;this._onClick = null;this._onMouseOver = null;this._onMouseOut = null;this._onHoverOver = null;this._onHoverOut = null;this._onClickHandler = null;this._onMouseOverHandler = null;this._onMouseOutHandler = null;}
AjaxControlToolkit.Animation.AnimationBehavior.prototype = {
initialize : function() {
AjaxControlToolkit.Animation.AnimationBehavior.callBaseMethod(this, 'initialize');var element = this.get_element();if (element) {
this._onClickHandler = Function.createDelegate(this, this.OnClick);$addHandler(element, 'click', this._onClickHandler);this._onMouseOverHandler = Function.createDelegate(this, this.OnMouseOver);$addHandler(element, 'mouseover', this._onMouseOverHandler);this._onMouseOutHandler = Function.createDelegate(this, this.OnMouseOut);$addHandler(element, 'mouseout', this._onMouseOutHandler);}
},
dispose : function() {
var element = this.get_element();if (element) {
if (this._onClickHandler) {
$removeHandler(element, 'click', this._onClickHandler);this._onClickHandler = null;}
if (this._onMouseOverHandler) {
$removeHandler(element, 'mouseover', this._onMouseOverHandler);this._onMouseOverHandler = null;}
if (this._onMouseOutHandler) {
$removeHandler(element, 'mouseout', this._onMouseOutHandler);this._onMouseOutHandler = null;}
}
this._onLoad = null;this._onClick = null;this._onMouseOver = null;this._onMouseOut = null;this._onHoverOver = null;this._onHoverOut = null;AjaxControlToolkit.Animation.AnimationBehavior.callBaseMethod(this, 'dispose');},
get_OnLoad : function() {
return this._onLoad ? this._onLoad.get_json() : null;},
set_OnLoad : function(value) {
if (!this._onLoad) {
this._onLoad = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onLoad.initialize();}
this._onLoad.set_json(value);this.raisePropertyChanged('OnLoad');this._onLoad.play();},
get_OnLoadBehavior : function() {
return this._onLoad;},
get_OnClick : function() {
return this._onClick ? this._onClick.get_json() : null;},
set_OnClick : function(value) {
if (!this._onClick) {
this._onClick = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onClick.initialize();}
this._onClick.set_json(value);this.raisePropertyChanged('OnClick');},
get_OnClickBehavior : function() {
return this._onClick;},
OnClick : function() {
if (this._onClick) {
this._onClick.play();}
},
get_OnMouseOver : function() {
return this._onMouseOver ? this._onMouseOver.get_json() : null;},
set_OnMouseOver : function(value) {
if (!this._onMouseOver) {
this._onMouseOver = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onMouseOver.initialize();}
this._onMouseOver.set_json(value);this.raisePropertyChanged('OnMouseOver');},
get_OnMouseOverBehavior : function() {
return this._onMouseOver;},
OnMouseOver : function() {
if (this._onMouseOver) {
this._onMouseOver.play();}
if (this._onHoverOver) {
if (this._onHoverOut) {
this._onHoverOut.quit();}
this._onHoverOver.play();}
},
get_OnMouseOut : function() {
return this._onMouseOut ? this._onMouseOut.get_json() : null;},
set_OnMouseOut : function(value) {
if (!this._onMouseOut) {
this._onMouseOut = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onMouseOut.initialize();}
this._onMouseOut.set_json(value);this.raisePropertyChanged('OnMouseOut');},
get_OnMouseOutBehavior : function() {
return this._onMouseOut;},
OnMouseOut : function() {
if (this._onMouseOut) {
this._onMouseOut.play();}
if (this._onHoverOut) {
if (this._onHoverOver) {
this._onHoverOver.quit();}
this._onHoverOut.play();}
},
get_OnHoverOver : function() {
return this._onHoverOver ? this._onHoverOver.get_json() : null;},
set_OnHoverOver : function(value) {
if (!this._onHoverOver) {
this._onHoverOver = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onHoverOver.initialize();}
this._onHoverOver.set_json(value);this.raisePropertyChanged('OnHoverOver');},
get_OnHoverOverBehavior : function() {
return this._onHoverOver;},
get_OnHoverOut : function() {
return this._onHoverOut ? this._onHoverOut.get_json() : null;},
set_OnHoverOut : function(value) {
if (!this._onHoverOut) {
this._onHoverOut = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onHoverOut.initialize();}
this._onHoverOut.set_json(value);this.raisePropertyChanged('OnHoverOut');},
get_OnHoverOutBehavior : function() {
return this._onHoverOut;}
}
AjaxControlToolkit.Animation.AnimationBehavior.registerClass('AjaxControlToolkit.Animation.AnimationBehavior', AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.Animation.GenericAnimationBehavior = function(element) {
AjaxControlToolkit.Animation.GenericAnimationBehavior.initializeBase(this, [element]);this._json = null;this._animation = null;}
AjaxControlToolkit.Animation.GenericAnimationBehavior.prototype = {
dispose : function() {
this.disposeAnimation();AjaxControlToolkit.Animation.GenericAnimationBehavior.callBaseMethod(this, 'dispose');},
disposeAnimation : function() {
if (this._animation) {
this._animation.dispose();}
this._animation = null;},
play : function() {
if (this._animation && !this._animation.get_isPlaying()) {
this.stop();this._animation.play();}
},
stop : function() {
if (this._animation) {
if (this._animation.get_isPlaying()) {
this._animation.stop(true);}
}
},
quit : function() {
if (this._animation) {
if (this._animation.get_isPlaying()) {
this._animation.stop(false);}
}
},
get_json : function() {
return this._json;},
set_json : function(value) {
if (this._json != value) {
this._json = value;this.raisePropertyChanged('json');this.disposeAnimation();var element = this.get_element();if (element) {
this._animation = AjaxControlToolkit.Animation.buildAnimation(this._json, element);if (this._animation) {
this._animation.initialize();}
this.raisePropertyChanged('animation');}
}
},
get_animation : function() {
return this._animation;}
}
AjaxControlToolkit.Animation.GenericAnimationBehavior.registerClass('AjaxControlToolkit.Animation.GenericAnimationBehavior', AjaxControlToolkit.BehaviorBase);
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.PopupBehavior = function(element) {
AjaxControlToolkit.PopupBehavior.initializeBase(this, [element]);this._x = 0;this._y = 0;this._positioningMode = AjaxControlToolkit.PositioningMode.Absolute;this._parentElement = null;this._parentElementID = null;this._moveHandler = null;this._firstPopup = true;this._originalParent = null;this._visible = false;this._onShow = null;this._onShowEndedHandler = null;this._onHide = null;this._onHideEndedHandler = null;}
AjaxControlToolkit.PopupBehavior.prototype = {
initialize : function() {
AjaxControlToolkit.PopupBehavior.callBaseMethod(this, 'initialize');this._hidePopup();this.get_element().style.position = "absolute";this._onShowEndedHandler = Function.createDelegate(this, this._onShowEnded);this._onHideEndedHandler = Function.createDelegate(this, this._onHideEnded);},
dispose : function() {
var element = this.get_element();if (element) {
if (this._visible) {
this.hide();}
if (this._originalParent) {
element.parentNode.removeChild(element);this._originalParent.appendChild(element);this._originalParent = null;}
element._hideWindowedElementsIFrame = null;}
this._parentElement = null;if (this._onShow && this._onShow.get_animation() && this._onShowEndedHandler) {
this._onShow.get_animation().remove_ended(this._onShowEndedHandler);}
this._onShowEndedHandler = null;this._onShow = null;if (this._onHide && this._onHide.get_animation() && this._onHideEndedHandler) {
this._onHide.get_animation().remove_ended(this._onHideEndedHandler);}
this._onHideEndedHandler = null;this._onHide = null;AjaxControlToolkit.PopupBehavior.callBaseMethod(this, 'dispose');},
show : function() {
if (this._visible) {
return;}
var eventArgs = new Sys.CancelEventArgs();this.raiseShowing(eventArgs);if (eventArgs.get_cancel()) {
return;}
this._visible = true;var element = this.get_element();$common.setVisible(element, true);this.setupPopup();if (this._onShow) {
$common.setVisible(element, false);this.onShow();} else {
this.raiseShown(Sys.EventArgs.Empty);}
},
hide : function() {
if (!this._visible) {
return;}
var eventArgs = new Sys.CancelEventArgs();this.raiseHiding(eventArgs);if (eventArgs.get_cancel()) {
return;}
this._visible = false;if (this._onHide) {
this.onHide();} else {
this._hidePopup();this._hideCleanup();}
},
getBounds : function() {
var element = this.get_element();var offsetParent = element.offsetParent || document.documentElement;var diff;var parentBounds;if (this._parentElement) {
parentBounds = $common.getBounds(this._parentElement);var offsetParentLocation = $common.getLocation(offsetParent);diff = {x: parentBounds.x - offsetParentLocation.x, y:parentBounds.y - offsetParentLocation.y};} else {
parentBounds = $common.getBounds(offsetParent);diff = {x:0, y:0};}
var width = element.offsetWidth - (element.clientLeft ? element.clientLeft * 2 : 0);var height = element.offsetHeight - (element.clientTop ? element.clientTop * 2 : 0);if (this._firstpopup) {
element.style.width = width + "px";this._firstpopup = false;}
var position;switch (this._positioningMode) {
case AjaxControlToolkit.PositioningMode.Center:
position = {
x: Math.round(parentBounds.width / 2 - width / 2),
y: Math.round(parentBounds.height / 2 - height / 2)
};break;case AjaxControlToolkit.PositioningMode.BottomLeft:
position = {
x: 0,
y: parentBounds.height
};break;case AjaxControlToolkit.PositioningMode.BottomRight:
position = {
x: parentBounds.width - width,
y: parentBounds.height
};break;case AjaxControlToolkit.PositioningMode.TopLeft:
position = {
x: 0,
y: -element.offsetHeight
};break;case AjaxControlToolkit.PositioningMode.TopRight:
position = {
x: parentBounds.width - width,
y: -element.offsetHeight
};break;case AjaxControlToolkit.PositioningMode.Right:
position = {
x: parentBounds.width,
y: 0
};break;case AjaxControlToolkit.PositioningMode.Left:
position = {
x: -element.offsetWidth,
y: 0
};break;default:
position = {x: 0, y: 0};}
position.x += this._x + diff.x;position.y += this._y + diff.y;return new Sys.UI.Bounds(position.x, position.y, width, height);},
adjustPopupPosition : function(bounds) {
var element = this.get_element();if (!bounds) {
bounds = this.getBounds();}
var newPosition = $common.getBounds(element);var updateNeeded = false;if (newPosition.x < 0) {
bounds.x -= newPosition.x;updateNeeded = true;}
if (newPosition.y < 0) {
bounds.y -= newPosition.y;updateNeeded = true;}
if (updateNeeded) {
$common.setLocation(element, bounds);}
},
addBackgroundIFrame : function() {
var element = this.get_element();if ((Sys.Browser.agent === Sys.Browser.InternetExplorer) && (Sys.Browser.version < 7)) {
var childFrame = element._hideWindowedElementsIFrame;if (!childFrame) {
childFrame = document.createElement("iframe");childFrame.src = "javascript:'<html></html>';";childFrame.style.position = "absolute";childFrame.style.display = "none";childFrame.scrolling = "no";childFrame.frameBorder = "0";childFrame.tabIndex = "-1";childFrame.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";element.parentNode.insertBefore(childFrame, element);element._hideWindowedElementsIFrame = childFrame;this._moveHandler = Function.createDelegate(this, this._onMove);Sys.UI.DomEvent.addHandler(element, "move", this._moveHandler);}
$common.setBounds(childFrame, $common.getBounds(element));childFrame.style.display = element.style.display;if (element.currentStyle && element.currentStyle.zIndex) {
childFrame.style.zIndex = element.currentStyle.zIndex;} else if (element.style.zIndex) {
childFrame.style.zIndex = element.style.zIndex;}
}
},
setupPopup : function() {
var element = this.get_element();var bounds = this.getBounds();$common.setLocation(element, bounds);this.adjustPopupPosition(bounds);element.zIndex = 1000;this.addBackgroundIFrame();},
_hidePopup : function() {
var element = this.get_element();$common.setVisible(element, false);if (element.originalWidth) {
element.style.width = element.originalWidth + "px";element.originalWidth = null;}
},
_hideCleanup : function() {
var element = this.get_element();if (this._moveHandler) {
Sys.UI.DomEvent.removeHandler(element, "move", this._moveHandler);this._moveHandler = null;}
if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
var childFrame = element._hideWindowedElementsIFrame;if (childFrame) {
childFrame.style.display = "none";}
}
this.raiseHidden(Sys.EventArgs.Empty);},
_onMove : function() {
var element = this.get_element();if (element._hideWindowedElementsIFrame) {
element.parentNode.insertBefore(element._hideWindowedElementsIFrame, element);element._hideWindowedElementsIFrame.style.top = element.style.top;element._hideWindowedElementsIFrame.style.left = element.style.left;}
},
get_onShow : function() {
return this._onShow ? this._onShow.get_json() : null;},
set_onShow : function(value) {
if (!this._onShow) {
this._onShow = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onShow.initialize();}
this._onShow.set_json(value);var animation = this._onShow.get_animation();if (animation) {
animation.add_ended(this._onShowEndedHandler);}
this.raisePropertyChanged('onShow');},
get_onShowBehavior : function() {
return this._onShow;},
onShow : function() {
if (this._onShow) {
if (this._onHide) {
this._onHide.quit();}
this._onShow.play();}
},
_onShowEnded : function() {
this.adjustPopupPosition();this.addBackgroundIFrame();this.raiseShown(Sys.EventArgs.Empty);},
get_onHide : function() {
return this._onHide ? this._onHide.get_json() : null;},
set_onHide : function(value) {
if (!this._onHide) {
this._onHide = new AjaxControlToolkit.Animation.GenericAnimationBehavior(this.get_element());this._onHide.initialize();}
this._onHide.set_json(value);var animation = this._onHide.get_animation();if (animation) {
animation.add_ended(this._onHideEndedHandler);}
this.raisePropertyChanged('onHide');},
get_onHideBehavior : function() {
return this._onHide;},
onHide : function() {
if (this._onHide) {
if (this._onShow) {
this._onShow.quit();}
this._onHide.play();}
},
_onHideEnded : function() {
this._hideCleanup();},
get_parentElement : function() {
if (!this._parentElement && this._parentElementID) {
this.set_parentElement($get(this._parentElementID));Sys.Debug.assert(this._parentElement != null, String.format(AjaxControlToolkit.Resources.PopupExtender_NoParentElement, this._parentElementID));} 
return this._parentElement;},
set_parentElement : function(element) {
this._parentElement = element;this.raisePropertyChanged('parentElement');},
get_parentElementID : function() {
if (this._parentElement) {
return this._parentElement.id
}
return this._parentElementID;},
set_parentElementID : function(elementID) {
this._parentElementID = elementID;if (this.get_isInitialized()) {
this.set_parentElement($get(elementID));}
},
get_positioningMode : function() {
return this._positioningMode;},
set_positioningMode : function(mode) {
this._positioningMode = mode;this.raisePropertyChanged('positioningMode');},
get_x : function() {
return this._x;},
set_x : function(value) {
if (value != this._x) {
this._x = value;if (this._visible) {
this.setupPopup();}
this.raisePropertyChanged('x');}
},
get_y : function() {
return this._y;},
set_y : function(value) {
if (value != this._y) {
this._y = value;if (this._visible) {
this.setupPopup();}
this.raisePropertyChanged('y');}
},
get_visible : function() {
return this._visible;},
add_showing : function(handler) {
this.get_events().addHandler('showing', handler);},
remove_showing : function(handler) {
this.get_events().removeHandler('showing', handler);},
raiseShowing : function(eventArgs) {
var handler = this.get_events().getHandler('showing');if (handler) {
handler(this, eventArgs);}
},
add_shown : function(handler) {
this.get_events().addHandler('shown', handler);},
remove_shown : function(handler) {
this.get_events().removeHandler('shown', handler);},
raiseShown : function(eventArgs) {
var handler = this.get_events().getHandler('shown');if (handler) {
handler(this, eventArgs);}
}, 
add_hiding : function(handler) {
this.get_events().addHandler('hiding', handler);},
remove_hiding : function(handler) {
this.get_events().removeHandler('hiding', handler);},
raiseHiding : function(eventArgs) {
var handler = this.get_events().getHandler('hiding');if (handler) {
handler(this, eventArgs);}
},
add_hidden : function(handler) {
this.get_events().addHandler('hidden', handler);},
remove_hidden : function(handler) {
this.get_events().removeHandler('hidden', handler);},
raiseHidden : function(eventArgs) {
var handler = this.get_events().getHandler('hidden');if (handler) {
handler(this, eventArgs);}
}
}
AjaxControlToolkit.PopupBehavior.registerClass('AjaxControlToolkit.PopupBehavior', AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.PositioningMode = function() {
throw Error.invalidOperation();}
AjaxControlToolkit.PositioningMode.prototype = {
Absolute: 0,
Center: 1,
BottomLeft: 2,
BottomRight: 3,
TopLeft: 4,
TopRight: 5,
Right: 6,
Left: 7
}
AjaxControlToolkit.PositioningMode.registerEnum('AjaxControlToolkit.PositioningMode');
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.DeferredOperation = function(delay, context, callback) {
this._delay = delay;this._context = context;this._callback = callback;this._completeCallback = null;this._errorCallback = null;this._timer = null;this._callArgs = null;this._isComplete = false;this._completedSynchronously = false;this._asyncResult = null;this._exception = null;this._throwExceptions = true;this._oncomplete$delegate = Function.createDelegate(this, this._oncomplete);this.post = Function.createDelegate(this, this.post);}
AjaxControlToolkit.DeferredOperation.prototype = {
get_isPending : function() { 
return (this._timer != null);},
get_isComplete : function() { 
return this._isComplete;},
get_completedSynchronously : function() {
return this._completedSynchronously;},
get_exception : function() {
return this._exception;},
get_throwExceptions : function() {
return this._throwExceptions;}, 
set_throwExceptions : function(value) {
this._throwExceptions = value;},
get_delay : function() { 
return this._delay;},
set_delay : function(value) { 
this._delay = value;},
post : function(args) {
var ar = [];for (var i = 0;i < arguments.length;i++) {
ar[i] = arguments[i];}
this.beginPost(ar, null, null);},
beginPost : function(args, completeCallback, errorCallback) {
this.cancel();this._callArgs = Array.clone(args || []);this._completeCallback = completeCallback;this._errorCallback = errorCallback;if (this._delay == -1) { 
try {
this._oncomplete();} finally {
this._completedSynchronously = true;}
} else { 
this._timer = setTimeout(this._oncomplete$delegate, this._delay);}
}, 
cancel : function() {
if (this._timer) {
clearTimeout(this._timer);this._timer = null;}
this._callArgs = null;this._isComplete = false;this._asyncResult = null;this._completeCallback = null;this._errorCallback = null;this._exception = null;this._completedSynchronously = false;},
call : function(args) {
var ar = [];for (var i = 0;i < arguments.length;i++) {
ar[i] = arguments[i];}
this.cancel();this._callArgs = ar;this._completeCallback = null;this._errorCallback = null;try {
this._oncomplete();} finally {
this._completedSynchronously = true;}
if (this._exception) {
throw this._exception;}
return this._asyncResult;},
complete : function() {
if (this._timer) {
try {
this._oncomplete();} finally {
this._completedSynchronously = true;}
return this._asyncResult;} else if (this._isComplete) {
return this._asyncResult;}
}, 
_oncomplete : function() {
var args = this._callArgs;var completeCallback = this._completeCallback;var errorCallback = this._errorCallback;this.cancel();try {
if (args) {
this._asyncResult = this._callback.apply(this._context, args);} else {
this._asyncResult = this._callback.call(this._context);}
this._isComplete = true;this._completedSynchronously = false;if (completeCallback) {
completeCallback(this);}
} catch (e) {
this._isComplete = true;this._completedSynchronously = false;this._exception = e;if (errorCallback) {
if (errorCallback(this)) {
return;}
} 
if (this._throwExceptions) {
throw e;}
}
}
}
AjaxControlToolkit.DeferredOperation.registerClass("AjaxControlToolkit.DeferredOperation");
Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.CalendarBehavior = function(element) {
AjaxControlToolkit.CalendarBehavior.initializeBase(this, [element]);this._textbox = AjaxControlToolkit.TextBoxWrapper.get_Wrapper(element);this._format = "d";this._cssClass = "ajax__calendar";this._enabled = true;this._animated = true;this._buttonID = null;this._layoutRequested = 0;this._layoutSuspended = false;this._button = null;this._popupMouseDown = false;this._selectedDate = null;this._visibleDate = null;this._todaysDate = null;this._firstDayOfWeek = AjaxControlToolkit.FirstDayOfWeek.Default;this._container = null;this._popupDiv = null;this._header = null;this._prevArrow = null;this._nextArrow = null;this._title = null;this._body = null;this._today = null;this._days = null;this._daysTable = null;this._daysTableHeader = null;this._daysTableHeaderRow = null;this._daysBody = null;this._months = null;this._monthsTable = null;this._monthsBody = null;this._years = null;this._yearsTable = null;this._yearsBody = null;this._popupPosition = AjaxControlToolkit.CalendarPosition.BottomLeft;this._popupBehavior = null;this._modeChangeAnimation = null;this._modeChangeMoveTopOrLeftAnimation = null;this._modeChangeMoveBottomOrRightAnimation = null;this._mode = "days";this._selectedDateChanging = false;this._isOpen = false;this._isAnimating = false;this._width = 170;this._height = 139;this._modes = {"days" : null, "months" : null, "years" : null};this._modeOrder = {"days" : 0, "months" : 1, "years" : 2 };this._hourOffsetForDst = 12;this._blur = new AjaxControlToolkit.DeferredOperation(1, this, this.blur);this._button$delegates = {
click : Function.createDelegate(this, this._button_onclick),
keypress : Function.createDelegate(this, this._button_onkeypress),
blur : Function.createDelegate(this, this._button_onblur)
}
this._element$delegates = {
change : Function.createDelegate(this, this._element_onchange),
keypress : Function.createDelegate(this, this._element_onkeypress),
click : Function.createDelegate(this, this._element_onclick),
focus : Function.createDelegate(this, this._element_onfocus),
blur : Function.createDelegate(this, this._element_onblur)
}
this._popup$delegates = { 
mousedown: Function.createDelegate(this, this._popup_onmousedown),
mouseup: Function.createDelegate(this, this._popup_onmouseup),
drag: Function.createDelegate(this, this._popup_onevent),
dragstart: Function.createDelegate(this, this._popup_onevent),
select: Function.createDelegate(this, this._popup_onevent)
}
this._cell$delegates = {
mouseover : Function.createDelegate(this, this._cell_onmouseover),
mouseout : Function.createDelegate(this, this._cell_onmouseout),
click : Function.createDelegate(this, this._cell_onclick)
}
}
AjaxControlToolkit.CalendarBehavior.prototype = { 
get_animated : function() {
return this._animated;},
set_animated : function(value) {
if (this._animated != value) {
this._animated = value;this.raisePropertyChanged("animated");}
},
get_enabled : function() {
return this._enabled;},
set_enabled : function(value) {
if (this._enabled != value) {
this._enabled = value;this.raisePropertyChanged("enabled");}
},
get_button : function() {
return this._button;},
set_button : function(value) {
if (this._button != value) {
if (this._button && this.get_isInitialized()) {
$common.removeHandlers(this._button, this._button$delegates);}
this._button = value;if (this._button && this.get_isInitialized()) {
$addHandlers(this._button, this._button$delegates);}
this.raisePropertyChanged("button");}
},
get_popupPosition : function() {
return this._popupPosition;},
set_popupPosition : function(value) {
if (this._popupPosition != value) {
this._popupPosition = value;this.raisePropertyChanged('popupPosition');}
},
get_format : function() { 
return this._format;},
set_format : function(value) { 
if (this._format != value) {
this._format = value;this.raisePropertyChanged("format");}
},
get_selectedDate : function() {
if (this._selectedDate == null) {
var value = this._textbox.get_Value();if (value) {
value = this._parseTextValue(value);if (value) {
this._selectedDate = value.getDateOnly();}
}
}
return this._selectedDate;},
set_selectedDate : function(value) {
if(value && (String.isInstanceOfType(value)) && (value.length != 0)) {
value = new Date(value);}
if (value) value = value.getDateOnly();if (this._selectedDate != value) {
this._selectedDate = value;this._selectedDateChanging = true;var text = "";if (value) {
text = value.localeFormat(this._format);}
if (text != this._textbox.get_Value()) {
this._textbox.set_Value(text);this._fireChanged();}
this._selectedDateChanging = false;this.invalidate();this.raisePropertyChanged("selectedDate");}
},
get_visibleDate : function() {
return this._visibleDate;},
set_visibleDate : function(value) {
if (value) value = value.getDateOnly();if (this._visibleDate != value) {
this._switchMonth(value, !this._isOpen);this.raisePropertyChanged("visibleDate");}
},
get_isOpen : function() {
return this._isOpen;},
get_todaysDate : function() {
if (this._todaysDate != null) {
return this._todaysDate;}
return new Date().getDateOnly();},
set_todaysDate : function(value) {
if (value) value = value.getDateOnly();if (this._todaysDate != value) {
this._todaysDate = value;this.invalidate();this.raisePropertyChanged("todaysDate");}
},
get_firstDayOfWeek : function() {
return this._firstDayOfWeek;},
set_firstDayOfWeek : function(value) {
if (this._firstDayOfWeek != value) {
this._firstDayOfWeek = value;this.invalidate();this.raisePropertyChanged("firstDayOfWeek");}
},
get_cssClass : function() {
return this._cssClass;},
set_cssClass : function(value) {
if (this._cssClass != value) {
if (this._cssClass && this.get_isInitialized()) {
Sys.UI.DomElement.removeCssClass(this._container, this._cssClass);}
this._cssClass = value;if (this._cssClass && this.get_isInitialized()) {
Sys.UI.DomElement.addCssClass(this._container, this._cssClass);}
this.raisePropertyChanged("cssClass");}
},
get_todayButton : function() {
return this._today;},
get_dayCell : function(row, col) {
if (this._daysBody) {
return this._daysBody.rows[row].cells[col].firstChild;}
return null;},
add_showing : function(handler) {
this.get_events().addHandler("showing", handler);},
remove_showing : function(handler) {
this.get_events().removeHandler("showing", handler);},
raiseShowing : function(eventArgs) {
var handler = this.get_events().getHandler('showing');if (handler) {
handler(this, eventArgs);}
},
add_shown : function(handler) {
this.get_events().addHandler("shown", handler);},
remove_shown : function(handler) {
this.get_events().removeHandler("shown", handler);},
raiseShown : function() {
var handlers = this.get_events().getHandler("shown");if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_hiding : function(handler) {
this.get_events().addHandler("hiding", handler);},
remove_hiding : function(handler) {
this.get_events().removeHandler("hiding", handler);},
raiseHiding : function(eventArgs) {
var handler = this.get_events().getHandler('hiding');if (handler) {
handler(this, eventArgs);}
},
add_hidden : function(handler) {
this.get_events().addHandler("hidden", handler);},
remove_hidden : function(handler) {
this.get_events().removeHandler("hidden", handler);},
raiseHidden : function() {
var handlers = this.get_events().getHandler("hidden");if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_dateSelectionChanged : function(handler) {
this.get_events().addHandler("dateSelectionChanged", handler);},
remove_dateSelectionChanged : function(handler) {
this.get_events().removeHandler("dateSelectionChanged", handler);},
raiseDateSelectionChanged : function() {
var handlers = this.get_events().getHandler("dateSelectionChanged");if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
initialize : function() {
AjaxControlToolkit.CalendarBehavior.callBaseMethod(this, "initialize");var elt = this.get_element();$addHandlers(elt, this._element$delegates);if (this._button) {
$addHandlers(this._button, this._button$delegates);}
this._modeChangeMoveTopOrLeftAnimation = new AjaxControlToolkit.Animation.LengthAnimation(null, null, null, "style", null, 0, 0, "px");this._modeChangeMoveBottomOrRightAnimation = new AjaxControlToolkit.Animation.LengthAnimation(null, null, null, "style", null, 0, 0, "px");this._modeChangeAnimation = new AjaxControlToolkit.Animation.ParallelAnimation(null, .25, null, [ this._modeChangeMoveTopOrLeftAnimation, this._modeChangeMoveBottomOrRightAnimation ]);var value = this.get_selectedDate();if (value) {
this.set_selectedDate(value);} 
},
dispose : function() {
if (this._popupBehavior) {
this._popupBehavior.dispose();this._popupBehavior = null;}
this._modes = null;this._modeOrder = null;if (this._modeChangeMoveTopOrLeftAnimation) {
this._modeChangeMoveTopOrLeftAnimation.dispose();this._modeChangeMoveTopOrLeftAnimation = null;}
if (this._modeChangeMoveBottomOrRightAnimation) {
this._modeChangeMoveBottomOrRightAnimation.dispose();this._modeChangeMoveBottomOrRightAnimation = null;}
if (this._modeChangeAnimation) {
this._modeChangeAnimation.dispose();this._modeChangeAnimation = null;}
if (this._container) {
if(this._container.parentNode) { 
this._container.parentNode.removeChild(this._container);}
this._container = null;}
if (this._popupDiv) {
$common.removeHandlers(this._popupDiv, this._popup$delegates);this._popupDiv = null;} 
if (this._prevArrow) {
$common.removeHandlers(this._prevArrow, this._cell$delegates);this._prevArrow = null;}
if (this._nextArrow) {
$common.removeHandlers(this._nextArrow, this._cell$delegates);this._nextArrow = null;}
if (this._title) {
$common.removeHandlers(this._title, this._cell$delegates);this._title = null;}
if (this._today) {
$common.removeHandlers(this._today, this._cell$delegates);this._today = null;}
if (this._button) {
$common.removeHandlers(this._button, this._button$delegates);this._button = null;}
if (this._daysBody) {
for (var i = 0;i < this._daysBody.rows.length;i++) {
var row = this._daysBody.rows[i];for (var j = 0;j < row.cells.length;j++) {
$common.removeHandlers(row.cells[j].firstChild, this._cell$delegates);}
}
this._daysBody = null;}
if (this._monthsBody) {
for (var i = 0;i < this._monthsBody.rows.length;i++) {
var row = this._monthsBody.rows[i];for (var j = 0;j < row.cells.length;j++) {
$common.removeHandlers(row.cells[j].firstChild, this._cell$delegates);}
}
this._monthsBody = null;}
if (this._yearsBody) {
for (var i = 0;i < this._yearsBody.rows.length;i++) {
var row = this._yearsBody.rows[i];for (var j = 0;j < row.cells.length;j++) {
$common.removeHandlers(row.cells[j].firstChild, this._cell$delegates);}
}
this._yearsBody = null;} 
var elt = this.get_element();$common.removeHandlers(elt, this._element$delegates);AjaxControlToolkit.CalendarBehavior.callBaseMethod(this, "dispose");},
show : function() {
this._ensureCalendar();if (!this._isOpen) {
var eventArgs = new Sys.CancelEventArgs();this.raiseShowing(eventArgs);if (eventArgs.get_cancel()) {
return;}
this._isOpen = true;this._switchMonth(null, true);this._popupBehavior.show();this.raiseShown();}
}, 
hide : function() {
if (this._isOpen) {
var eventArgs = new Sys.CancelEventArgs();this.raiseHiding(eventArgs);if (eventArgs.get_cancel()) {
return;}
if (this._container) {
this._popupBehavior.hide();this._switchMode("days", true);}
this._isOpen = false;this.raiseHidden();this._popupMouseDown = false;}
},
focus : function() {
if (this._button) {
this._button.focus();} else {
this.get_element().focus();}
},
blur : function(force) {
if (!force && Sys.Browser.agent === Sys.Browser.Opera) {
this._blur.post(true);} else {
if (!this._popupMouseDown) {
this.hide();} 
this._popupMouseDown = false;}
},
suspendLayout : function() {
this._layoutSuspended++;},
resumeLayout : function() {
this._layoutSuspended--;if (this._layoutSuspended <= 0) {
this._layoutSuspended = 0;if (this._layoutRequested) {
this._performLayout();}
}
},
invalidate : function() {
if (this._layoutSuspended > 0) {
this._layoutRequested = true;} else {
this._performLayout();}
},
_buildCalendar : function() {
var elt = this.get_element();var id = this.get_id();this._container = $common.createElementFromTemplate({
nodeName : "div",
properties : { id : id + "_container" },
cssClasses : [this._cssClass]
}, elt.parentNode);this._popupDiv = $common.createElementFromTemplate({ 
nodeName : "div",
events : this._popup$delegates, 
properties : {
id : id + "_popupDiv"
},
cssClasses : ["ajax__calendar_container"], 
visible : false 
}, this._container);},
_buildHeader : function() {
var id = this.get_id();this._header = $common.createElementFromTemplate({ 
nodeName : "div",
properties : { id : id + "_header" },
cssClasses : [ "ajax__calendar_header" ]
}, this._popupDiv);var prevArrowWrapper = $common.createElementFromTemplate({ nodeName : "div" }, this._header);this._prevArrow = $common.createElementFromTemplate({ 
nodeName : "div",
properties : {
id : id + "_prevArrow",
mode : "prev"
},
events : this._cell$delegates,
cssClasses : [ "ajax__calendar_prev" ] 
}, prevArrowWrapper);var nextArrowWrapper = $common.createElementFromTemplate({ nodeName : "div" }, this._header);this._nextArrow = $common.createElementFromTemplate({ 
nodeName : "div",
properties : {
id : id + "_nextArrow",
mode : "next"
},
events : this._cell$delegates, 
cssClasses : [ "ajax__calendar_next" ] 
}, nextArrowWrapper);var titleWrapper = $common.createElementFromTemplate({ nodeName : "div" }, this._header);this._title = $common.createElementFromTemplate({ 
nodeName : "div",
properties : {
id : id + "_title",
mode : "title"
},
events : this._cell$delegates, 
cssClasses : [ "ajax__calendar_title" ] 
}, titleWrapper);},
_buildBody : function() {
this._body = $common.createElementFromTemplate({ 
nodeName : "div",
properties : { id : this.get_id() + "_body" },
cssClasses : [ "ajax__calendar_body" ]
}, this._popupDiv);this._buildDays();this._buildMonths();this._buildYears();},
_buildFooter : function() {
var todayWrapper = $common.createElementFromTemplate({ nodeName : "div" }, this._popupDiv);this._today = $common.createElementFromTemplate({
nodeName : "div",
properties : {
id : this.get_id() + "_today",
mode : "today"
},
events : this._cell$delegates,
cssClasses : [ "ajax__calendar_footer", "ajax__calendar_today" ]
}, todayWrapper);},
_buildDays : function() {
var dtf = Sys.CultureInfo.CurrentCulture.dateTimeFormat;var id = this.get_id();this._days = $common.createElementFromTemplate({ 
nodeName : "div",
properties : { id : id + "_days" },
cssClasses : [ "ajax__calendar_days" ]
}, this._body);this._modes["days"] = this._days;this._daysTable = $common.createElementFromTemplate({ 
nodeName : "table",
properties : {
id : id + "_daysTable",
cellPadding : 0,
cellSpacing : 0,
border : 0,
style : { margin : "auto" }
} 
}, this._days);this._daysTableHeader = $common.createElementFromTemplate({ nodeName : "thead", properties : { id : id + "_daysTableHeader" } }, this._daysTable);this._daysTableHeaderRow = $common.createElementFromTemplate({ nodeName : "tr", properties : { id : id + "_daysTableHeaderRow" } }, this._daysTableHeader);for (var i = 0;i < 7;i++) {
var dayCell = $common.createElementFromTemplate({ nodeName : "td" }, this._daysTableHeaderRow);var dayDiv = $common.createElementFromTemplate({
nodeName : "div",
cssClasses : [ "ajax__calendar_dayname" ]
}, dayCell);}
this._daysBody = $common.createElementFromTemplate({ nodeName: "tbody", properties : { id : id + "_daysBody" } }, this._daysTable);for (var i = 0;i < 6;i++) {
var daysRow = $common.createElementFromTemplate({ nodeName : "tr" }, this._daysBody);for(var j = 0;j < 7;j++) {
var dayCell = $common.createElementFromTemplate({ nodeName : "td" }, daysRow);var dayDiv = $common.createElementFromTemplate({
nodeName : "div",
properties : {
mode : "day",
id : id + "_day_" + i + "_" + j,
innerHTML : "&nbsp;"
},
events : this._cell$delegates,
cssClasses : [ "ajax__calendar_day" ]
}, dayCell);}
}
},
_buildMonths : function() {
var dtf = Sys.CultureInfo.CurrentCulture.dateTimeFormat;var id = this.get_id();this._months = $common.createElementFromTemplate({
nodeName : "div",
properties : { id : id + "_months" },
cssClasses : [ "ajax__calendar_months" ],
visible : false
}, this._body);this._modes["months"] = this._months;this._monthsTable = $common.createElementFromTemplate({
nodeName : "table",
properties : {
id : id + "_monthsTable",
cellPadding : 0,
cellSpacing : 0,
border : 0,
style : { margin : "auto" }
}
}, this._months);this._monthsBody = $common.createElementFromTemplate({ nodeName : "tbody", properties : { id : id + "_monthsBody" } }, this._monthsTable);for (var i = 0;i < 3;i++) {
var monthsRow = $common.createElementFromTemplate({ nodeName : "tr" }, this._monthsBody);for (var j = 0;j < 4;j++) {
var monthCell = $common.createElementFromTemplate({ nodeName : "td" }, monthsRow);var monthDiv = $common.createElementFromTemplate({
nodeName : "div",
properties : {
id : id + "_month_" + i + "_" + j,
mode : "month",
month : (i * 4) + j,
innerHTML : "<br />" + dtf.AbbreviatedMonthNames[(i * 4) + j]
},
events : this._cell$delegates,
cssClasses : [ "ajax__calendar_month" ]
}, monthCell);}
}
},
_buildYears : function() {
var id = this.get_id();this._years = $common.createElementFromTemplate({
nodeName : "div",
properties : { id : id + "_years" },
cssClasses : [ "ajax__calendar_years" ],
visible : false
}, this._body);this._modes["years"] = this._years;this._yearsTable = $common.createElementFromTemplate({
nodeName : "table",
properties : {
id : id + "_yearsTable",
cellPadding : 0,
cellSpacing : 0,
border : 0,
style : { margin : "auto" }
}
}, this._years);this._yearsBody = $common.createElementFromTemplate({ nodeName : "tbody", properties : { id : id + "_yearsBody" } }, this._yearsTable);for (var i = 0;i < 3;i++) {
var yearsRow = $common.createElementFromTemplate({ nodeName : "tr" }, this._yearsBody);for (var j = 0;j < 4;j++) {
var yearCell = $common.createElementFromTemplate({ nodeName : "td" }, yearsRow);var yearDiv = $common.createElementFromTemplate({ 
nodeName : "div", 
properties : { 
id : id + "_year_" + i + "_" + j,
mode : "year",
year : ((i * 4) + j) - 1
},
events : this._cell$delegates,
cssClasses : [ "ajax__calendar_year" ]
}, yearCell);}
}
},
_performLayout : function() {
var elt = this.get_element();if (!elt) return;if (!this.get_isInitialized()) return;if (!this._isOpen) return;var dtf = Sys.CultureInfo.CurrentCulture.dateTimeFormat;var selectedDate = this.get_selectedDate();var visibleDate = this._getEffectiveVisibleDate();var todaysDate = this.get_todaysDate();switch (this._mode) {
case "days":
var firstDayOfWeek = this._getFirstDayOfWeek();var daysToBacktrack = visibleDate.getDay() - firstDayOfWeek;if (daysToBacktrack <= 0)
daysToBacktrack += 7;var startDate = new Date(visibleDate.getFullYear(), visibleDate.getMonth(), visibleDate.getDate() - daysToBacktrack, this._hourOffsetForDst);var currentDate = startDate;for (var i = 0;i < 7;i++) {
var dayCell = this._daysTableHeaderRow.cells[i].firstChild;if (dayCell.firstChild) {
dayCell.removeChild(dayCell.firstChild);}
dayCell.appendChild(document.createTextNode(dtf.ShortestDayNames[(i + firstDayOfWeek) % 7]));}
for (var week = 0;week < 6;week ++) {
var weekRow = this._daysBody.rows[week];for (var dayOfWeek = 0;dayOfWeek < 7;dayOfWeek++) {
var dayCell = weekRow.cells[dayOfWeek].firstChild;if (dayCell.firstChild) {
dayCell.removeChild(dayCell.firstChild);}
dayCell.appendChild(document.createTextNode(currentDate.getDate()));dayCell.title = currentDate.localeFormat("D");dayCell.date = currentDate;$common.removeCssClasses(dayCell.parentNode, [ "ajax__calendar_other", "ajax__calendar_active" ]);Sys.UI.DomElement.addCssClass(dayCell.parentNode, this._getCssClass(dayCell.date, 'd'));currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate() + 1, this._hourOffsetForDst);}
}
this._prevArrow.date = new Date(visibleDate.getFullYear(), visibleDate.getMonth() - 1, 1, this._hourOffsetForDst);this._nextArrow.date = new Date(visibleDate.getFullYear(), visibleDate.getMonth() + 1, 1, this._hourOffsetForDst);if (this._title.firstChild) {
this._title.removeChild(this._title.firstChild);}
this._title.appendChild(document.createTextNode(visibleDate.localeFormat("MMMM, yyyy")));this._title.date = visibleDate;break;case "months":
for (var i = 0;i < this._monthsBody.rows.length;i++) {
var row = this._monthsBody.rows[i];for (var j = 0;j < row.cells.length;j++) {
var cell = row.cells[j].firstChild;cell.date = new Date(visibleDate.getFullYear(), cell.month, 1, this._hourOffsetForDst);cell.title = cell.date.localeFormat("Y");$common.removeCssClasses(cell.parentNode, [ "ajax__calendar_other", "ajax__calendar_active" ]);Sys.UI.DomElement.addCssClass(cell.parentNode, this._getCssClass(cell.date, 'M'));}
}
if (this._title.firstChild) {
this._title.removeChild(this._title.firstChild);}
this._title.appendChild(document.createTextNode(visibleDate.localeFormat("yyyy")));this._title.date = visibleDate;this._prevArrow.date = new Date(visibleDate.getFullYear() - 1, 0, 1, this._hourOffsetForDst);this._nextArrow.date = new Date(visibleDate.getFullYear() + 1, 0, 1, this._hourOffsetForDst);break;case "years":
var minYear = (Math.floor(visibleDate.getFullYear() / 10) * 10);for (var i = 0;i < this._yearsBody.rows.length;i++) {
var row = this._yearsBody.rows[i];for (var j = 0;j < row.cells.length;j++) {
var cell = row.cells[j].firstChild;cell.date = new Date(minYear + cell.year, 0, 1, this._hourOffsetForDst);if (cell.firstChild) {
cell.removeChild(cell.lastChild);} else {
cell.appendChild(document.createElement("br"));}
cell.appendChild(document.createTextNode(minYear + cell.year));$common.removeCssClasses(cell.parentNode, [ "ajax__calendar_other", "ajax__calendar_active" ]);Sys.UI.DomElement.addCssClass(cell.parentNode, this._getCssClass(cell.date, 'y'));}
}
if (this._title.firstChild) {
this._title.removeChild(this._title.firstChild);}
this._title.appendChild(document.createTextNode(minYear.toString() + "-" + (minYear + 9).toString()));this._title.date = visibleDate;this._prevArrow.date = new Date(minYear - 10, 0, 1, this._hourOffsetForDst);this._nextArrow.date = new Date(minYear + 10, 0, 1, this._hourOffsetForDst);break;}
if (this._today.firstChild) {
this._today.removeChild(this._today.firstChild);}
this._today.appendChild(document.createTextNode(String.format(AjaxControlToolkit.Resources.Calendar_Today, todaysDate.localeFormat("MMMM d, yyyy"))));this._today.date = todaysDate;},
_ensureCalendar : function() {
if (!this._container) {
var elt = this.get_element();this._buildCalendar();this._buildHeader();this._buildBody();this._buildFooter();this._popupBehavior = new $create(AjaxControlToolkit.PopupBehavior, { parentElement : elt }, {}, {}, this._popupDiv);if (this._popupPosition == AjaxControlToolkit.CalendarPosition.TopLeft) {
this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.TopLeft);} else if (this._popupPosition == AjaxControlToolkit.CalendarPosition.TopRight) {
this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.TopRight);} else if (this._popupPosition == AjaxControlToolkit.CalendarPosition.BottomRight) {
this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.BottomRight);} else if (this._popupPosition == AjaxControlToolkit.CalendarPosition.Right) {
this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.Right);} else if (this._popupPosition == AjaxControlToolkit.CalendarPosition.Left) {
this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.Left);} else {
this._popupBehavior.set_positioningMode(AjaxControlToolkit.PositioningMode.BottomLeft);}
}
},
_fireChanged : function() {
var elt = this.get_element();if (document.createEventObject) {
elt.fireEvent("onchange");} else if (document.createEvent) {
var e = document.createEvent("HTMLEvents");e.initEvent("change", true, true);elt.dispatchEvent(e);}
},
_switchMonth : function(date, dontAnimate) {
if (this._isAnimating) {
return;}
var visibleDate = this._getEffectiveVisibleDate();if ((date && date.getFullYear() == visibleDate.getFullYear() && date.getMonth() == visibleDate.getMonth())) {
dontAnimate = true;}
if (this._animated && !dontAnimate) {
this._isAnimating = true;var newElement = this._modes[this._mode];var oldElement = newElement.cloneNode(true);this._body.appendChild(oldElement);if (visibleDate > date) {
$common.setLocation(newElement, {x:-162,y:0});$common.setVisible(newElement, true);this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("left");this._modeChangeMoveTopOrLeftAnimation.set_target(newElement);this._modeChangeMoveTopOrLeftAnimation.set_startValue(-this._width);this._modeChangeMoveTopOrLeftAnimation.set_endValue(0);$common.setLocation(oldElement, {x:0,y:0});$common.setVisible(oldElement, true);this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("left");this._modeChangeMoveBottomOrRightAnimation.set_target(oldElement);this._modeChangeMoveBottomOrRightAnimation.set_startValue(0);this._modeChangeMoveBottomOrRightAnimation.set_endValue(this._width);} else {
$common.setLocation(oldElement, {x:0,y:0});$common.setVisible(oldElement, true);this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("left");this._modeChangeMoveTopOrLeftAnimation.set_target(oldElement);this._modeChangeMoveTopOrLeftAnimation.set_endValue(-this._width);this._modeChangeMoveTopOrLeftAnimation.set_startValue(0);$common.setLocation(newElement, {x:162,y:0});$common.setVisible(newElement, true);this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("left");this._modeChangeMoveBottomOrRightAnimation.set_target(newElement);this._modeChangeMoveBottomOrRightAnimation.set_endValue(0);this._modeChangeMoveBottomOrRightAnimation.set_startValue(this._width);}
this._visibleDate = date;this.invalidate();var endHandler = Function.createDelegate(this, function() { 
this._body.removeChild(oldElement);oldElement = null;this._isAnimating = false;this._modeChangeAnimation.remove_ended(endHandler);});this._modeChangeAnimation.add_ended(endHandler);this._modeChangeAnimation.play();} else {
this._visibleDate = date;this.invalidate();}
},
_switchMode : function(mode, dontAnimate) {
if (this._isAnimating || (this._mode == mode)) {
return;}
var moveDown = this._modeOrder[this._mode] < this._modeOrder[mode];var oldElement = this._modes[this._mode];var newElement = this._modes[mode];this._mode = mode;if (this._animated && !dontAnimate) { 
this._isAnimating = true;this.invalidate();if (moveDown) {
$common.setLocation(newElement, {x:0,y:-this._height});$common.setVisible(newElement, true);this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("top");this._modeChangeMoveTopOrLeftAnimation.set_target(newElement);this._modeChangeMoveTopOrLeftAnimation.set_startValue(-this._height);this._modeChangeMoveTopOrLeftAnimation.set_endValue(0);$common.setLocation(oldElement, {x:0,y:0});$common.setVisible(oldElement, true);this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("top");this._modeChangeMoveBottomOrRightAnimation.set_target(oldElement);this._modeChangeMoveBottomOrRightAnimation.set_startValue(0);this._modeChangeMoveBottomOrRightAnimation.set_endValue(this._height);} else {
$common.setLocation(oldElement, {x:0,y:0});$common.setVisible(oldElement, true);this._modeChangeMoveTopOrLeftAnimation.set_propertyKey("top");this._modeChangeMoveTopOrLeftAnimation.set_target(oldElement);this._modeChangeMoveTopOrLeftAnimation.set_endValue(-this._height);this._modeChangeMoveTopOrLeftAnimation.set_startValue(0);$common.setLocation(newElement, {x:0,y:139});$common.setVisible(newElement, true);this._modeChangeMoveBottomOrRightAnimation.set_propertyKey("top");this._modeChangeMoveBottomOrRightAnimation.set_target(newElement);this._modeChangeMoveBottomOrRightAnimation.set_endValue(0);this._modeChangeMoveBottomOrRightAnimation.set_startValue(this._height);}
var endHandler = Function.createDelegate(this, function() { 
this._isAnimating = false;this._modeChangeAnimation.remove_ended(endHandler);});this._modeChangeAnimation.add_ended(endHandler);this._modeChangeAnimation.play();} else {
this._mode = mode;$common.setVisible(oldElement, false);this.invalidate();$common.setVisible(newElement, true);$common.setLocation(newElement, {x:0,y:0});}
},
_isSelected : function(date, part) {
var value = this.get_selectedDate();if (!value) return false;switch (part) {
case 'd':
if (date.getDate() != value.getDate()) return false;case 'M':
if (date.getMonth() != value.getMonth()) return false;case 'y':
if (date.getFullYear() != value.getFullYear()) return false;break;}
return true;},
_isOther : function(date, part) {
var value = this._getEffectiveVisibleDate();switch (part) {
case 'd': 
return (date.getFullYear() != value.getFullYear() || date.getMonth() != value.getMonth());case 'M': 
return false;case 'y': 
var minYear = (Math.floor(value.getFullYear() / 10) * 10);return date.getFullYear() < minYear || (minYear + 10) <= date.getFullYear();}
return false;},
_getCssClass : function(date, part) {
if (this._isSelected(date, part)) {
return "ajax__calendar_active";} else if (this._isOther(date, part)) {
return "ajax__calendar_other";} else {
return "";}
},
_getEffectiveVisibleDate : function() {
var value = this.get_visibleDate();if (value == null) 
value = this.get_selectedDate();if (value == null)
value = this.get_todaysDate();return new Date(value.getFullYear(), value.getMonth(), 1, this._hourOffsetForDst);},
_getFirstDayOfWeek : function() {
if (this.get_firstDayOfWeek() != AjaxControlToolkit.FirstDayOfWeek.Default) {
return this.get_firstDayOfWeek();}
return Sys.CultureInfo.CurrentCulture.dateTimeFormat.FirstDayOfWeek;},
_parseTextValue : function(text) {
var value = null;if(text) {
value = Date.parseLocale(text, this.get_format());}
if(isNaN(value)) {
value = null;}
return value;},
_element_onfocus : function(e) {
if (!this._enabled) return;if (!this._button) {
this.show();this._popupMouseDown = false;}
},
_element_onblur : function(e) {
if (!this._enabled) return;if (!this._button) {
this.blur();}
},
_element_onchange : function(e) {
if (!this._selectedDateChanging) {
var value = this._parseTextValue(this._textbox.get_Value());if (value) value = value.getDateOnly();this._selectedDate = value;if (this._isOpen) {
this._switchMonth(this._selectedDate, this._selectedDate == null);} 
}
},
_element_onkeypress : function(e) {
if (!this._enabled) return;if (!this._button && e.charCode == Sys.UI.Key.esc) {
e.stopPropagation();e.preventDefault();this.hide();}
},
_element_onclick : function(e) {
if (!this._enabled) return;if (!this._button) {
this.show();this._popupMouseDown = false;}
},
_popup_onevent : function(e) {
e.stopPropagation();e.preventDefault();},
_popup_onmousedown : function(e) {
this._popupMouseDown = true;},
_popup_onmouseup : function(e) {
if (Sys.Browser.agent === Sys.Browser.Opera && this._blur.get_isPending()) {
this._blur.cancel();}
this._popupMouseDown = false;this.focus();},
_cell_onmouseover : function(e) {
e.stopPropagation();if (Sys.Browser.agent === Sys.Browser.Safari) {
for (var i = 0;i < this._daysBody.rows.length;i++) {
var row = this._daysBody.rows[i];for (var j = 0;j < row.cells.length;j++) {
Sys.UI.DomElement.removeCssClass(row.cells[j].firstChild.parentNode, "ajax__calendar_hover");}
}
}
var target = e.target;Sys.UI.DomElement.addCssClass(target.parentNode, "ajax__calendar_hover");},
_cell_onmouseout : function(e) {
e.stopPropagation();var target = e.target;Sys.UI.DomElement.removeCssClass(target.parentNode, "ajax__calendar_hover");},
_cell_onclick : function(e) {
e.stopPropagation();e.preventDefault();if (!this._enabled) return;var target = e.target;var visibleDate = this._getEffectiveVisibleDate();Sys.UI.DomElement.removeCssClass(target.parentNode, "ajax__calendar_hover");switch(target.mode) {
case "prev":
case "next":
this._switchMonth(target.date);break;case "title":
switch (this._mode) {
case "days": this._switchMode("months");break;case "months": this._switchMode("years");break;}
break;case "month":
if (target.month == visibleDate.getMonth()) {
this._switchMode("days");} else {
this._visibleDate = target.date;this._switchMode("days");}
break;case "year":
if (target.date.getFullYear() == visibleDate.getFullYear()) {
this._switchMode("months");} else {
this._visibleDate = target.date;this._switchMode("months");}
break;case "day":
this.set_selectedDate(target.date);this._switchMonth(target.date);this._blur.post(true);this.raiseDateSelectionChanged();break;case "today":
this.set_selectedDate(target.date);this._switchMonth(target.date);this._blur.post(true);this.raiseDateSelectionChanged();break;}
},
_button_onclick : function(e) {
e.preventDefault();e.stopPropagation();if (!this._enabled) return;if (!this._isOpen) {
this.show();} else {
this.hide();}
this.focus();this._popupMouseDown = false;},
_button_onblur : function(e) {
if (!this._enabled) return;if (!this._popupMouseDown) {
this.hide();}
this._popupMouseDown = false;},
_button_onkeypress : function(e) {
if (!this._enabled) return;if (e.charCode == Sys.UI.Key.esc) {
e.stopPropagation();e.preventDefault();this.hide();}
this._popupMouseDown = false;}
}
AjaxControlToolkit.CalendarBehavior.registerClass("AjaxControlToolkit.CalendarBehavior", AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.CalendarPosition = function() {
throw Error.invalidOperation();}
AjaxControlToolkit.CalendarPosition.prototype = {
BottomLeft: 0,
BottomRight: 1,
TopLeft: 2,
TopRight: 3,
Right: 4,
Left: 5
}
AjaxControlToolkit.CalendarPosition.registerEnum('AjaxControlToolkit.CalendarPosition');
/////////////////////////////////////////////////////////////////////////////
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.IDragSource = function() {
}
AjaxControlToolkit.IDragSource.prototype = {
get_dragDataType: function() { throw Error.notImplemented();},
getDragData: function() { throw Error.notImplemented();},
get_dragMode: function() { throw Error.notImplemented();},
onDragStart: function() { throw Error.notImplemented();},
onDrag: function() { throw Error.notImplemented();},
onDragEnd: function() { throw Error.notImplemented();}
}
AjaxControlToolkit.IDragSource.registerInterface('AjaxControlToolkit.IDragSource');/////////////////////////////////////////////////////////////////////////////
AjaxControlToolkit.IDropTarget = function() {
}
AjaxControlToolkit.IDropTarget.prototype = {
get_dropTargetElement: function() { throw Error.notImplemented();},
canDrop: function() { throw Error.notImplemented();},
drop: function() { throw Error.notImplemented();},
onDragEnterTarget: function() { throw Error.notImplemented();},
onDragLeaveTarget: function() { throw Error.notImplemented();},
onDragInTarget: function() { throw Error.notImplemented();}
}
AjaxControlToolkit.IDropTarget.registerInterface('AjaxControlToolkit.IDropTarget');/////////////////////////////////////////////
AjaxControlToolkit.DragMode = function() {
throw Error.invalidOperation();}
AjaxControlToolkit.DragMode.prototype = {
Copy: 0,
Move: 1
}
AjaxControlToolkit.DragMode.registerEnum('AjaxControlToolkit.DragMode');//////////////////////////////////////////////////////////////////
AjaxControlToolkit.DragDropEventArgs = function(dragMode, dragDataType, dragData) {
this._dragMode = dragMode;this._dataType = dragDataType;this._data = dragData;}
AjaxControlToolkit.DragDropEventArgs.prototype = {
get_dragMode: function() {
return this._dragMode || null;},
get_dragDataType: function() {
return this._dataType || null;},
get_dragData: function() {
return this._data || null;}
}
AjaxControlToolkit.DragDropEventArgs.registerClass('AjaxControlToolkit.DragDropEventArgs');AjaxControlToolkit._DragDropManager = function() {
this._instance = null;this._events = null;}
AjaxControlToolkit._DragDropManager.prototype = {
add_dragStart: function(handler) {
this.get_events().addHandler('dragStart', handler);},
remove_dragStart: function(handler) {
this.get_events().removeHandler('dragStart', handler);},
get_events: function() {
if (!this._events) {
this._events = new Sys.EventHandlerList();}
return this._events;},
add_dragStop: function(handler) {
this.get_events().addHandler('dragStop', handler);},
remove_dragStop: function(handler) {
this.get_events().removeHandler('dragStop', handler);},
_getInstance: function() {
if (!this._instance) {
if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
this._instance = new AjaxControlToolkit.IEDragDropManager();}
else {
this._instance = new AjaxControlToolkit.GenericDragDropManager();}
this._instance.initialize();this._instance.add_dragStart(Function.createDelegate(this, this._raiseDragStart));this._instance.add_dragStop(Function.createDelegate(this, this._raiseDragStop));}
return this._instance;},
startDragDrop: function(dragSource, dragVisual, context) {
this._getInstance().startDragDrop(dragSource, dragVisual, context);},
registerDropTarget: function(target) {
this._getInstance().registerDropTarget(target);},
unregisterDropTarget: function(target) {
this._getInstance().unregisterDropTarget(target);},
dispose: function() {
delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this);},
_raiseDragStart: function(sender, eventArgs) {
var handler = this.get_events().getHandler('dragStart');if(handler) {
handler(this, eventArgs);}
},
_raiseDragStop: function(sender, eventArgs) {
var handler = this.get_events().getHandler('dragStop');if(handler) {
handler(this, eventArgs);}
}
}
AjaxControlToolkit._DragDropManager.registerClass('AjaxControlToolkit._DragDropManager');AjaxControlToolkit.DragDropManager = new AjaxControlToolkit._DragDropManager();AjaxControlToolkit.IEDragDropManager = function() {
AjaxControlToolkit.IEDragDropManager.initializeBase(this);this._dropTargets = null;this._radius = 10;this._activeDragVisual = null;this._activeContext = null;this._activeDragSource = null;this._underlyingTarget = null;this._oldOffset = null;this._potentialTarget = null;this._isDragging = false;this._mouseUpHandler = null;this._documentMouseMoveHandler = null;this._documentDragOverHandler = null;this._dragStartHandler = null;this._mouseMoveHandler = null;this._dragEnterHandler = null;this._dragLeaveHandler = null;this._dragOverHandler = null;this._dropHandler = null;}
AjaxControlToolkit.IEDragDropManager.prototype = {
add_dragStart : function(handler) {
this.get_events().addHandler("dragStart", handler);},
remove_dragStart : function(handler) {
this.get_events().removeHandler("dragStart", handler);},
add_dragStop : function(handler) {
this.get_events().addHandler("dragStop", handler);},
remove_dragStop : function(handler) {
this.get_events().removeHandler("dragStop", handler);},
initialize : function() {
AjaxControlToolkit.IEDragDropManager.callBaseMethod(this, 'initialize');this._mouseUpHandler = Function.createDelegate(this, this._onMouseUp);this._documentMouseMoveHandler = Function.createDelegate(this, this._onDocumentMouseMove);this._documentDragOverHandler = Function.createDelegate(this, this._onDocumentDragOver);this._dragStartHandler = Function.createDelegate(this, this._onDragStart);this._mouseMoveHandler = Function.createDelegate(this, this._onMouseMove);this._dragEnterHandler = Function.createDelegate(this, this._onDragEnter);this._dragLeaveHandler = Function.createDelegate(this, this._onDragLeave);this._dragOverHandler = Function.createDelegate(this, this._onDragOver);this._dropHandler = Function.createDelegate(this, this._onDrop);},
dispose : function() {
if(this._dropTargets) {
for (var i = 0;i < this._dropTargets;i++) {
this.unregisterDropTarget(this._dropTargets[i]);}
this._dropTargets = null;}
AjaxControlToolkit.IEDragDropManager.callBaseMethod(this, 'dispose');},
startDragDrop : function(dragSource, dragVisual, context) {
var ev = window._event;if (this._isDragging) {
return;}
this._underlyingTarget = null;this._activeDragSource = dragSource;this._activeDragVisual = dragVisual;this._activeContext = context;var mousePosition = { x: ev.clientX, y: ev.clientY };dragVisual.originalPosition = dragVisual.style.position;dragVisual.style.position = "absolute";document._lastPosition = mousePosition;dragVisual.startingPoint = mousePosition;var scrollOffset = this.getScrollOffset(dragVisual,  true);dragVisual.startingPoint = this.addPoints(dragVisual.startingPoint, scrollOffset);if (dragVisual.style.position == "absolute") {
dragVisual.startingPoint = this.subtractPoints(dragVisual.startingPoint, $common.getLocation(dragVisual));}
else {
var left = parseInt(dragVisual.style.left);var top = parseInt(dragVisual.style.top);if (isNaN(left)) left = "0";if (isNaN(top)) top = "0";dragVisual.startingPoint = this.subtractPoints(dragVisual.startingPoint, { x: left, y: top });}
this._prepareForDomChanges();dragSource.onDragStart();var eventArgs = new AjaxControlToolkit.DragDropEventArgs(
dragSource.get_dragMode(),
dragSource.get_dragDataType(),
dragSource.getDragData(context));var handler = this.get_events().getHandler('dragStart');if(handler) handler(this,eventArgs);this._recoverFromDomChanges();this._wireEvents();this._drag( true);},
_stopDragDrop : function(cancelled) {
var ev = window._event;if (this._activeDragSource != null) {
this._unwireEvents();if (!cancelled) {
cancelled = (this._underlyingTarget == null);}
if (!cancelled && this._underlyingTarget != null) {
this._underlyingTarget.drop(this._activeDragSource.get_dragMode(), this._activeDragSource.get_dragDataType(),
this._activeDragSource.getDragData(this._activeContext));}
this._activeDragSource.onDragEnd(cancelled);var handler = this.get_events().getHandler('dragStop');if(handler) handler(this,Sys.EventArgs.Empty);this._activeDragVisual.style.position = this._activeDragVisual.originalPosition;this._activeDragSource = null;this._activeContext = null;this._activeDragVisual = null;this._isDragging = false;this._potentialTarget = null;ev.preventDefault();}
},
_drag : function(isInitialDrag) {
var ev = window._event;var mousePosition = { x: ev.clientX, y: ev.clientY };document._lastPosition = mousePosition;var scrollOffset = this.getScrollOffset(this._activeDragVisual,  true);var position = this.addPoints(this.subtractPoints(mousePosition, this._activeDragVisual.startingPoint), scrollOffset);if (!isInitialDrag && parseInt(this._activeDragVisual.style.left) == position.x && parseInt(this._activeDragVisual.style.top) == position.y) {
return;}
$common.setLocation(this._activeDragVisual, position);this._prepareForDomChanges();this._activeDragSource.onDrag();this._recoverFromDomChanges();this._potentialTarget = this._findPotentialTarget(this._activeDragSource, this._activeDragVisual);var movedToOtherTarget = (this._potentialTarget != this._underlyingTarget || this._potentialTarget == null);if (movedToOtherTarget && this._underlyingTarget != null) {
this._leaveTarget(this._activeDragSource, this._underlyingTarget);}
if (this._potentialTarget != null) {
if (movedToOtherTarget) {
this._underlyingTarget = this._potentialTarget;this._enterTarget(this._activeDragSource, this._underlyingTarget);}
else {
this._moveInTarget(this._activeDragSource, this._underlyingTarget);}
}
else {
this._underlyingTarget = null;}
},
_wireEvents : function() {
$addHandler(document, "mouseup", this._mouseUpHandler);$addHandler(document, "mousemove", this._documentMouseMoveHandler);$addHandler(document.body, "dragover", this._documentDragOverHandler);$addHandler(this._activeDragVisual, "dragstart", this._dragStartHandler);$addHandler(this._activeDragVisual, "dragend", this._mouseUpHandler);$addHandler(this._activeDragVisual, "drag", this._mouseMoveHandler);},
_unwireEvents : function() {
$removeHandler(this._activeDragVisual, "drag", this._mouseMoveHandler);$removeHandler(this._activeDragVisual, "dragend", this._mouseUpHandler);$removeHandler(this._activeDragVisual, "dragstart", this._dragStartHandler);$removeHandler(document.body, "dragover", this._documentDragOverHandler);$removeHandler(document, "mousemove", this._documentMouseMoveHandler);$removeHandler(document, "mouseup", this._mouseUpHandler);},
registerDropTarget : function(dropTarget) {
if (this._dropTargets == null) {
this._dropTargets = [];}
Array.add(this._dropTargets, dropTarget);this._wireDropTargetEvents(dropTarget);},
unregisterDropTarget : function(dropTarget) {
this._unwireDropTargetEvents(dropTarget);if (this._dropTargets) {
Array.remove(this._dropTargets, dropTarget);}
},
_wireDropTargetEvents : function(dropTarget) {
var associatedElement = dropTarget.get_dropTargetElement();associatedElement._dropTarget = dropTarget;$addHandler(associatedElement, "dragenter", this._dragEnterHandler);$addHandler(associatedElement, "dragleave", this._dragLeaveHandler);$addHandler(associatedElement, "dragover", this._dragOverHandler);$addHandler(associatedElement, "drop", this._dropHandler);},
_unwireDropTargetEvents : function(dropTarget) {
var associatedElement = dropTarget.get_dropTargetElement();if(associatedElement._dropTarget)
{
associatedElement._dropTarget = null;$removeHandler(associatedElement, "dragenter", this._dragEnterHandler);$removeHandler(associatedElement, "dragleave", this._dragLeaveHandler);$removeHandler(associatedElement, "dragover", this._dragOverHandler);$removeHandler(associatedElement, "drop", this._dropHandler);}
},
_onDragStart : function(ev) {
window._event = ev;document.selection.empty();var dt = ev.dataTransfer;if(!dt && ev.rawEvent) dt = ev.rawEvent.dataTransfer;var dataType = this._activeDragSource.get_dragDataType().toLowerCase();var data = this._activeDragSource.getDragData(this._activeContext);if (data) {
if (dataType != "text" && dataType != "url") {
dataType = "text";if (data.innerHTML != null) {
data = data.innerHTML;}
}
dt.effectAllowed = "move";dt.setData(dataType, data.toString());}
},
_onMouseUp : function(ev) {
window._event = ev;this._stopDragDrop(false);},
_onDocumentMouseMove : function(ev) {
window._event = ev;this._dragDrop();},
_onDocumentDragOver : function(ev) {
window._event = ev;if(this._potentialTarget) ev.preventDefault();},
_onMouseMove : function(ev) {
window._event = ev;this._drag();},
_onDragEnter : function(ev) {
window._event = ev;if (this._isDragging) {
ev.preventDefault();}
else {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.onDragEnterTarget(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
},
_onDragLeave : function(ev) {
window._event = ev;if (this._isDragging) {
ev.preventDefault();}
else {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.onDragLeaveTarget(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
},
_onDragOver : function(ev) {
window._event = ev;if (this._isDragging) {
ev.preventDefault();}
else {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.onDragInTarget(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
},
_onDrop : function(ev) {
window._event = ev;if (!this._isDragging) {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.drop(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
ev.preventDefault();},
_getDropTarget : function(element) {
while (element) {
if (element._dropTarget != null) {
return element._dropTarget;}
element = element.parentNode;}
return null;},
_dragDrop : function() {
if (this._isDragging) {
return;}
this._isDragging = true;this._activeDragVisual.dragDrop();document.selection.empty();},
_moveInTarget : function(dragSource, dropTarget) {
this._prepareForDomChanges();dropTarget.onDragInTarget(dragSource.get_dragMode(), dragSource.get_dragDataType(), dragSource.getDragData(this._activeContext));this._recoverFromDomChanges();},
_enterTarget : function(dragSource, dropTarget) {
this._prepareForDomChanges();dropTarget.onDragEnterTarget(dragSource.get_dragMode(), dragSource.get_dragDataType(), dragSource.getDragData(this._activeContext));this._recoverFromDomChanges();},
_leaveTarget : function(dragSource, dropTarget) {
this._prepareForDomChanges();dropTarget.onDragLeaveTarget(dragSource.get_dragMode(), dragSource.get_dragDataType(), dragSource.getDragData(this._activeContext));this._recoverFromDomChanges();},
_findPotentialTarget : function(dragSource, dragVisual) {
var ev = window._event;if (this._dropTargets == null) {
return null;}
var type = dragSource.get_dragDataType();var mode = dragSource.get_dragMode();var data = dragSource.getDragData(this._activeContext);var scrollOffset = this.getScrollOffset(document.body,  true);var x = ev.clientX + scrollOffset.x;var y = ev.clientY + scrollOffset.y;var cursorRect = { x: x - this._radius, y: y - this._radius, width: this._radius * 2, height: this._radius * 2 };var targetRect;for (var i = 0;i < this._dropTargets.length;i++) {
targetRect = $common.getBounds(this._dropTargets[i].get_dropTargetElement());if ($common.overlaps(cursorRect, targetRect) && this._dropTargets[i].canDrop(mode, type, data)) {
return this._dropTargets[i];}
}
return null;},
_prepareForDomChanges : function() {
this._oldOffset = $common.getLocation(this._activeDragVisual);},
_recoverFromDomChanges : function() {
var newOffset = $common.getLocation(this._activeDragVisual);if (this._oldOffset.x != newOffset.x || this._oldOffset.y != newOffset.y) {
this._activeDragVisual.startingPoint = this.subtractPoints(this._activeDragVisual.startingPoint, this.subtractPoints(this._oldOffset, newOffset));scrollOffset = this.getScrollOffset(this._activeDragVisual,  true);var position = this.addPoints(this.subtractPoints(document._lastPosition, this._activeDragVisual.startingPoint), scrollOffset);$common.setLocation(this._activeDragVisual, position);}
},
addPoints : function(p1, p2) {
return { x: p1.x + p2.x, y: p1.y + p2.y };},
subtractPoints : function(p1, p2) {
return { x: p1.x - p2.x, y: p1.y - p2.y };},
getScrollOffset : function(element, recursive) {
var left = element.scrollLeft;var top = element.scrollTop;if (recursive) {
var parent = element.parentNode;while (parent != null && parent.scrollLeft != null) {
left += parent.scrollLeft;top += parent.scrollTop;if (parent == document.body && (left != 0 && top != 0))
break;parent = parent.parentNode;}
}
return { x: left, y: top };},
getBrowserRectangle : function() {
var width = window.innerWidth;var height = window.innerHeight;if (width == null) {
width = document.body.clientWidth;}
if (height == null) {
height = document.body.clientHeight;}
return { x: 0, y: 0, width: width, height: height };},
getNextSibling : function(item) {
for (item = item.nextSibling;item != null;item = item.nextSibling) {
if (item.innerHTML != null) {
return item;}
}
return null;},
hasParent : function(element) {
return (element.parentNode != null && element.parentNode.tagName != null);}
}
AjaxControlToolkit.IEDragDropManager.registerClass('AjaxControlToolkit.IEDragDropManager', Sys.Component);AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget = function(dropTarget) {
if (dropTarget == null) {
return [];}
var ev = window._event;var dataObjects = [];var dataTypes = [ "URL", "Text" ];var data;for (var i = 0;i < dataTypes.length;i++) {
var dt = ev.dataTransfer;if(!dt && ev.rawEvent) dt = ev.rawEvent.dataTransfer;data = dt.getData(dataTypes[i]);if (dropTarget.canDrop(AjaxControlToolkit.DragMode.Copy, dataTypes[i], data)) {
if (data) {
Array.add(dataObjects, { type : dataTypes[i], value : data });}
}
}
return dataObjects;}
AjaxControlToolkit.GenericDragDropManager = function() {
AjaxControlToolkit.GenericDragDropManager.initializeBase(this);this._dropTargets = null;this._scrollEdgeConst = 40;this._scrollByConst = 10;this._scroller = null;this._scrollDeltaX = 0;this._scrollDeltaY = 0;this._activeDragVisual = null;this._activeContext = null;this._activeDragSource = null;this._oldOffset = null;this._potentialTarget = null;this._mouseUpHandler = null;this._mouseMoveHandler = null;this._keyPressHandler = null;this._scrollerTickHandler = null;}
AjaxControlToolkit.GenericDragDropManager.prototype = {
initialize : function() {
AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "initialize");this._mouseUpHandler = Function.createDelegate(this, this._onMouseUp);this._mouseMoveHandler = Function.createDelegate(this, this._onMouseMove);this._keyPressHandler = Function.createDelegate(this, this._onKeyPress);this._scrollerTickHandler = Function.createDelegate(this, this._onScrollerTick);if (Sys.Browser.agent === Sys.Browser.Safari) {
AjaxControlToolkit.GenericDragDropManager.__loadSafariCompatLayer(this);}
this._scroller = new Sys.Timer();this._scroller.set_interval(10);this._scroller.add_tick(this._scrollerTickHandler);},
startDragDrop : function(dragSource, dragVisual, context) {
this._activeDragSource = dragSource;this._activeDragVisual = dragVisual;this._activeContext = context;AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "startDragDrop", [dragSource, dragVisual, context]);},
_stopDragDrop : function(cancelled) {
this._scroller.set_enabled(false);AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "_stopDragDrop", [cancelled]);},
_drag : function(isInitialDrag) {
AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "_drag", [isInitialDrag]);this._autoScroll();},
_wireEvents : function() {
$addHandler(document, "mouseup", this._mouseUpHandler);$addHandler(document, "mousemove", this._mouseMoveHandler);$addHandler(document, "keypress", this._keyPressHandler);},
_unwireEvents : function() {
$removeHandler(document, "keypress", this._keyPressHandler);$removeHandler(document, "mousemove", this._mouseMoveHandler);$removeHandler(document, "mouseup", this._mouseUpHandler);},
_wireDropTargetEvents : function(dropTarget) {
},
_unwireDropTargetEvents : function(dropTarget) {
},
_onMouseUp : function(e) {
window._event = e;this._stopDragDrop(false);},
_onMouseMove : function(e) {
window._event = e;this._drag();},
_onKeyPress : function(e) {
window._event = e;var k = e.keyCode ? e.keyCode : e.rawEvent.keyCode;if (k == 27) {
this._stopDragDrop( true);}
},
_autoScroll : function() {
var ev = window._event;var browserRect = this.getBrowserRectangle();if (browserRect.width > 0) {
this._scrollDeltaX = this._scrollDeltaY = 0;if (ev.clientX < browserRect.x + this._scrollEdgeConst) this._scrollDeltaX = -this._scrollByConst;else if (ev.clientX > browserRect.width - this._scrollEdgeConst) this._scrollDeltaX = this._scrollByConst;if (ev.clientY < browserRect.y + this._scrollEdgeConst) this._scrollDeltaY = -this._scrollByConst;else if (ev.clientY > browserRect.height - this._scrollEdgeConst) this._scrollDeltaY = this._scrollByConst;if (this._scrollDeltaX != 0 || this._scrollDeltaY != 0) {
this._scroller.set_enabled(true);}
else {
this._scroller.set_enabled(false);}
}
},
_onScrollerTick : function() {
var oldLeft = document.body.scrollLeft;var oldTop = document.body.scrollTop;window.scrollBy(this._scrollDeltaX, this._scrollDeltaY);var newLeft = document.body.scrollLeft;var newTop = document.body.scrollTop;var dragVisual = this._activeDragVisual;var position = { x: parseInt(dragVisual.style.left) + (newLeft - oldLeft), y: parseInt(dragVisual.style.top) + (newTop - oldTop) };$common.setLocation(dragVisual, position);}
}
AjaxControlToolkit.GenericDragDropManager.registerClass('AjaxControlToolkit.GenericDragDropManager', AjaxControlToolkit.IEDragDropManager);if (Sys.Browser.agent === Sys.Browser.Safari) {
AjaxControlToolkit.GenericDragDropManager.__loadSafariCompatLayer = function(ddm) {
ddm._getScrollOffset = ddm.getScrollOffset;ddm.getScrollOffset = function(element, recursive) {
return { x: 0, y: 0 };}
ddm._getBrowserRectangle = ddm.getBrowserRectangle;ddm.getBrowserRectangle = function() {
var browserRect = ddm._getBrowserRectangle();var offset = ddm._getScrollOffset(document.body, true);return { x: browserRect.x + offset.x, y: browserRect.y + offset.y,
width: browserRect.width + offset.x, height: browserRect.height + offset.y };}
}
}

Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit._SliderDragDropManagerInternal = function() {
AjaxControlToolkit._SliderDragDropManagerInternal.initializeBase(this);this._instance = null;}
AjaxControlToolkit._SliderDragDropManagerInternal.prototype = {
_getInstance : function() {
this._instance = new AjaxControlToolkit.GenericDragDropManager();this._instance.initialize();this._instance.add_dragStart(Function.createDelegate(this, this._raiseDragStart));this._instance.add_dragStop(Function.createDelegate(this, this._raiseDragStop));return this._instance;} 
}
AjaxControlToolkit._SliderDragDropManagerInternal.registerClass('AjaxControlToolkit._SliderDragDropManagerInternal', AjaxControlToolkit._DragDropManager);AjaxControlToolkit.SliderDragDropManagerInternal = new AjaxControlToolkit._SliderDragDropManagerInternal();AjaxControlToolkit.SliderOrientation = function() {
}
AjaxControlToolkit.SliderOrientation.prototype = {
Horizontal : 0,
Vertical : 1
}
AjaxControlToolkit.SliderOrientation.registerEnum('AjaxControlToolkit.SliderOrientation', false);AjaxControlToolkit.SliderBehavior = function(element) {
AjaxControlToolkit.SliderBehavior.initializeBase(this, [element]);this._minimum = 0;this._maximum = 100;this._value = null;this._steps = 0;this._decimals = 0;this._orientation = AjaxControlToolkit.SliderOrientation.Horizontal;this._railElement = null;this._railCssClass = null;this._isHorizontal = true;this._isUpdatingInternal = false;this._isInitializedInternal = false;this._enableHandleAnimation = false;this._handle = null;this._handleImage = null;this._handleAnimation = null;this._handleAnimationDuration = 0.1;this._handleImageUrl = null;this._handleCssClass = null;this._dragHandle = null;this._mouseupHandler = null;this._selectstartHandler = null;this._boundControlChangeHandler = null;this._boundControlKeyPressHandler = null;this._boundControlID = null;this._boundControl = null;this._length = null;this._raiseChangeOnlyOnMouseUp = true;this._animationPending = false;this._selectstartPending = false;this._tooltipText = '';}
AjaxControlToolkit.SliderBehavior.prototype = {
initialize : function() {
AjaxControlToolkit.SliderBehavior.callBaseMethod(this, 'initialize');this._initializeLayout();},
dispose : function() {
this._disposeHandlers();this._disposeBoundControl();if(this._enableHandleAnimation && this._handleAnimation) {
this._handleAnimation.dispose();}
AjaxControlToolkit.SliderBehavior.callBaseMethod(this, 'dispose');},
_initializeLayout : function() {
this._railElement = document.createElement('DIV');this._railElement.id = this.get_id() + '_railElement';this._railElement.tabIndex = -1;this._railElement.innerHTML = '<div></div>';this._handle = this._railElement.childNodes[0];this._handle.style.overflow = 'hidden';this._handle.style.position = 'absolute';if(Sys.Browser.agent == Sys.Browser.Opera) {
this._handle.style.left = '0px';this._handle.style.top = '0px';}
var textBoxElement = this.get_element();var textBoxElementBounds = $common.getBounds(textBoxElement);textBoxElement.parentNode.insertBefore(this._railElement, textBoxElement);textBoxElement.style.display = 'none';this._isHorizontal = (this._orientation == AjaxControlToolkit.SliderOrientation.Horizontal);var defaultRailCssClass = (this._isHorizontal) ? 'ajax__slider_h_rail' : 'ajax__slider_v_rail';var defaultHandleCssClass = (this._isHorizontal) ? 'ajax__slider_h_handle' : 'ajax__slider_v_handle';var defaultHandleImageUrl = (this._isHorizontal) ? 'WebResource.axd?d=2KeNSa7U2moGrsP-phBHa4g0ZXv_CI_k4kipVcsjg4CJUROOnnWrlIZkVOVnz1WEiAXP2tQhW28k2Vw-nm1gKM8jmzlvZ3E8-KXeTRV9FnQ1&t=633766931220000000'
: 'WebResource.axd?d=2KeNSa7U2moGrsP-phBHa4g0ZXv_CI_k4kipVcsjg4CJUROOnnWrlIZkVOVnz1WE7_eZfJLDhUTfMxeOU-y30KuSC6ETBmaZ8iSLq3y_D-k1&t=633766931220000000';this._railElement.className = (this._railCssClass) ? this._railCssClass : defaultRailCssClass;this._handle.className = (this._handleCssClass) ? this._handleCssClass : defaultHandleCssClass;if(!this._handleImageUrl) this._handleImageUrl = defaultHandleImageUrl;if (this._isHorizontal) {
if(this._length) this._railElement.style.width = this._length;} 
else {
if(this._length) this._railElement.style.height = this._length;}
this._loadHandleImage();this._enforceTextBoxElementPositioning();this._initializeSlider();},
_enforceTextBoxElementPositioning : function() {
var tbPosition = 
{
position: this.get_element().style.position,
top: this.get_element().style.top,
right: this.get_element().style.right,
bottom: this.get_element().style.bottom,
left: this.get_element().style.left
};if(tbPosition.position != '') {
this._railElement.style.position = tbPosition.position;}
if(tbPosition.top != '') {
this._railElement.style.top = tbPosition.top;}
if(tbPosition.right != '') {
this._railElement.style.right = tbPosition.right;}
if(tbPosition.bottom != '') {
this._railElement.style.bottom = tbPosition.bottom;}
if(tbPosition.left != '') {
this._railElement.style.left = tbPosition.left;}
},
_loadHandleImage : function() {
this._handleImage = document.createElement('IMG');this._handleImage.id = this.get_id() + '_handleImage';this._handle.appendChild(this._handleImage);this._handleImage.src = this._handleImageUrl;},
_initializeSlider : function() {
this._initializeBoundControl();var _elementValue;try {
_elementValue = parseFloat(this.get_element().value);} catch(ex) {
_elementValue = Number.NaN;}
this.set_Value(_elementValue);this._setHandleOffset(this._value);this._initializeDragHandle();AjaxControlToolkit.SliderDragDropManagerInternal.registerDropTarget(this);this._initializeHandlers();this._initializeHandleAnimation();this._isInitializedInternal = true;this._raiseEvent('sliderInitialized');},
_initializeBoundControl : function() {
if(this._boundControl) {
var isInputElement = this._boundControl.nodeName == 'INPUT';if(isInputElement) {
this._boundControlChangeHandler = Function.createDelegate(this, this._onBoundControlChange);this._boundControlKeyPressHandler = Function.createDelegate(this, this._onBoundControlKeyPress);$addHandler(this._boundControl, 'change', this._boundControlChangeHandler);$addHandler(this._boundControl, 'keypress', this._boundControlKeyPressHandler);}
}
},
_disposeBoundControl : function() {
if(this._boundControl) {;var isInputElement = this._boundControl.nodeName == 'INPUT';if(isInputElement) {
$removeHandler(this._boundControl, 'change', this._boundControlChangeHandler);$removeHandler(this._boundControl, 'keypress', this._boundControlKeyPressHandler);}
}
},
_onBoundControlChange : function(evt) {
this._animationPending = true;this._setValueFromBoundControl();},
_onBoundControlKeyPress : function(evt) {
if(evt.charCode == 13) {
this._animationPending = true;this._setValueFromBoundControl();evt.preventDefault();}
},
_setValueFromBoundControl : function() {
this._isUpdatingInternal = true;if(this._boundControlID) {
this._calcValue($get(this._boundControlID).value);}
this._isUpdatingInternal = false;},
_initializeHandleAnimation : function() {
if(this._steps > 0) {
this._enableHandleAnimation = false;return;}
if(this._enableHandleAnimation) {
this._handleAnimation = new AjaxControlToolkit.Animation.LengthAnimation(
this._handle, this._handleAnimationDuration, 100, 'style');}
},
_ensureBinding : function() {
if(this._boundControl) {
var value = this._value;if(value >= this._minimum || value <= this._maximum) {
var isInputElement = this._boundControl.nodeName == 'INPUT';if(isInputElement) {
this._boundControl.value = value;}
else if(this._boundControl) {
this._boundControl.innerHTML = value;}
}
}
},
_getBoundsInternal : function(element) {
var bounds = $common.getBounds(element);function hasSize() { 
return bounds.width > 0 && bounds.height > 0;}
if(!hasSize()) {
bounds.width = parseInt($common.getCurrentStyle(element, 'width'));bounds.height = parseInt($common.getCurrentStyle(element, 'height'));if(!hasSize()) {
var tempNode = element.cloneNode(true);tempNode.visibility = 'hidden';document.body.appendChild(tempNode);bounds.width = parseInt($common.getCurrentStyle(tempNode, 'width'));bounds.height = parseInt($common.getCurrentStyle(tempNode, 'height'));document.body.removeChild(tempNode);if(!hasSize()) {
throw Error.argument('element size', AjaxControlToolkit.Resources.Slider_NoSizeProvided);}
}
}
if(this._orientation == AjaxControlToolkit.SliderOrientation.Vertical) {
bounds = { x : bounds.y, 
y : bounds.x, 
height : bounds.width, 
width : bounds.height, 
right : bounds.right,
bottom : bounds.bottom,
location : {x:bounds.y, y:bounds.x},
size : {width:bounds.height, height:bounds.width}
};}
return bounds;},
_getRailBounds : function() {
var bounds = this._getBoundsInternal(this._railElement);return bounds;},
_getHandleBounds : function() {
return this._getBoundsInternal(this._handle);},
_initializeDragHandle : function() {
var dh = this._dragHandle = document.createElement('DIV');dh.style.position = 'absolute';dh.style.width = '1px';dh.style.height = '1px';dh.style.overflow = 'hidden';dh.style.zIndex = '999';dh.style.background = 'none';document.body.appendChild(this._dragHandle);},
_resetDragHandle : function() {
var handleBounds = $common.getBounds(this._handle);$common.setLocation(this._dragHandle, {x:handleBounds.x, y:handleBounds.y});},
_initializeHandlers : function() {
this._selectstartHandler = Function.createDelegate(this, this._onSelectStart);this._mouseupHandler = Function.createDelegate(this, this._onMouseUp);$addHandler(document, 'mouseup', this._mouseupHandler);$addHandlers(this._handle, 
{
'mousedown': this._onMouseDown,
'dragstart': this._IEDragDropHandler,
'drag': this._IEDragDropHandler,
'dragend': this._IEDragDropHandler
},
this);$addHandlers(this._railElement,
{
'click': this._onRailClick
},
this);},
_disposeHandlers : function() {
$clearHandlers(this._handle);$clearHandlers(this._railElement);$removeHandler(document, 'mouseup', this._mouseupHandler);this._mouseupHandler = null;this._selectstartHandler = null;},
startDragDrop : function(dragVisual) {
this._resetDragHandle();AjaxControlToolkit.SliderDragDropManagerInternal.startDragDrop(this, dragVisual, null);},
_onMouseDown : function(evt) {
window._event = evt;evt.preventDefault();if(!AjaxControlToolkit.SliderBehavior.DropPending) {
AjaxControlToolkit.SliderBehavior.DropPending = this;$addHandler(document, 'selectstart', this._selectstartHandler);this._selectstartPending = true;this.startDragDrop(this._dragHandle);}
},
_onMouseUp : function(evt) {
var srcElement = evt.target;if(AjaxControlToolkit.SliderBehavior.DropPending == this) {
AjaxControlToolkit.SliderBehavior.DropPending = null;if(this._selectstartPending) {
$removeHandler(document, 'selectstart', this._selectstartHandler);}
}
},
_onRailClick : function(evt) {
if(evt.target == this._railElement) {
this._animationPending = true;this._onRailClicked(evt);}
},
_IEDragDropHandler : function(evt) {
evt.preventDefault();},
_onSelectStart : function(evt) {
evt.preventDefault();},
_calcValue : function(value, mouseOffset) {
var val;if(value != null) {
if(!Number.isInstanceOfType(value)) {
try {
value = parseFloat(value);} catch(ex) {
value = Number.NaN;}
}
if(isNaN(value)) {
value = this._minimum;}
val = (value < this._minimum) ? this._minimum
: (value > this._maximum) ? this._maximum
: value;}
else { 
var _minimum = this._minimum;var _maximum = this._maximum;var handleBounds = this._getHandleBounds();var sliderBounds = this._getRailBounds();var handleX = (mouseOffset) ? mouseOffset - handleBounds.width / 2 
: handleBounds.x - sliderBounds.x;var extent = sliderBounds.width - handleBounds.width;var percent = handleX / extent;val = (handleX == 0) ? _minimum
: (handleX == (sliderBounds.width - handleBounds.width)) ? _maximum
: _minimum + percent * (_maximum - _minimum);}
if(this._steps > 0) {
val = this._getNearestStepValue(val);}
val = (val < this._minimum) ? this._minimum
: (val > this._maximum) ? this._maximum
: val;this._isUpdatingInternal = true;this.set_Value(val);this._isUpdatingInternal = false;return val;},
_setHandleOffset : function(value, playHandleAnimation) {
var _minimum = this._minimum;var _maximum = this._maximum;var handleBounds = this._getHandleBounds();var sliderBounds = this._getRailBounds();var extent = _maximum - _minimum;var fraction = (value - _minimum) / extent;var hypOffset = Math.round(fraction * (sliderBounds.width - handleBounds.width));var offset = (value == _minimum) ? 0
: (value == _maximum) ? (sliderBounds.width - handleBounds.width)
: hypOffset;if(playHandleAnimation) {
this._handleAnimation.set_startValue(handleBounds.x - sliderBounds.x);this._handleAnimation.set_endValue(offset);this._handleAnimation.set_propertyKey((this._isHorizontal) ? 'left' : 'top');this._handleAnimation.play();this._animationPending = false;}
else {
if(this._isHorizontal) {
this._handle.style.left = offset + 'px';}
else {
this._handle.style.top = offset + 'px';}
}
},
_getNearestStepValue : function(value) {
if(this._steps == 0) return value;var extent = this._maximum - this._minimum;if (extent == 0) return value;var delta = extent / (this._steps - 1);return Math.round(value / delta) * delta;},
_onHandleReleased : function() {
if(this._raiseChangeOnlyOnMouseUp) {
this._fireTextBoxChangeEvent();}
this._raiseEvent('slideEnd');},
_onRailClicked : function(evt) {
var handleBounds = this._getHandleBounds();var sliderBounds = this._getRailBounds();var offset = (this._isHorizontal) ? evt.offsetX : evt.offsetY;var minOffset = handleBounds.width / 2;var maxOffset = sliderBounds.width - minOffset;offset = (offset < minOffset) ? minOffset 
: (offset > maxOffset) ? maxOffset
: offset;this._calcValue(null, offset, true);this._fireTextBoxChangeEvent();},
_fireTextBoxChangeEvent : function() {
if (document.createEvent) {
var onchangeEvent = document.createEvent('HTMLEvents');onchangeEvent.initEvent('change', true, false);this.get_element().dispatchEvent(onchangeEvent);} 
else if(document.createEventObject) {
this.get_element().fireEvent('onchange');}
},
get_dragDataType : function() { 
return 'HTML';},
getDragData : function() {
return this._handle;},
get_dragMode : function() { 
return AjaxControlToolkit.DragMode.Move;},
onDragStart : function() {
this._resetDragHandle();this._raiseEvent('slideStart');},
onDrag : function() {
var dragHandleBounds = this._getBoundsInternal(this._dragHandle);var handleBounds = this._getHandleBounds();var sliderBounds = this._getRailBounds();var handlePosition;if(this._isHorizontal) {
handlePosition = { x:dragHandleBounds.x - sliderBounds.x, y:0 };}
else {
handlePosition = { y:dragHandleBounds.x - sliderBounds.x, x:0 };}
$common.setLocation(this._handle, handlePosition);this._calcValue(null, null);if(this._steps > 1) {
this._setHandleOffset(this.get_Value(), false);}
},
onDragEnd : function() {
this._onHandleReleased();},
get_dropTargetElement : function() {
return document.body;},
canDrop : function(dragMode, dataType) {
return dataType == 'HTML';},
drop : Function.emptyMethod,
onDragEnterTarget : Function.emptyMethod,
onDragLeaveTarget : Function.emptyMethod,
onDragInTarget : Function.emptyMethod,
add_sliderInitialized : function(handler) {
this.get_events().addHandler('sliderInitialized', handler);},
remove_sliderInitialized : function(handler) {
this.get_events().removeHandler('sliderInitialized', handler);},
add_valueChanged : function(handler) {
this.get_events().addHandler('valueChanged', handler);},
remove_valueChanged : function(handler) {
this.get_events().removeHandler('valueChanged', handler);},
add_slideStart : function(handler) {
this.get_events().addHandler('slideStart', handler);},
remove_slideStart : function(handler) {
this.get_events().removeHandler('slideStart', handler);},
add_slideEnd : function(handler) {
this.get_events().addHandler('slideEnd', handler);},
remove_slideEnd : function(handler) {
this.get_events().removeHandler('slideEnd', handler);},
_raiseEvent : function(eventName, eventArgs) {
var handler = this.get_events().getHandler(eventName);if (handler) {
if (!eventArgs) {
eventArgs = Sys.EventArgs.Empty;}
handler(this, eventArgs);}
},
get_Value : function() {
return this._value;},
set_Value : function(value) {
var oldValue = this._value;var newValue = value;if(!this._isUpdatingInternal) {
newValue = this._calcValue(value);}
this.get_element().value = this._value = newValue.toFixed(this._decimals);this._ensureBinding();if(!Number.isInstanceOfType(this._value)) {
try {
this._value = parseFloat(this._value);} catch(ex) {
this._value = Number.NaN;}
}
if(this._tooltipText) {
this._handle.alt = this._handle.title = 
String.format(this._tooltipText, this._value);}
if(this._isInitializedInternal) {
this._setHandleOffset(newValue, this._enableHandleAnimation && this._animationPending);if(this._isUpdatingInternal) {
if(!this._raiseChangeOnlyOnMouseUp) {
this._fireTextBoxChangeEvent();}
}
if(this._value != oldValue) {
this._raiseEvent('valueChanged');}
}
},
get_RailCssClass : function() {
return this._railCssClass;},
set_RailCssClass : function(value) {
this._railCssClass = value;}, 
get_HandleImageUrl : function() {
return this._handleImageUrl;},
set_HandleImageUrl : function(value) {
this._handleImageUrl = value;},
get_HandleCssClass : function() {
return this._handleCssClass;},
set_HandleCssClass : function(value) {
this._handleCssClass = value;},
get_Minimum : function() {
return this._minimum;},
set_Minimum : function(value) {
this._minimum = value;}, 
get_Maximum : function() {
return this._maximum;},
set_Maximum : function(value) {
this._maximum = value;},
get_Orientation : function() {
return this._orientation;},
set_Orientation : function(value) {
this._orientation = value;},
get_Steps : function() {
return this._steps;},
set_Steps : function(value) {
this._steps = Math.abs(value);this._steps = (this._steps == 1) ? 2 : this._steps;},
get_Decimals : function() {
return this._decimals;},
set_Decimals : function(value) {
this._decimals = Math.abs(value);},
get_EnableHandleAnimation : function() {
return this._enableHandleAnimation;},
set_EnableHandleAnimation : function(value) {
this._enableHandleAnimation = value;},
get_HandleAnimationDuration : function() {
return this._handleAnimationDuration;},
set_HandleAnimationDuration : function(value) {
this._handleAnimationDuration = value;}, 
get_BoundControlID : function() {
return this._boundControlID;},
set_BoundControlID : function(value) {
this._boundControlID = value;if(this._boundControlID) {
this._boundControl = $get(this._boundControlID);} else {
this._boundControl = null;}
},
get_Length : function() {
return this._length;},
set_Length : function(value) {
this._length = value + 'px';},
get_SliderInitialized : function() {
return this._isInitializedInternal;},
get_RaiseChangeOnlyOnMouseUp : function() {
return this._raiseChangeOnlyOnMouseUp;},
set_RaiseChangeOnlyOnMouseUp : function(value) {
this._raiseChangeOnlyOnMouseUp = value;},
get_TooltipText : function() {
return this._tooltipText;},
set_TooltipText : function(value) {
this._tooltipText = value;},
getClientState : function() {
var value = AjaxControlToolkit.SliderBehavior.callBaseMethod(this, 'get_ClientState');if (value == '') value = null;return value;},
setClientState : function(value) {
return AjaxControlToolkit.SliderBehavior.callBaseMethod(this, 'set_ClientState',[value]);}
}
AjaxControlToolkit.SliderBehavior.DropPending = null;AjaxControlToolkit.SliderBehavior.registerClass('AjaxControlToolkit.SliderBehavior', AjaxControlToolkit.BehaviorBase, AjaxControlToolkit.IDragSource, AjaxControlToolkit.IDropTarget);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();