// Begin Header portion of the script
// CodeAve.com JavaScript SlideShow
// Created from the JavaScript SlideShow ScriptWriter
// http://www.codeave.com


// List all the pictures in the slideshow here
var pictures = new Array
(
	"image1.jpg" 
	,"image2.jpg" 
	,"image3.jpg" 
	,"image4.jpg" 
	,"image5.jpg" 
	,"image6.jpg" 
	,"image7.jpg" 
	,"image8.jpg" 
);


// List all quotes in the slidesshow here. 
// Start each quote with a " and end with a " (the first and last do not display!)
// Use <br> for line breaks.
// Use &quot; for quotes;
// ef 7-29-09: removed 'and President' text from quotes; removed 'Elect' from Biden's quote
var quotes = new Array
(
	"&quot;A child who reaches age 21 without smoking, abusing alcohol or using drugs is virtually certain never to do so.&quot;<br><br> - Joseph A. Califano, Jr., CASA Chairman"
	,
	"&quot;The work you are doing at The National Center on Addiction and Substance Abuse to inform Americans of the economic and social costs of substance abuse and its impact on their lives is very important for our society.&quot;<br><br> - Senator George V. Voinovich, Ohio"
	,
	"&quot;CASA remains the only national organization that brings together all the professional disciplines needed to combat abuse of all substances in all sectors of society.&quot;<br><br> - Joseph A. Califano, Jr., CASA Chairman"
	,
	"&quot;I am grateful to you and everyone at CASA for your contributions to the fight against this national epidemic, and for your efforts in helping all Americans lead safe and healthy lives.&quot;<br><br> - New York City Mayor Michael R. Bloomberg"
	,
	"&quot;The Center's efforts to develop ways to combat addiction have been truly heroic and I hope you continue your important work.&quot;<br><br> - U.S. Rep. Charles B. Rangel"
	,
	"&quot;The more often teens eat dinner with their parents, the less likely they are to smoke, drink or use illicit drugs.&quot;<br><br> - Joseph A. Califano, Jr., CASA Chairman"
	,
	"&quot;What an enormous and vital job you and your colleagues have undertaken! It fills me with pride to learn more and more about your innovative dedication, discoveries and successes.&quot;<br> - Lady Bird Johnson, wife of former President Lyndon B. Johnson"
	,
	"&quot;Thank you for all of your efforts to strengthen our families not only in California, but also across the country. Your work is noble.&quot;<br><br> - California's First Lady Maria Shriver"
	,
	"&quot;Without freedom from addiction, there is no freedom.&quot;<br><br> - Joseph A. Califano, Jr., CASA Chairman"
	,
	"&quot;I congratulate Joe Califano and CASA for continuing to bring attention to the drug problem in this country and I look forward to working with him on this important issue.&quot;<br><br> - Joe Biden, Vice President of the United States of America"
	,
	"&quot;[Ten years after its beginning], CASA remains a national leader in offering a comprehensive approach to fighting drugs and alcohol abuse in all sectors of our society.&quot;<br><br> - George W. Bush, President of the United States of America"
	,
	"&quot;Parents are the most potent and underused tool in preventing substance abuse.&quot;<br><br> - Joseph A. Califano, Jr., CASA Chairman"
)

var picture_num = 0;
var current_picture = new Image();
current_picture.src = pictures[picture_num];

var quote_num = 0;
var current_quote = "";
current_quote = quotes[quote_num];

var picEffect = new fx.Opacity($('rotating_picture'), {duration:500});
var quoteEffect = new fx.Opacity($('homeHeaderText'), {duration:500});

function start_show() 
{
	$('rotating_picture').src = current_picture.src;

	Element.update('homeHeaderText', current_quote);
		
	// Time is in seconds X 1000
	setInterval("slideshow()", 10000);
	setTimeout("setInterval('quoteshow()', 10000);", 5000);
}

function slideshow() 
{
	picEffect.toggle();
	
	picture_num++;
	if (picture_num == pictures.length) 
	{
		picture_num = 0;
	}
	current_picture.src = pictures[picture_num];
	
	setTimeout("$('rotating_picture').src=current_picture.src;picEffect.toggle();", 666);
}

function quoteshow()
{
	quoteEffect.toggle();
	
	quote_num++;
	if (quote_num == quotes.length) 
	{
		quote_num = 0;
	}
	current_quote = quotes[quote_num];
	
	setTimeout("Element.update('homeHeaderText', current_quote );quoteEffect.toggle();", 1000);
}

// End of header portion of script -->

window.onload = start_show;
