
var element = document.getElementById("quotes"); /* Get the DOM element to display */
var duration = 1500;  /* 1500 millisecond fade = 1.5 seconds */
var steps = 20;       /* number of opacity intervals   */
var delay = 8000;     /* 8 second delay before fading out */

/* set the opacity of the text */
function setOpacity(level) {
    element.style.opacity = level;
    element.style.MozOpacity = level;
    element.style.KhtmlOpacity = level;
    element.style.filter = "alpha(opacity=" + (level * 100) + ");";
  }

/* Fade in first; call the showQuote function; then call the fadeOut function */ 
function fadeIn()
{
  for ( i = 0; i <= 1; i += ( 1 / steps ) )
	{
	 	setTimeout( "setOpacity(" + i + ")", i * duration );
  }
	showQuote();
  setTimeout( "fadeOut()", delay );
}

/* Fades out the text - then calls the fadeIn function to loop infinitely */
function fadeOut()
{
  for ( i = 0; i <= 1; i += ( 1 / steps ) )
  {
    setTimeout( "setOpacity(" + (1 - i) + ")", i * duration );
  }
  setTimeout( "fadeIn()", duration );
}

  /* Create ARRAY to display; add, update or change "quotes" here */
var quote = new Array();
  quote[0]='If you would like to be empowered to help yourself, your family, friends, acquaintances, associates, and a seeking community in the pursuit of optimum health &amp; wellness,'; 
  quote[1]='If you have health concerns and are dissatisfied with the results or lack of results you are getting using traditional medicine,';
  quote[2]='If you are seeking answers, but find yourself overwhelmed with the abundance of information and your ability to discern the difference between scientifically proven data, opinion and hearsay,';
  quote[3]='If you are willing to invest in your wellness regardless of insurance approval or cooperation,';
  quote[4]='If you are willing to be an active participant in your wellness program, to make recommended changes in your diet & lifestyle, and to hold yourself accountable,';
  quote[5]='If you recognize the need for and the benefit of supplementation because it is an essential component in maintaining and restoring health,';
  quote[6]='If you are willing to pursue knowledge in support of your objective of health & wellness,';
  quote[7]='If you would be interested in collaborating with like-minded people to create a Culture based on proven scientific data,';
  quote[8]='Then the information found on this Web Site will serve you in your endeavor.';

/* Set the first quote to quote[0] */
var q = 0;

/* Loop through each quote array element */
function showQuote() 
{
 	document.getElementById( "quotes" ).innerHTML = quote[q];
 	q++;
	if( q == quote.length )
	{
 	 	q = 0;
	}
}

/* Start the fading text! */
fadeIn();

