﻿var fileArr = ["testimonial1.htm", "testimonial2.htm", "testimonial3.htm", "testimonial4.htm", "testimonial5.htm", "testimonial6.htm", "testimonial7.htm", "testimonial8.htm", "testimonial9.htm", "testimonial10.htm", "testimonial11.htm", "testimonial12.htm", "testimonial13.htm", "testimonial14.htm", "testimonial15.htm", "testimonial16.htm", "testimonial17.htm", "testimonial18.htm"]
var fileInx = 0;
function dispTestimonial() {
    document.getElementById("testimonials").innerHTML = getFile(fileArr[fileInx]);
    fileInx++;
    if (fileInx >= fileArr.length) fileInx = 0;
}

function getFile(fileName) {
    oxmlhttp = null;
    try {
        oxmlhttp = new XMLHttpRequest();
        oxmlhttp.overrideMimeType("text/xml");
    }
    catch (e) {
        try {
            oxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e) {
            return null;
        }
    }
    if (!oxmlhttp) return null;
    try {
        oxmlhttp.open("GET", fileName, false);
        oxmlhttp.send(null);
    }
    catch (e) {
        return null;
    }
    return oxmlhttp.responseText;
}

window.onload = setInterval("dispTestimonial()", 6000);



