
function adArray2() {
	for (i=0; i*3<adArray2.arguments.length; i++) {
		this[i] = new Object();
		this[i].src = adArray2.arguments[i*3];
		this[i].body = adArray2.arguments[i*3+1];
		this[i].name = adArray2.arguments[i*3+2];
	}
	this.length = i;
}

function getAdNum2(ads) {
	dat = new Date();
	dat = (dat.getTime()+"").charAt(2);
	if (dat.length == 1)
	{
		//number below is one less than the number of images in the array
		ad_num2 =  Math.round(Math.random()*(ads.length-1));
		
		if (ad_num2 == -1)
		{
		    ad_num2 =0;
		}
	}
	else
	{
		ad_num2 = 0;
	}
	return ad_num2;
}

function setCallOut2(ads2, testimonialBody, testimonialName, testimonialLogoImage)
{
    var ad_num2 = getAdNum2(ads2); 
   
    fillItem(ad_num2);

    setTimeout("rotateSponsor2()",10000);
}

function rotateSponsor2() {
	if (document.images) {
		//number below is one less than the number of images in the array
		ad_num2 += 1 // Math.round(Math.random()*20);
		
		if (ad_num2 >= this.ads2.length)
			ad_num2 = 0;
        
        fillItem(ad_num2);
        
		setTimeout("rotateSponsor2()",10000);
	}
}

function fillItem(ad_num2)
{
    testimonialBody.innerHTML = ads2[ad_num2].body;
    testimonialName.innerHTML = ads2[ad_num2].name;
    
    if (ads2[ad_num2].src != "")
    {
        testimonialLogoImage.style.display = 'inline';    
        testimonialLogoImage.src = ads2[ad_num2].src;
    }
    else
    {
        testimonialLogoImage.style.display = 'none';
    }
}

