﻿//scroller_currentSlot2 = 0;
//scroller_targetLeft2 = 0;
//scroller_currentLeft2 = 0;
//scroller_isMoving2 = false;
//scroller_maxSlot2 = 0;
//scroller_maxLeft2 = 0;

//scroller_currentSlot3 = 0;
//scroller_targetLeft3 = 0;
//scroller_currentLeft3 = 0;
//scroller_isMoving3 = false;
//scroller_maxSlot3 = 0;
//scroller_maxLeft3 = 0;

//scroller_currentSlot1 = 0;
//scroller_targetLeft1 = 0;
//scroller_currentLeft1 = 0;
//scroller_isMoving1 = false;
//scroller_maxSlot1 = 0;
//scroller_maxLeft1 = 0;


//scroller_step1 = function() {
//    if (scroller_currentLeft1 == scroller_targetLeft1) {
//        scroller_isMoving1 = false;
//        return;
//    }
//    
//    scroller_isMoving1 = true;
//    var distance = Math.round((scroller_targetLeft1 - scroller_currentLeft1) / 3);
//    scroller_currentLeft1 = scroller_currentLeft1 + distance;

//    if (scroller_currentLeft1 < scroller_maxLeft1) 
//        scroller_currentLeft1 = scroller_maxLeft1;

//    var scroller1 = document.getElementById("scroller1");
//    scroller1.style.left = scroller_currentLeft1 + "px";

//    if (distance != 0) 
//        setTimeout("scroller_step1()", 50);
//    else
//        scroller_isMoving1 = false; 
//}

//bumpBrowserRight1 = function() {
//    if (scroller_currentSlot1 >= scroller_maxSlot1 - 3)
//        return;

//    scroller_targetLeft1 = ++scroller_currentSlot1 * -148;
//    
//    if (scroller_targetLeft1 < scroller_maxLeft1)
//        scroller_targetLeft1 = scroller_maxLeft1;

//    if (!scroller_isMoving1)
//        scroller_step1();
//}

//bumpBrowserLeft1 = function() {
//if (scroller_currentSlot1 <= 0) 
//    return;
//    
//    scroller_targetLeft1 = --scroller_currentSlot1 * -148;

//    if (scroller_targetLeft1 > 0) 
//        scroller_targetLeft1 = 0;

//    if (!scroller_isMoving1) 
//        scroller_step1();
//};




//scroller_step2 = function() {
//    if (scroller_currentLeft2 == scroller_targetLeft2) {
//        scroller_isMoving2 = false;
//        return;
//    }
//    
//    scroller_isMoving2 = true;
//    var distance = Math.round((scroller_targetLeft2 - scroller_currentLeft2) / 3);
//    scroller_currentLeft2 = scroller_currentLeft2 + distance;

//    if (scroller_currentLeft2 < scroller_maxLeft2) 
//        scroller_currentLeft2 = scroller_maxLeft2;

//    var scroller2 = document.getElementById("scroller2");
//    scroller2.style.left = scroller_currentLeft2 + "px";

//    if (distance != 0) 
//        setTimeout("scroller_step2()", 50);
//    else 
//        scroller_isMoving2 = false;
//}

//bumpBrowserRight2 = function() {
//    if (scroller_currentSlot2 >= scroller_maxSlot2 - 3)
//        return;

//    scroller_targetLeft2 = ++scroller_currentSlot2 * -148;

//    if (scroller_targetLeft2 < scroller_maxLeft2)
//        scroller_targetLeft2 = scroller_maxLeft2;

//    if (!scroller_isMoving2)
//        scroller_step2();
//}

//bumpBrowserLeft2 = function() {
//    if (scroller_currentSlot2 <= 0)
//        return;

//    scroller_targetLeft2 = --scroller_currentSlot2 * -148;

//    if (scroller_targetLeft2 > 0)
//        scroller_targetLeft2 = 0;

//    if (!scroller_isMoving2)
//        scroller_step2();
//}



