<script type=
"text/javascript"
>
function
pageLoad(sender, args) {
// assign the tab
window.tabs = $find(
"<%= Tabs1.ClientID%>"
);
// check if tab exists
if
(tabs) {
// if it does loop through all tabs
for
(
var
i = 0; i < tabs.get_tabs().get_count(); i++) {
// get tab item, 1 at a time
var
tab = tabs.get_tabs().getItem(i);
// if value of tab matches, make it invisible
if
(tab.get_value() ==
"13"
) tab.set_visible(
false
);
else
tab.set_visible(
true
);
}
}
}
var
$T = Telerik.Web.UI;
$T.TabScroller.prototype._scrollTab =
function
(e) {
var
that =
this
;
var
roundingCompensation = 1;
var
visibleRight =
this
._currentPosition +
this
._scrolledElement[
this
._offsetSizeField];
var
scrollSize;
var
tabs =
this
._owner.get_tabs().toArray();
var
nextPosition;
var
size = 0;
if
($(e.target).is(
".rtsNextArrow"
)) {
visibleRight += roundingCompensation;
$.each(tabs,
function
(_, tab) {
if
($telerik.isIE8) {
size += parseFloat($(tab.get_element()).css(that._sizeProperty));
}
else
{
if
(that._sizeProperty ==
"width"
) {
size += parseFloat(tab.get_element().getBoundingClientRect().width);
}
else
{
size += parseFloat($telerik.getComputedStyle(tab.get_element(), that._sizeProperty));
}
}
return
Math.floor(size) <= visibleRight;
});
nextPosition = size -
this
._scrolledElement[
this
._offsetSizeField];
}
else
{
scrollSize =
this
._scrolledElement[
this
._scrollSizeField] + roundingCompensation;
$.each(tabs.reverse(),
function
(_, tab) {
if
($telerik.isIE8) {
size += parseFloat($(tab.get_element()).css(that._sizeProperty));
}
else
{
if
(that._sizeProperty ==
"width"
) {
size += parseFloat(tab.get_element().getBoundingClientRect().width);
}
else
{
size += parseFloat($telerik.getComputedStyle(tab.get_element(), that._sizeProperty));
}
}
return
visibleRight <= (scrollSize - Math.floor(size));
});
nextPosition = scrollSize - (size +
this
._scrolledElement[
this
._offsetSizeField]);
}
nextPosition = Math.round(Math.max(nextPosition,
this
._minPosition));
nextPosition = Math.round(Math.min(nextPosition,
this
._maxPosition));
this
._scrollTo(nextPosition);
}
</script>