var testimonials = new Array(
        new Array('&quot;...Tower was always approachable and all site-related issues were dealt with in a prompt and cost effective manner...&quot;', 'Senior Project Director, Boretta Construcion'), 
        new Array('&quot;...we were extremely satisfied with the personnel allocated to the various tasks by Tower Engineering Group, as each was fully qualified, very easy to deal with...&quot;', 'Chief Administration Officer, City of Dauphin'), 
        new Array('&quot;...You were always prompt and responsive to the various demands that the project presented. The experience and knowledge of your team was obvious, they were professional at all times and...&quot;', 'President, Hampton Inn &amp; Suites'), 
        new Array('&quot;...We found your staff to be very knowledgeable, experienced and excellent team players. Your ability to suggest cost effective and practical design solutions was invaluable...&quot;', 'V. President Construction, JTB Canadian Pork'), 
        new Array('&quot;...Without a question we would recommend the Tower Engineering Group to any community undertaking a construction project...&quot;', 'Warren Arena Project Building Committee')
    );
var TEMPLATE = '<p class="SmartQuote"><a href="testimonials.html">%quote%</a></p><p class="SmartQuoteCredit">%credit%</p>';

function initTestimonials() {
    generateTestimonial();
    setInterval("generateTestimonial()", 15000);
};

function generateTestimonial() {
    document.getElementById('Testimonial').innerHTML = insertQuoteIntoTemplate(TEMPLATE);
};

function insertQuoteIntoTemplate(template) {
    var rand = Math.floor(Math.random()*testimonials.length);
    return(template.replace('%quote%', testimonials[rand][0]).replace('%credit%', testimonials[rand][1]));
};
