
/*
var arrImages = new Array();

arrImages[0]="/images/01.jpg";
arrImages[1]="/images/02.jpg";
arrImages[2]="/images/03.jpg";
arrImages[3]="/images/04.jpg";
arrImages[4]="/images/05.jpg";
*/
var i = 0;
function showMe(i)
{	
	if(i >= arrTestimonial.length)
		i = 0;
	document.getElementById("testimonial").innerHTML = arrTestimonial[i];		

	opacity('testimonial', 20, 100, 2000);
	i = i + 1;	
	setTimeout("showMe(" + i + ")",7000);
}
cnt = 0;
function showImages(i)
{	
	if(cnt >= arrImages.length)
		cnt = 0;
	document.getElementById("detailImage").src = arrImages[cnt];		
	opacity('detailImage', 20, 100, 1000);
	cnt = cnt + 1;	
	setTimeout("showImages(" + cnt + ")",5000);
}


function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 50);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 