  

//////////////////////////////TESTIMONIALS///////////////////////////////////

function testi_timer(){
    current++;
    if(current < 0 || current >= count){
        current = 0;
    }
    document.getElementById("testimo").innerHTML = testimonials[current].body;
    
    setTimeout('testi_timer(testimonials,count)', 10000);
}

function testi_timer_landing(){
    current_1++;
    current_2++;
    
    if(current_1 < 0){
        current_1 = count - 1;
    } else if (current_1 >= count){
        current_1 = 0;
    }
    if(current_2 < 0){
        current_2 = count - 1;
    } else if (current_2 >= count){
        current_2 = 0;
    }
    
    document.getElementById("testimo_1").innerHTML = testimonials[current_1].body;
    document.getElementById("testimo_2").innerHTML = testimonials[current_2].body;
    
    setTimeout('testi_timer_landing(testimonials,count)', 10000);
}

function testi(dir){
    if(dir == 2){
        current++;
    }else{
        current--;
    }
    if(current < 0 || current >= count){
        current = 0;
    }
    document.getElementById("testimo").innerHTML = testimonials[current].body;
}

function testi_landing(dir){
    if(dir == 2){
        current_1++;
        current_2++;
    }else{
        current_1--;
        current_2--;
    }
    
    if(current_1 < 0){
        current_1 = count - 1;
    } else if (current_1 >= count){
        current_1 = 0;
    }
    if(current_2 < 0){
        current_2 = count - 1;
    } else if (current_2 >= count){
        current_2 = 0;
    }
    
    document.getElementById("testimo_1").innerHTML = testimonials[current_1].body;
    document.getElementById("testimo_2").innerHTML = testimonials[current_2].body;
}

