var testimonials = new Array("testimonial1.gif", "testimonial2.gif", "testimonial3.gif", "testimonial4.gif", "testimonial5.gif", "testimonial6.gif", "testimonial7.gif");
var oldwhich = 3;
function randomizeimage()
{
var hardlinkpath = "http://www.debrisguards.com/";
var currenttests = new Array();
currenttests[0] = document.images.testbox1.src;
currenttests[1] = document.images.testbox2.src;
currenttests[2] = document.images.testbox3.src;

var whichtestimonial = Math.ceil(Math.random() * 3);

var nxtimage;
nxtimage = getrandomimage();
var nxtimagelng = hardlinkpath + "testimonials/" + nxtimage;

if (nxtimagelng != currenttests[0] && nxtimagelng != currenttests[1] && nxtimagelng != currenttests[2])
{
//  alert("nil: " + nxtimagelng + " 1: " + currenttests[0] + " 2: " + currenttests[1] + " 3: " + currenttests[2])
//  eval("document.images.testbox" + whichtestimonial + ".src = \"testimonials/\" + nxtimage");
  eval("document.images.testbox" + whichtestimonial + ".src = nxtimagelng");
  setTimeout("randomizeimage()", 5000);
}
else
{
  randomizeimage();
}

}

function getrandomimage()
{
var nexttestimonial = Math.ceil(Math.random() * testimonials.length) - 1;

var nexttestimonial = testimonials [nexttestimonial]; 
return nexttestimonial;
}


