var sliderposition = 3;
var displayno = 3;

function slide() {
    var slidshowInner = document.getElementById('slidshowInner');

    if (slidshowInner != null) {
        var imgs = slidshowInner.getElementsByTagName("img");
        var itemcount = imgs.length;

        if (sliderposition >= itemcount) {
            $('#slidshowInner').animate({ "left": "0px" }, "fast");
            sliderposition = displayno;
        }
        else {
            $('#slidshowInner').animate({ "left": "-=153px" }, "fast");
            sliderposition++;
        }

        var width = document.getElementById("slidshowInner").style.width;
        if (width == '') {
            width = 3 * 153;
        }
        else {
            width = parseFloat(width.replace("px", "")) + 153;
        }
        document.getElementById("slidshowInner").style.width = width + "px";
    }
}

var sliderpositionT = 1;
var displaynoT = 1;

function slideT() {
    var tt = document.getElementById('testimonialInner');

    if (tt != null) {
        var td = tt.getElementsByTagName("td");
        var itemcounttt = td.length;

        if (sliderpositionT >= itemcounttt) {
            $('#testimonialInner').animate({ "left": "0px" }, "fast");
            sliderpositionT = displaynoT;
        }
        else {
            $('#testimonialInner').animate({ "left": "-=200px" }, "fast");
            sliderpositionT++;
        }

        var width = document.getElementById("testimonialInner").style.width;
        if (width == '') {
            width = 1 * 200;
        }
        else {
            width = parseFloat(width.replace("px", "")) + 200;
        }
        document.getElementById("testimonialInner").style.width = width + "px";
    }
}
function Load() {
    slide();
    slideT();


    setTimeout(function () { Load(); }, 5000);
}

window.onload = Load;
