﻿

var scrollSpeedBG = 20;
var stepBG = 1;
var currentBG = 0;
var imageWidthBG = 1644;
var headerWidthBG = 548;


var restartPositionBG = -(imageWidthBG - headerWidthBG);
var ScrollBG = document.getElementById('ScrollBG');
function scrollMain() {

    currentBG -= stepBG;


    if (currentBG == restartPositionBG) {
        currentBG = 0;
    }

    ScrollBG.style.backgroundPosition = currentBG + "px 0";


    //                $('#Scroll').css("background-position", current1 + "px 0");
}

var initBG = setInterval("scrollMain()", scrollSpeedBG);




//            var scrollSpeed1 = 25;
//            var step1 = 1;
//            var current1 = 0;
//            var imageWidth1 = 1644;
//            var headerWidth1 = 548;


//            var restartPosition1 = -(imageWidth1 - headerWidth1);

//            function scrollBg1() {

//                current1 -= step1;


//                if (current1 == restartPosition1) {
//                    current1 = 0;
//                }

//                document.getElementById('Scroll').style.backgroundPosition = current1 + "px 0";


////                $('#Scroll').css("background-position", current1 + "px 0");
//            }


//            var init1 = setInterval("scrollBg1()", scrollSpeed1);



//            var scrollSpeed2 = 10;
//            var step2 = 1;
//            var current2 = 0;
//            var imageWidth2 = 1644;
//            var headerWidth2 = 548;


//            var restartPosition2 = -(imageWidth2 - headerWidth2);

//            function scrollBg2() {

//                current2 -= step2;


//                if (current2 == restartPosition2) {
//                    current2 = 0;
//                }

//                document.getElementById('Scroll2').style.backgroundPosition = current2 + "px 0";


//                //                $('#Scroll').css("background-position", current1 + "px 0");
//            }


//            var init2 = setInterval("scrollBg2()", scrollSpeed2);


            var scrollSpeed1 = 20;
            var step1 = 1;
            var current1 = -1096;
            var imageWidth1 = 1644;
            var headerWidth1 = 548;


            //var restartPosition1 = -(imageWidth1 - headerWidth1);
            var Scroll1 =  document.getElementById('Scroll');
            function scrollBg1() {

                current1 += step1;


                if (current1 == 0) {
                    current1 = -1096;
                }

                Scroll1.style.backgroundPosition = current1 + "px 0";
//              $('#Scroll2').css("background-position", current2 + "px 0");
            }
             

            var init2 = setInterval("scrollBg1()", scrollSpeed1);




            var scrollSpeed2 = 1;
            var step2 = 1;
            var current2 = -1096;
            var imageWidth2 = 1644;
            var headerWidth2 = 548;


            //var restartPosition1 = -(imageWidth1 - headerWidth1);

            var scroll2 = document.getElementById('Scroll2');

            function scrollBg2() {

                current2 += step2;


                if (current2 == 0) {
                    current2 = -1096;
                }

                scroll2.style.backgroundPosition = current2 + "px 0";
                //              $('#Scroll2').css("background-position", current2 + "px 0");
            }


            var init2 = setInterval("scrollBg2()", scrollSpeed2);