//scroller_step3 = function() {
//    if (scroller_currentLeft3 == scroller_targetLeft3) {
//        scroller_isMoving3 = false;
//        return;
//    }
//    
//    scroller_isMoving3 = true;
//    var distance = Math.round((scroller_targetLeft3 - scroller_currentLeft3) / 3);
//    scroller_currentLeft3 = scroller_currentLeft3 + distance;

//    if (scroller_currentLeft3 < scroller_maxLeft3) 
//        scroller_currentLeft3 = scroller_maxLeft3;

//    var scroller3 = document.getElementById("scroller3");
//    scroller3.style.left = scroller_currentLeft3 + "px";

//    if (distance != 0) 
//        setTimeout("scroller_step3()", 50);
//    else 
//        scroller_isMoving3 = false;
//}

//bumpBrowserRight3 = function() {
//    if (scroller_currentSlot3 >= scroller_maxSlot3 - 3)
//        return;

//    scroller_targetLeft3 = ++scroller_currentSlot3 * -148;

//    if (scroller_targetLeft3 < scroller_maxLeft3)
//        scroller_targetLeft3 = scroller_maxLeft3;

//    if (!scroller_isMoving3)
//        scroller_step3();
//}

//bumpBrowserLeft3 = function() {
//    if (scroller_currentSlot3 <= 0)
//        return;

//    scroller_targetLeft3 = --scroller_currentSlot3 * -148;

//    if (scroller_targetLeft3 > 0) 
//        scroller_targetLeft3 = 0;

//    if (!scroller_isMoving3) 
//        scroller_step3();
//}

//clearBrowser = function() {
//    scroller_currentSlot2 = 0;
//    scroller_targetLeft2 = 0;
//    scroller_currentLeft2 = 592;
//    scroller_isMoving2 = false;
//    scroller_maxSlot2 = 0;
//    scroller_maxLeft2 = 0;

//    scroller_currentSlot3 = 0;
//    scroller_targetLeft3 = 0;
//    scroller_currentLeft3 = 592;
//    scroller_isMoving3 = false;
//    scroller_maxSlot3 = 0;
//    scroller_maxLeft3 = 0;

//    scroller_currentSlot1 = 0;
//    scroller_targetLeft1 = 0;
//    scroller_currentLeft1 = 592;
//    scroller_isMoving1 = false;
//    scroller_maxSlot1 = 0;
//    scroller_maxLeft1 = 0;

//    document.getElementById("scroller1").style.left = "592px";
//    document.getElementById("scroller2").style.left = "592px";
//    document.getElementById("scroller3").style.left = "592px";

//    if (!scroller_isMoving1) {
//        scroller_step1();
//    }
//    if (!scroller_isMoving2) {
//        scroller_step2();
//    }
//    if (!scroller_isMoving3) {
//        scroller_step3();
//    }
//}

//browserDisplayTab = function(tab) {
//    new Ajax.Request("/Rewards/Browser.aspx?id=" + tab,
//        {
//            method: "post",
//            onSuccess: function(transport) {
//                document.getElementById("browser-container").innerHTML = transport.responseText;
//                document.getElementById("scroller1").style.left = "592px";
//                document.getElementById("scroller2").style.left = "592px";
//                document.getElementById("scroller3").style.left = "592px";
//                scroller_targetLeft1 = 0;
//                scroller_currentLeft1 = 592;
//                scroller_currentSlot1 = 0;
//                scroller_targetLeft2 = 0;
//                scroller_currentLeft2 = 592;
//                scroller_currentSlot2 = 0;
//                scroller_targetLeft3 = 0;
//                scroller_currentLeft3 = 592;
//                scroller_currentSlot3 = 0;                
//                
//                if (!scroller_isMoving1) {
//                    scroller_step1();
//                }
//                if (!scroller_isMoving2) {
//                    scroller_step2();
//                }
//                if (!scroller_isMoving3) {
//                    scroller_step3();
//                }
//            }
//        });
//};