Type.registerNamespace('AjaxDataControls'); $ADC.RepeaterItemType = function() { throw Error.notImplemented(); }
$ADC.RepeaterItemType.prototype = { NotSet: 0, Header: 1, Footer: 2, Item: 3, AlternatingItem: 4, Separator: 5 }
$ADC.RepeaterItemType.registerEnum('AjaxDataControls.RepeaterItemType'); $ADC.RepeaterItem = function(owner, namingContainer, itemIndex, itemType, dataItem)
{ var e = Function._validateParams(arguments, [{ name: 'owner', type: $ADC.Repeater }, { name: 'namingContainer', type: String }, { name: 'itemIndex', type: Number }, { name: 'itemType', type: $ADC.RepeaterItemType }, { name: 'dataItem', mayBeNull: true}]); if (e) throw e; this._owner = owner; this._namingContainer = namingContainer; this._itemIndex = itemIndex; this._itemType = itemType; this._dataItem = dataItem; this._controls = new Array(); this._containers = new Array(); this._commandHandlers = new Array(); }
$ADC.RepeaterItem.prototype = { get_itemIndex: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._itemIndex; }, get_itemType: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._itemType; }, get_dataItem: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._dataItem; }, get_isDataItemType: function() { if (arguments.length !== 0) throw Error.parameterCount(); var itemType = this.get_itemType(); return ((itemType == $ADC.RepeaterItemType.Item) || (itemType == $ADC.RepeaterItemType.AlternatingItem)); }, dispose: function() {
    if (arguments.length !== 0) throw Error.parameterCount(); var i = 0; for (i = this._controls.length - 1; i > -1; i--) { delete this._controls[i]; }
    Array.clear(this._controls); if ((this._containers.length > 0) && (this._commandHandlers.length > 0)) {
        for (i = this._containers.length - 1; i > -1; i--) {
            if (this._containers[i].nodeType != 3) { $removeHandler(this._containers[i], 'click', this._commandHandlers[i]); }
            delete this._containers[i]; delete this._commandHandlers[i];
        } 
    }
    else { if (this._containers.length > 0) { for (i = this._containers.length - 1; i > -1; i--) { delete this._containers[i]; } } }
    Array.clear(this._containers); Array.clear(this._commandHandlers); delete this._controls; delete this._containers; delete this._commandHandlers; delete this._owner;
}, addControl: function(parentControl, childControl) { var e = Function._validateParams(arguments, [{ name: 'parentControl', type: Object }, { name: 'childControl', type: Object}]); if (e) throw e; this._addControl(childControl); parentControl.appendChild(childControl); }, removeControl: function(controlId) { var e = Function._validateParams(arguments, [{ name: "controlId", type: String}]); if (e) throw e; var control = this.findControl(controlId); if (control) { Array.remove(control.id); control.parentNode.removeChild(control); } }, findControl: function(controlId) {
    var e = Function._validateParams(arguments, [{ name: "controlId", type: String}]); if (e) throw e; var targetId = (this._namingContainer + '$' + controlId); var index = Array.indexOf(this._controls, targetId); if (index > -1) { return $get(targetId); }
    return null;
}, _addControl: function(childControl) {
    if ((childControl.id != null) && (childControl.id.length > 0)) {
        var targetId = (this._namingContainer + '$' + childControl.id); if (Array.contains(this._controls, targetId)) { throw Error.invalidOperation('Control of the same id already exists.'); }
        childControl.id = targetId; Array.add(this._controls, childControl.id);
    } 
} 
}
$ADC.RepeaterItem.registerClass('AjaxDataControls.RepeaterItem', null, Sys.IDisposable); $ADC.RepeaterItemEventArgs = function(item)
{ var e = Function._validateParams(arguments, [{ name: 'item', type: $ADC.RepeaterItem}]); if (e) throw e; $ADC.RepeaterItemEventArgs.initializeBase(this); this._item = item; }
$ADC.RepeaterItemEventArgs.prototype = { get_item: function()
{ if (arguments.length !== 0) throw Error.parameterCount(); return this._item; } 
}
$ADC.RepeaterItemEventArgs.registerClass('AjaxDataControls.RepeaterItemEventArgs', Sys.EventArgs); $ADC.RepeaterCommandEventArgs = function(commandName, commandArgument, commandSource, item)
{ var e = Function._validateParams(arguments, [{ name: 'commandName', type: String }, { name: 'commandArgument' }, { name: 'commandSource', type: Object }, { name: 'item', type: $ADC.RepeaterItem}]); if (e) throw e; $ADC.RepeaterCommandEventArgs.initializeBase(this); this._commandName = commandName; this._commandArgument = commandArgument; this._commandSource = commandSource; this._item = item; }
$ADC.RepeaterCommandEventArgs.prototype = { get_commandName: function()
{ if (arguments.length !== 0) throw Error.parameterCount(); return this._commandName; }, get_commandArgument: function()
{ if (arguments.length !== 0) throw Error.parameterCount(); return this._commandArgument; }, get_commandSource: function()
{ if (arguments.length !== 0) throw Error.parameterCount(); return this._commandSource; }, get_item: function()
{ if (arguments.length !== 0) throw Error.parameterCount(); return this._item; } 
}
$ADC.RepeaterCommandEventArgs.registerClass('AjaxDataControls.RepeaterCommandEventArgs', Sys.EventArgs); $ADC.Repeater = function(element) {
    this._headerTemplate = ''; this._itemTemplate = ''; this._separatorTemplate = ''; this._alternatingItemTemplate = ''; this._footerTemplate = ''; this._dataSource = null; this._items = new Array(); this._animate = true
    this._animationDuration = 0.2; this._animationFps = 20; this._animation = null; $ADC.Repeater.initializeBase(this, [element]);
}
$ADC.Repeater.prototype = { get_cssClass: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this.get_element().className; }, set_cssClass: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: String}]); if (e) throw e; var target = this.get_element(); if (!Sys.UI.DomElement.containsCssClass(target, value)) { Sys.UI.DomElement.addCssClass(target, value); this.raisePropertyChanged('cssClass'); } }, get_headerTemplate: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._headerTemplate; }, set_headerTemplate: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: String}]); if (e) throw e; if (this._headerTemplate != value) { this._headerTemplate = value; this.raisePropertyChanged('headerTemplate'); } }, get_itemTemplate: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._itemTemplate; }, set_itemTemplate: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: String}]); if (e) throw e; if (this._itemTemplate != value) { this._itemTemplate = value; this.raisePropertyChanged('itemTemplate'); } }, get_separatorTemplate: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._separatorTemplate; }, set_separatorTemplate: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: String}]); if (e) throw e; if (this._separatorTemplate != value) { this._separatorTemplate = value; this.raisePropertyChanged('separatorTemplate'); } }, get_alternatingItemTemplate: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._alternatingItemTemplate; }, set_alternatingItemTemplate: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: String}]); if (e) throw e; if (this._alternatingItemTemplate != value) { this._alternatingItemTemplate = value; this.raisePropertyChanged('alternatingItemTemplate'); } }, get_footerTemplate: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._footerTemplate; }, set_footerTemplate: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: String}]); if (e) throw e; if (this._footerTemplate != value) { this._footerTemplate = value; this.raisePropertyChanged('footerTemplate'); } }, get_animate: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._animate; }, set_animate: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: Boolean}]); if (e) throw e; if (this._animate != value) { this._animate = value; this.raisePropertyChanged('animate'); } }, get_animationDuration: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._animationDuration; }, set_animationDuration: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: Number}]); if (e) throw e; if (this._animationDuration != value) { this._animationDuration = value; this.raisePropertyChanged('animationDuration'); } }, get_animationFps: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._animationFps; }, set_animationFps: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: Number}]); if (e) throw e; if (this._animationFps != value) { this._animationFps = value; this.raisePropertyChanged('animationFps'); } }, get_dataSource: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._dataSource; }, set_dataSource: function(value) { var e = Function._validateParams(arguments, [{ name: 'value', type: Array, mayBeNull: true}]); if (e) throw e; if (this._dataSource != value) { this._dataSource = value; this.raisePropertyChanged('dataSource'); } }, get_items: function() { if (arguments.length !== 0) throw Error.parameterCount(); return this._items; }, initialize: function() { $ADC.Repeater.callBaseMethod(this, 'initialize'); }, dispose: function() {
    if (this._animation != null) { this._animation.dispose(); }
    delete this._animation; this._clearItems(); delete this._items; $ADC.Repeater.callBaseMethod(this, 'dispose');
}, _clearStuff: function()
{ this._clearItems(); $ADC.Util.clearContent(target); }, dataBind: function() {
    if (arguments.length !== 0) throw Error.parameterCount(); if ($ADC.Util.isEmptyString(this.get_itemTemplate())) { throw Error.invalidOperation('ItemTemplate must be set before calling this method.'); }
    var target = this.get_element(); target.style.visibility = 'hidden'; this._clearStuff(); var headerTemplate = this.get_headerTemplate(); if (!$ADC.Util.isEmptyString(headerTemplate)) { this._addTemplate(headerTemplate, -1, $ADC.RepeaterItemType.Header, null); }
    var dataSource = this.get_dataSource(); if ((dataSource != null) && (dataSource.length > 0)) {
        var itemTemplate = this.get_itemTemplate(); var alternatingItemTemplate = this.get_alternatingItemTemplate(); var hasAlternatingItemTemplate = !$ADC.Util.isEmptyString(alternatingItemTemplate); var separatorTemplate = this.get_separatorTemplate(); var hasSeparatorTemplate = !$ADC.Util.isEmptyString(separatorTemplate); var isAlt = false; var itemType = $ADC.RepeaterItemType.Item; var template; var length = dataSource.length; for (var i = 0; i < length; i++) {
            var dataItem = dataSource[i]; template = itemTemplate; if (hasAlternatingItemTemplate) {
                if (isAlt) { template = alternatingItemTemplate; itemType = $ADC.RepeaterItemType.AlternatingItem; }
                else { itemType = $ADC.RepeaterItemType.Item; } 
            }
            this._addTemplate(template, i, itemType, dataItem); isAlt = !isAlt; if ((hasSeparatorTemplate) && (i != (length - 1))) { this._addTemplate(separatorTemplate, i, $ADC.RepeaterItemType.Separator, null); } 
        } 
    }
    var footerTemplate = this.get_footerTemplate(); if (!$ADC.Util.isEmptyString(footerTemplate)) { this._addTemplate(footerTemplate, -1, $ADC.RepeaterItemType.Footer, null); }
    target.style.visibility = 'visible'; if (this._canAnimate()) {
        if (this._animation == null) { this._animation = $ADC.Util.createDataBindAnimation(this.get_animationDuration(), this.get_animationFps(), this); }
        if (Sys.Browser.agent == Sys.Browser.InternetExplorer) { var backColor = $ADC.Style.getStyleValue(target, 'backgroundColor'); if ((!backColor) || (backColor == '') || (backColor == 'transparent') || (backColor == 'rgba(0, 0, 0, 0)')) { target.style.backgroundColor = $ADC.Style.getInheritedBackgroundColor(target); } }
        this._animation.play();
    } 
}, add_itemCreated: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().addHandler('itemCreated', handler); }, remove_itemCreated: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().removeHandler('itemCreated', handler); }, add_itemDataBound: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().addHandler('itemDataBound', handler); }, remove_itemDataBound: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().removeHandler('itemDataBound', handler); }, add_itemMouseOver: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().addHandler('itemMouseOver', handler); }, remove_itemMouseOver: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().removeHandler('itemMouseOver', handler); }, add_itemMouseOut: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().addHandler('itemMouseOut', handler); }, remove_itemMouseOut: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().removeHandler('itemMouseOut', handler); }, add_itemCommand: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().addHandler('itemCommand', handler); }, remove_itemCommand: function(handler) { var e = Function._validateParams(arguments, [{ name: 'handler', type: Function}]); if (e) throw e; this.get_events().removeHandler('itemCommand', handler); }, _addTemplate: function(template, index, itemType, dataItem) {
    var controlElement = this.get_element(); var namingContainer = controlElement.id + '$' + itemType + '$' + index; var item = new $ADC.RepeaterItem(this, namingContainer, index, itemType, dataItem); var tempElement = document.createElement(controlElement.tagName); tempElement.innerHTML = template; var length = tempElement.childNodes.length; for (i = 0; i < length; i++) { this._iterateElements(tempElement.childNodes[i], item); }
    var clickHandler; var firstChild; var isDataItemType = item.get_isDataItemType(); if (tempElement.firstChild) {
        while (tempElement.firstChild) {
            firstChild = tempElement.firstChild; controlElement.appendChild(firstChild); if (isDataItemType) {
                clickHandler = Function.createCallback(this._raiseCommand, { sender: this, item: item }); $addHandler(firstChild, 'click', clickHandler); handler = this.get_events().getHandler('itemMouseOver'); if (handler) { var mouseOverHandler = Function.createCallback(this._raiseMouseOver, { sender: this, item: item }); $addHandler(firstChild, 'mouseover', mouseOverHandler); }
                handler = this.get_events().getHandler('itemMouseOut'); if (handler) { var mouseOutHandler = Function.createCallback(this._raiseMouseOut, { sender: this, item: item }); $addHandler(firstChild, 'mouseout', mouseOutHandler); }
                Array.add(item._containers, firstChild); Array.add(item._commandHandlers, clickHandler);
            } 
        } 
    }
    if (isDataItemType) { this.get_items().push(item); }
    var handler; handler = this.get_events().getHandler('itemCreated'); if (handler) { handler(this, new $ADC.RepeaterItemEventArgs(item)); }
    handler = this.get_events().getHandler('itemDataBound'); if (handler) { handler(this, new $ADC.RepeaterItemEventArgs(item)); }
    if (isDataItemType) { } 
}, _iterateElements: function(element, item) { item._addControl(element); var length = element.childNodes.length; for (var i = 0; i < length; i++) { this._iterateElements(element.childNodes[i], item); } }, _raiseMouseOver: function(e, context) { var handler = context.sender.get_events().getHandler('itemMouseOver'); if (handler) { handler(context.sender, new $ADC.RepeaterItemEventArgs(context.item)); } }, _raiseMouseOut: function(e, context) { var handler = context.sender.get_events().getHandler('itemMouseOut'); if (handler) { handler(context.sender, new $ADC.RepeaterItemEventArgs(context.item)); } }, _raiseCommand: function(e, context) {
    var commandName = ''; var commandArgument = ''; if (e.target.commandName) { commandName = e.target.commandName; }
    else {
        var commandNameAttribute = e.target.attributes['commandName']; if (commandNameAttribute) {
            if (commandNameAttribute.value) { commandName = commandNameAttribute.value; }
            else if (commandNameAttribute.nodeValue) { commandName = commandNameAttribute.nodeValue; } 
        } 
    }
    if (e.target.commandArgument) { commandArgument = e.target.commandArgument; }
    else {
        var commandArgumentAttribute = e.target.attributes['commandArgument']; if (commandArgumentAttribute) {
            if (commandArgumentAttribute.value) { commandArgument = commandArgumentAttribute.value; }
            else if (commandArgumentAttribute.nodeValue) { commandArgument = commandArgumentAttribute.nodeValue; } 
        } 
    }
    if ((commandName.length > 0) && (context.item.get_isDataItemType())) { var handler = context.sender.get_events().getHandler('itemCommand'); if (handler) { handler(context.sender, new $ADC.RepeaterCommandEventArgs(commandName, commandArgument, e.target, context.item)); } } 
}, _clearItems: function() {
    if (this._items.length > 0) { for (var i = this._items.length - 1; i > -1; i--) { this._items[i].dispose(); delete this._items[i]; } }
    Array.clear(this._items);
}, _canAnimate: function() {
    var canAnimate = this.get_animate(); if (canAnimate) { canAnimate = $ADC.Util.hasAnimationSupport(); }
    return canAnimate;
} 
}; $ADC.Repeater.registerClass('AjaxDataControls.Repeater', Sys.UI.Control); $ADC.ScrollDirection = function() { throw Error.notImplemented(); }
$ADC.ScrollDirection.prototype = { None: 0, LeftToRight: 1, RightToLeft: 2, TopToBottom: 3, BottomToTop: 4 }; $ADC.ScrollDirection.registerEnum('AjaxDataControls.ScrollDirection'); $ADC.Bound = function()
{ this.x = 0; this.y = 0; this.width = 0; this.height = 0; }; $ADC.ExtendedRepeater = function(element) { this._discreteScroll = false; this._scrollDuration = 40; this._scrollFps = 1; this._inlineHeaderFooter = false; this._visibleItems = null; this._scrollingContainer = null; this._scrollHeaderFooter = false; this._scrollDirection = $ADC.ScrollDirection.None; this._headerElement = null; this._footerElement = null; this._stopOnHover = null; this._itemContainer = null; this._width = null; this._height = null; this._scrollingContainerstyle = null; this._itemContainerBounds = new $ADC.Bound(); this._scrollingBounds = new $ADC.Bound(); this._scrolling = false; this._scrollingBoundsPx = new Object(); this._scrollingContainerLocation = new $ADC.Bound(); this._scrollingTimer = null; this._dontScroll = false; $ADC.ExtendedRepeater.initializeBase(this, [element]); }; $ADC.ExtendedRepeater.prototype = { initialize: function() {
    this._headerElement = document.createElement("span"); this._footerElement = document.createElement("span"); this._itemContainer = document.createElement("div"); this._scrollPadLock = null; if (this.get_scrollDirection() != $ADC.ScrollDirection.None) { this._itemContainer.style.overflow = "hidden"; this._itemContainer.style.width = this._width; this._itemContainer.style.height = this._height; }
    this._scrollingContainer = document.createElement("div"); if (this.get_stopOnHover()) { $addHandler(this._scrollingContainer, "mouseover", Function.createDelegate(this, function() { this._dontScroll = true; })); $addHandler(this._scrollingContainer, "mouseout", Function.createDelegate(this, function() { this._dontScroll = false; })); }
    this._scrollingContainerStyle = this._scrollingContainer.style; this._itemContainer.appendChild(this._scrollingContainer); this._itemContainer.style.position = "relative";
}, get_scrollDirection: function() { return this._scrollDirection; }, set_scrollDirection: function(value) { this._scrollDirection = value; }, get_stopOnHover: function() { return this._stopOnHover; }, set_stopOnHover: function(value) { this._stopOnHover = value; }, get_scrollPadLock: function() { return this._scrollPadLock; }, set_scrollPadLock: function(value) { this._scrollPadLock = value; }, get_scrollHeaderFooter: function() { return this._scrollHeaderFooter; }, set_scrollHeaderFooter: function(value) { this._scrollHeaderFooter = value; }, get_inlineHeaderFooter: function() { return this._inlineHeaderFooter; }, set_inlineHeaderFooter: function(value) { this._inlineHeaderFooter = value; }, get_scrollFps: function() { return this._scrollFps; }, set_scrollFps: function(value) { if (value && value != 0) { this._scrollFps = value; } }, get_discreteScroll: function() { return this._discreteScroll; }, set_discreteScroll: function(value) { this._discreteScroll = value; }, get_scrollDuration: function() { return this._scrollDuration; }, set_scrollDuration: function(value) { if (value && value != 0) { this._scrollDuration = value; } }, _getTrueBounds: function(element, nowrap) {
    var originalParent = element.parentNode; var originalWidth = element.style.width; var originalPosition = element.style.position; var orginalVisibility = element.style.visibility; var originalHeight = element.style.height; var originalWhiteSpace = element.style.whitespace; element.style.width = ""; element.style.height = ""; element.style.position = "absolute"; element.style.visibility = "hidden"; if (nowrap)
        element.style.whiteSpace = "nowrap"; var bodyWidth = document.body.style.width; document.body.style.width = "50000px"; document.body.insertBefore(element, document.body.firstChild); document.body.insertBefore(element, document.body.firstChild); var bounds = Sys.UI.DomElement.getBounds(element); document.body.style.width = bodyWidth; bounds.width = bounds.width + 70; originalParent.appendChild(element); element.style.position = originalPosition; element.style.height = originalHeight; element.style.width = originalWidth; if (nowrap)
        element.style.whitespace = originalWhiteSpace; element.style.visibility = orginalVisibility; return bounds;
}, dispose: function() {
    $ADC.ExtendedRepeater.callBaseMethod(this, 'dispose'); clearInterval(this._scrollingTimer)
    delete this._scrollingTimer;
}, _clearStuff: function() { this._clearItems(); $ADC.Util.clearContent(this._scrollingContainer); }, dataBind: function() {
    if (this.get_scrollDirection() != $ADC.ScrollDirection.None) { this._itemContainer.style.visibility = "hidden"; }
    $ADC.ExtendedRepeater.callBaseMethod(this, 'dataBind'); if (this._scrolling) { this._itemContainer.style.visibility = "visible"; return; }
    if (!this.get_scrollHeaderFooter()) { this.get_element().appendChild(this._headerElement); this.get_element().appendChild(this._itemContainer); this.get_element().appendChild(this._footerElement); }
    else { this.get_element().appendChild(this._itemContainer); this._scrollingContainer.insertBefore(this._headerElement, this._scrollingContainer.firstChild); this._scrollingContainer.appendChild(this._footerElement); }
    if (this.get_scrollDirection() == $ADC.ScrollDirection.None) { return; }
    this._scrollingContainerLocation.x = 0; this._scrollingContainerLocation.y = 0; var bounds; if (this.get_scrollDirection() == $ADC.ScrollDirection.LeftToRight || this.get_scrollDirection() == $ADC.ScrollDirection.RightToLeft) { this._scrollingContainer.style.whiteSpace = "nowrap"; bounds = this._getTrueBounds(this._scrollingContainer, true); }
    else { bounds = this._getTrueBounds(this._scrollingContainer, false); }
    this._scrollingBounds.width = bounds.width; this._scrollingBounds.height = this._scrollingContainer.offsetHeight; if (this.get_scrollDirection() != $ADC.ScrollDirection.None && this._scrolling == false) { this._startScrolling(); } 
}, _startScrolling: function() {
    this._scrolling = true; this._itemContainerBounds.width = Sys.UI.DomElement.getBounds(this._itemContainer).width; this._itemContainerBounds.height = Sys.UI.DomElement.getBounds(this._itemContainer).height; if (this.get_scrollDirection() == $ADC.ScrollDirection.LeftToRight) { this._scrollingContainerLocation.x = this._itemContainerBounds.width; this._scrollingContainer.style.marginLeft = this._scrollingContainerLocation.x + "px"; var moveLeftDel = Function.createDelegate(this, this._moveLeft); this._scrollingTimer = setInterval(moveLeftDel, this.get_scrollDuration()); }
    else if (this.get_scrollDirection() == $ADC.ScrollDirection.RightToLeft) { this._scrollingContainerLocation.x = -this._scrollingBounds.width; var moveRightDelegate = Function.createDelegate(this, this._moveRight); this._scrollingContainer.style.marginLeft = this._scrollingContainerLocation.x + "px"; this._scrollingTimer = setInterval(moveRightDelegate, this.get_scrollDuration()); }
    else if (this.get_scrollDirection() == $ADC.ScrollDirection.BottomToTop) { this._scrollingContainerLocation.y = this._itemContainerBounds.height; this._scrollingContainer.style.marginTop = this._scrollingContainerLocation.y + "px"; this._scrollingTimer = setInterval(Function.createDelegate(this, this._moveUp), this.get_scrollDuration()); }
    else if (this.get_scrollDirection() == $ADC.ScrollDirection.TopToBottom) { this._scrollingContainerLocation.y = -this._scrollingBounds.height; this._scrollingContainer.style.marginTop = this._scrollingContainerLocation.y + "px"; this._scrollingTimer = setInterval(Function.createDelegate(this, this._moveBottom), this.get_scrollDuration()); }
    this._itemContainer.style.visibility = "visible";
}, _moveLeft: function() {
    if (this._dontScroll)
        return; if (this._scrollingContainerLocation.x < -this._scrollingBounds.width) { var width = Sys.UI.DomElement.getBounds(this._itemContainer).width; this._scrollingContainer.style.marginLeft = width + "px"; this._scrollingContainerLocation.x = width; }
    else { this._scrollingContainerLocation.x -= this.get_scrollFps(); this._scrollingContainer.style.marginLeft = this._scrollingContainerLocation.x + "px"; } 
}, _moveUp: function() {
    if (this._dontScroll)
        return; if (this.get_scrollPadLock() != null) {
        if (this.get_scrollPadLock().locked)
            return; this.get_scrollPadLock().locked = true;
    }
    if (this._scrollingContainerLocation.y < -this._scrollingBounds.height) { var height = Sys.UI.DomElement.getBounds(this._itemContainer).height; this._scrollingContainer.style.marginTop = height + "px"; this._scrollingContainerLocation.y = height; }
    else { this._scrollingContainerLocation.y -= this.get_scrollFps(); this._scrollingContainer.style.marginTop = this._scrollingContainerLocation.y + "px"; }
    if (this.get_scrollPadLock() != null) { this.get_scrollPadLock().locked = false; } 
}, _moveBottom: function() {
    if (this._dontScroll)
        return; if (this.get_scrollPadLock() != null) {
        if (this.get_scrollPadLock().locked)
            return; this.get_scrollPadLock().locked = true;
    }
    if (this._scrollingContainerLocation.y > this._itemContainerBounds.height) { var height = this._scrollingBounds.height; this._scrollingContainer.style.marginTop = -this._scrollingBounds.height + "px"; this._scrollingContainerLocation.y = -this._scrollingBounds.height; }
    else { var y = this._scrollingContainerLocation.y; y = this._scrollingContainerLocation.y = y + this._scrollFps; this._scrollingContainerStyle.marginTop = y + "px"; }
    if (this.get_scrollPadLock() != null) { this.get_scrollPadLock().locked = false; } 
}, _moveRight: function() {
    if (this._dontScroll)
        return; if (this._scrollingContainerLocation.x > this._itemContainerBounds.width) { var width = this._scrollingBounds.width; this._scrollingContainer.style.marginLeft = -width + "px"; this._scrollingContainerLocation.x = -width; }
    else { this._scrollingContainerLocation.x += this.get_scrollFps(); this._scrollingContainer.style.marginLeft = this._scrollingContainerLocation.x + "px"; } 
}, _addTemplate: function(template, index, itemType, dataItem) {
    var controlElement = this.get_element(); var index; var resultTemplate; var templateString = template.toString(); do {
        index = templateString.search("{{"); if (index != -1) {
            var closeIndex = templateString.search("}}"); if (closeIndex != -1) {
                var inner = templateString.substring(index + 2, closeIndex); var modifiedInner = inner; for (var prop in dataItem) { while (modifiedInner.indexOf("Eval(" + prop + ")") != -1) { modifiedInner = modifiedInner.replace("Eval(" + prop + ")", "dataItem." + prop); } }
                try { modifiedInner = eval(modifiedInner); } catch (e) { modifiedInner = eval("modifiedInner"); }
                templateString = templateString.replace("{{" + inner + "}}", modifiedInner);
            } 
        } 
    } while (index != -1)
    template = templateString; var namingContainer = controlElement.id + '$' + itemType + '$' + index; var item = new $ADC.RepeaterItem(this, namingContainer, index, itemType, dataItem); var tempElement = document.createElement(controlElement.tagName); tempElement.innerHTML = template; var clickHandler; var firstChild; var isDataItemType = item.get_isDataItemType(); if (tempElement.firstChild) {
        while (tempElement.firstChild) {
            firstChild = tempElement.firstChild; if (itemType == $ADC.RepeaterItemType.Separator || itemType == $ADC.RepeaterItemType.Item || itemType == $ADC.RepeaterItemType.AlternatingItem) { this._scrollingContainer.appendChild(firstChild); }
            else if (itemType == $ADC.RepeaterItemType.Header) { this._headerElement.appendChild(firstChild); }
            else if (itemType == $ADC.RepeaterItemType.Footer) { this._footerElement.appendChild(firstChild); }
            if (isDataItemType) {
                clickHandler = Function.createCallback(this._raiseCommand, { sender: this, item: item }); if (firstChild.nodeType != 3) { $addHandler(firstChild, 'click', clickHandler); }
                handler = this.get_events().getHandler('itemMouseOver'); if (handler) { var mouseOverHandler = Function.createCallback(this._raiseMouseOver, { sender: this, item: item }); if (firstChild.nodeType != 3) { $addHandler(firstChild, 'mouseover', mouseOverHandler); } }
                handler = this.get_events().getHandler('itemMouseOut'); if (handler) { var mouseOutHandler = Function.createCallback(this._raiseMouseOut, { sender: this, item: item }); if (firstChild.nodeType != 3) { $addHandler(firstChild, 'mouseout', mouseOutHandler); } }
                Array.add(item._containers, firstChild); Array.add(item._commandHandlers, clickHandler);
            } 
        } 
    }
    if (isDataItemType) { this.get_items().push(item); }
    var handler; handler = this.get_events().getHandler('itemCreated'); if (handler) { handler(this, new $ADC.RepeaterItemEventArgs(item)); }
    handler = this.get_events().getHandler('itemDataBound'); if (handler) { handler(this, new $ADC.RepeaterItemEventArgs(item)); }
    if (isDataItemType) { } 
} 
}; $ADC.ExtendedRepeater.registerClass('AjaxDataControls.ExtendedRepeater', $ADC.Repeater); if (typeof (Sys) != 'undefined')
{ Sys.Application.notifyScriptLoaded(); }