/**
/* rotator.js
/*
/* @copyright: 2009 by Thomas M. Stambaugh & Zeetix, LLC (http://www.zeetix.com)
/* All rights reserved.
/*
/* The contents of this file may not be copied, duplicated, or used without the
/* written consent of Zeetix, LLC.
**/

/**
/* Rotator utilities
**/

var anArray = new Array()
anArray[0] = '&#8220;We recommend heartily the skills of Douglas Kitchen and Ambiance. They have been punctual, cheerful, and have shown an unrelenting commitment to excellence.&#8221;<br/><span id="attribution">C.B., Greenwich, CT</span>';
anArray[1] = '&#8220;It is a pleasure to recommend you and Scott &#8212; you are both great to work with &#8212; truly professionals! Looking forward to many more projects together.&#8221;<br/><span id="attribution">L.S. &amp; D.S., Greenwich, CT</span>';
anArray[2] = '&#8220;You have an excellent crew; you and your crew were very professional, punctual and very pleasant to deal with.&#8221;<br/><span id="attribution">G.G &amp; O.G., Rye Brook, NY</span>';
anArray[3] = '&#8220;I am impressed by how solidly you stand behind your work.  I would be happy to recommend your services to anyone.&#8221;<br/><span id="attribution">C.A.F., Greenwich, CT</span>';
anArray[4] = '&#8220;I was amazed by how neat the workmen were and what care they took not to damage anything in the house and not to leave any mess behind at the end of the day.&#8221;<br/><span id="attribution">F.D., Greenwich, CT</span>';
anArray[5] = '&#8220;Douglas and his team were so polite, friendly and helpful. I would not hesitate to recommend Ambiance Painting to anyone; it was a pleasure working with them.&#8221;<br/><span id="attribution">F.D., Greenwich, CT</span>';
anArray[6] = '&#8220;So many friends have come by and complimented the work done on our house. So thank you for the wonderful job, but most of all thank you for making it all look so easy.&#8221;<br/><span id="attribution">F.D., Greenwich, CT</span>';
anArray[7] = '&#8220;I would not hesitate to recommend Ambiance Painting to anyone; it has been a pleasure working with you and your amazing team.&#8221;<br/><span id="attribution">F.D., Greenwich, CT</span>';
anArray[8] = '&#8220;Your entire team was excellent &#8212; the process was efficient and the work is beautiful &#8212; you&#8217;re doing great!&#8221;<br/><span id="attribution">Mr. &amp; Mrs. D., Stamford, CT</span>';
anArray[9] = '&#8220;We are delighted with you and your company and will be happy to tell everyone about you &#8212; but the work speaks for itself!&#8221;<br/><span id="attribution">Mr. &amp; Mrs. D., Stamford, CT</span>';
anArray[10] = '&#8220;You have the nicest guys working for you, and they did an outstanding job. It was a pleasure to have them here, and the place looks and feels like new.&#8221;<br/><span id="attribution">C.G.M., Wilton, CT</span>';
anArray[11] = '&#8220;The crew was just terrific.  Very polite, very nice to have in the house. They did an <span style="text-decoration: underline;">excellent</span> job!!  We hope to be using you again soon.  Thank you!&#8221;<br/><span id="attribution">Mrs. L., Greenwich, CT</span>',
anArray[12] = '&#8220;We thoroughly enjoyed your company and the whole experience was pleasant and fun.&#8221;<br/><span id="attribution">P.I., Westport, CT</span>';
anArray[13] = '&#8220;Anytime we have worked with you folks, everything has been totally, professionally perfect!&#8221;<br/><span id="attribution">Mrs. S., Old Greenwich, CT</span>';
anArray[14] = '&#8220;Our experience with Ambiance was delightful.  You are all talented and charming!&#8221;<br/><span id="attribution">C. R., Greenwich, CT</span>';
anArray[15] = '&#8220;Your staff was extremely pleasant and willing to go the extra mile to take the pressure off of whether &#8220;I selected the right people.&#8221; I am grateful that the job was done correctly.&#8221;<br/><span id="attribution">D.B., Stamford, CT</span>';
anArray[16] = '&#8220;Antonio was fantastic &#8212; he kept the job on track, the work area was always clean and neat and any concerns I had throughout were addressed and taken care of immediately.&#8221;<br/><span id="attribution">D.D., Glenville, CT</span>';

var anImageArray= new Array()
anImageArray[0] = new Image(); anImageArray[0].src = "/images/photos/image_01.jpg";
anImageArray[1] = new Image(); anImageArray[1].src = "/images/photos/image_02.jpg";
anImageArray[2] = new Image(); anImageArray[2].src = "/images/photos/image_03.jpg";
anImageArray[3] = new Image(); anImageArray[3].src = "/images/photos/image_04.jpg";
anImageArray[4] = new Image(); anImageArray[4].src = "/images/photos/image_05.jpg";
anImageArray[5] = new Image(); anImageArray[5].src = "/images/photos/image_06.jpg";
anImageArray[6] = new Image(); anImageArray[6].src = "/images/photos/image_07.jpg";
anImageArray[7] = new Image(); anImageArray[7].src = "/images/photos/image_08.jpg";
anImageArray[8] = new Image(); anImageArray[8].src = "/images/photos/image_09.jpg";
anImageArray[9] = new Image(); anImageArray[9].src = "/images/photos/image_10.jpg";
anImageArray[10] = new Image(); anImageArray[10].src = "/images/photos/image_11.jpg";
anImageArray[11] = new Image(); anImageArray[11].src = "/images/photos/image_12.jpg";
anImageArray[12] = new Image(); anImageArray[12].src = "/images/photos/image_13.jpg";
anImageArray[13] = new Image(); anImageArray[13].src = "/images/photos/image_14.jpg";
anImageArray[14] = new Image(); anImageArray[14].src = "/images/photos/image_15.jpg";
anImageArray[15] = new Image(); anImageArray[15].src = "/images/photos/image_16.jpg";

/**
 * loadSidebarTestimonial
 *
 * Load a randomly-chosen member of anArray into the sidebar.
 */
var TheSidebarTestimonialIndex;
function loadSidebarTestimonial() {
    var aSize = anArray.length;
    var aRandomIndex = Math.floor(Math.random()*aSize);
    //Make sure it changes each time.
    while (aRandomIndex == TheSidebarTestimonialIndex || aRandomIndex < 0 || aRandomIndex >= aSize) {
        aRandomIndex = Math.floor(Math.random()*aSize);
        }
    TheSidebarTestimonialIndex = aRandomIndex;
    var aTestimonial = anArray[aRandomIndex];
    document.getElementById('testimonial').innerHTML = aTestimonial;
}

/**
 * loadSidebarImage
 *
 * Load a randomly-chosen image into the sidebar.
 */
var TheSidebarImageIndex;
function loadSidebarImage() {
    var aSize = anImageArray.length;
    var aRandomIndex = Math.floor(Math.random()*aSize);
    while (aRandomIndex == TheSidebarImageIndex || aRandomIndex < 0 || aRandomIndex >= aSize) {
        //Make sure it changes each time.
        aRandomIndex = Math.floor(Math.random()*aSize);
        }
    TheSidebarImageIndex = aRandomIndex;
    document.getElementById('contentRightSidebarImage').src = anImageArray[aRandomIndex].src;
}
