function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	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 + ")";
}

function shiftOpacity(id, millisec) {
	//if an element is invisible, make it visible, else make it ivisible
	if(document.getElementById(id).style.opacity == 0) {
		opacity(id, 0, 100, millisec);
	} else {
		opacity(id, 100, 0, millisec);
	}
}

function blendimage(divid, imageid, imagefile, millisec) {
	var speed = Math.round(millisec / 100);
	var timer = 0;
	
	//set the current image as background
	document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")";
	
	//make image transparent
	changeOpac(0, imageid);
	
	//make new image
	document.getElementById(imageid).src = imagefile;

	//fade in image
	for(i = 0; i <= 100; i++) {
		setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed));
		timer++;
	}
}

function currentOpac(id, opacEnd, millisec) {
	//standard opacity is 100
	var currentOpac = 100;
	
	//if the element has an opacity set, get it
	if(document.getElementById(id).style.opacity < 100) {
		currentOpac = document.getElementById(id).style.opacity * 100;
	}

	//call for the function that changes the opacity
	opacity(id, currentOpac, opacEnd, millisec)
}



var item=new Array()
item[0]="<h3><font color='#148aba'>Sarah Knill</font><br /><i>Regional Sales Manager, Toronto, ON</i></h3><p>Eminent Fitness has not only helped me to achieve my fitness goals but has helped me to uncover a new found passion for fitness. Eminent Fitness practices the ideal balance between working hard and having fun doing so.</p><br />"
item[1]="<h3><font color='#148aba'>Samantha Peppard</font><br /><i>Teacher, Charlotte, NC</i></h3><p>I am a 34 year old single mother of a very active little boy. I started working out on a regular basis in September of 2007 on my own. I had lost 15 pounds on my own but knew that in order to lose more, and to condition my body in the correct manner, I needed help. I started working with Eminent Fitness in January of 2008, and the difference in my physical appearance, as well as my mental health, became vastly different. I have lost a total of 30 pounds now and my body is in the best shape it has ever been. <br />Eminent Fitness has taught me how to push myself to achieve the correct results for my body. I feel so much better about myself and would not be where I am today without the proper training. I could not have done this on my own and I owe a great deal to Eminent Fitness. <br />I am not one to boast or brag about myself or anyone else, but I will with regards to Eminent Fitness and on my outward appearance. With hard work and the correct mindset, you can change the way the world sees you!</p><br />"
item[2]="<h3><font color='#148aba'>Leron McCoy</font><br /><i>NFL- Houston Texans, Phoenix, AZ</i></h3><p>Being an athlete that competes at a high level day in and day out, I have learned how to push my body to the max in order to recieve optimal results. After working out with Eminent Fitness during an offseason, I easily catapalted my overall physicality to the next level.</p><br />"
item[3]="<h3><font color='#148aba'>Doug Letendre</font><br /><i>Planet Fitness Franchisee, Charlotte, NC</i></h3><p>Since the inception Eminent Fitness, I have been overly impressed with the knowledge and time the staff puts in to each indivdual client, and best of all, Eminent Fitness does it in a way that truly follows the Planet Fitness motto, 'Judgement Free.' Eminent Fitness has made an immediate impact within the club and is revolutionizing how 1-on-1 personal coaching will be taught for years to come.</p><br />"
var current=0

var ns6=document.getElementById&&!document.all

function changeItem(){
	opacity("div1", 0,100,750);
	if(document.layers){
		document.layer1.document.write(item[current])
		document.layer1.document.close()
		}
	if(ns6)document.getElementById("div1").innerHTML=item[current]
		{
		if(document.all){
			div1.innerHTML=item[current]
			}
		}

	if (current==8) {
		current=0
		}
	else 
		current++
		setTimeout("changeItem();",25000)
		}

	
window.onload=changeItem
//-->

