var maxSlides = 11;
var currentSlide = 1;
var prevSlide;
var nextSlide;


//This is the array that holds the information specific to each poster.
//The order of each dataitem is as follows:
//	1)Name of large poster filename(excluding extension)
//	2)Name of small poster filename(excluding extension)
//	3)Title
//	4)Quote
var finalistData = new Array( 
 new Array ( "Boomers-Bus-slide-1", "Boomers-Bus-slide-1", "<br><br>REMEMBER WHEN YOU WANTED TO CHANGE THE WORLD?<br><br>YOU STILL CAN!", "<br>"),
 new Array ( "Photo-slide-2", "Photo-slide-2", "WE’RE CHANGING THE WORLD!", "<p>We Baby Boomers are a unique generation. We always have been. </p><p>We're individualistic, diverse and here in this world to make a difference. </p><p>Today, millions of men and women are doing just that in a way we might never have envisioned when we were young: as members of local Lions Clubs. </p><p>All around the globe we're achieving an aim many of us shared since that extraordinary era when we came of age. We're changing the world. </p>"),
 new Array ( "Photo-slide-3", "Photo-slide-3", "WE SERVE...LIKE NEVER BEFORE", "<p>Wherever we've gone, we Baby Boomers have brought change. Today we're changing what it means to be Lions. </p><p>We total more than 1.3 million members in 45,000 local clubs in nearly 200 countries.</p><p>We're making it all happen with new kinds of clubs and new ways to volunteer. And we're providing our members with new opportunities to make a real and personal impact in key areas of community development, youth and health.</p><p>Today, we're a new generation of Lions and we're serving like never before.</p>"),
 new Array ( "Photo-slide-4", "Photo-slide-4", "BUILDING COMMUNITY", "<p>Although we Lions are organized as clubs, we are not preoccupied with our own internal doings. On the contrary, when we talk about involvement, we're referring to the kind that looks outward and helps others. </p><p>Every day, all over the world, our members are out in their local communities working as advocates, fundraisers and hands-on volunteers. </p><p>We Baby Boomers know how much our communities have given to us over the years. Today, as Lions, we're giving back. </p><p>Some of our projects include:<br>Food drives, temporary shelter, health clinics, schools, vision screenings, affordable housing and environmental preservation. </p>"),
 new Array ( "Photo-slide-5", "Photo-slide-5", "HELPING THE YOUNG", "<p>When we were growing up, we wanted to make the world a better place. Today's young people have the same dream, and as Lions we're trying to make it come true. </p><p>Our members are involved in efforts to provide children with food, shelter, clothing, education and healthcare. </p><p>The world's children are its future. At Lions Clubs International, we are working to help their generation achieve something that thus far has eluded ours: the goal of world peace. </p>"),
 new Array ( "Photo-slide-6", "Photo-slide-6", "ADVANCING WORLD HEALTH", "<p>We Lions have long been recognized as world leaders in the effort to prevent blindness and assist the visually impaired. Every year our members provide more than 600,000 glaucoma screenings, fund more than 25,000 corneal transplants, and redistribute more than 6,000,000 pairs of eyeglasses. </p><p>We're also funding the construction of hospitals and clinics, building water treatment facilities, delivering disaster relief, and fighting diabetes and other diseases. </p><p>As a result, we're helping communities worldwide become more progressive, and productive places to live. By improving the quality of health, we're improving the quality of life. </p>"),
 new Array ( "Photo-slide-7", "Photo-slide-7", "EXPLORING, LEARNING, GROWING", "<p>Involvement, accomplishment, and satisfaction...these alone would make Lions membership worthwhile. But it offers yet another dimension, something that for many of us has become increasingly important: the opportunity to pursue our own personal growth. </p><p>Through our Lions Clubs, we experience the personal satisfaction of turning belief into action and action into impact. We also enhance our own wellness...recent studies have shown that volunteering can lead to stronger immunity, better health and greater longevity.</p><p>We Baby Boomers are blessed with the opportunity to improve the lives of others, and as a bonus, to improve our own. </p>"),
 new Array ( "Photo-slide-8", "Photo-slide-8", "OUR MOTTO: <br>&quot;We Serve&quot;", "<p><b>OUR MISSION:</b><br>To create and foster a spirit of understanding among all people for humanitarian needs by providing voluntary services through community involvement and international cooperation.</p>"),
 new Array ( "Photo-slide-9", "Photo-slide-9", "LIONS CLUBS INTERNATIONAL FOUNDATION", "<p>LCIF is the grant-making arm of our organization. Each year LCIF awards more than $US35million in grants, most of it raised by our members. These funds enable our clubs to serve their communities by supporting such causes as disaster relief, health care, youth programs, schools, and affordable housing.</p>"),
 new Array ( "Photo-slide-10", "Photo-slide-10", "SIGHTFIRST", "<p>SightFirst is our most aggressive effort to improve eye health. Through this unprecedented effort, our members have raised more than $US200 million to fight the world's major causes of preventable vision loss: cataract, trachoma, river blindness, glaucoma, and diabetic eye disease.</p><p>Working with health care experts, governments, and other organizations, we have performed nearly 3.5 million cataract surgeries, built or expanded more than 150 eye hospitals, provided nearly 50 million treatments to prevent river blindness, and improved the eye care infrastructure in more than 75 countries. </p>"),
 new Array ( "Photo-slide-11", "Photo-slide-11", "WE’RE THE NEW GENERATION OF LIONS-JOIN US TODAY.", "<p>For information on membership opportunities or to get in touch with a local Lions Club, contact us online at <a href='mailto:boomers@lionsclubs.org'>boomers@lionsclubs.org </a> or by phone at 630.571.5466, ext. 522.</p><p>Send mail inquiries to: <br>Lions Clubs International <br>New Clubs and Marketing Dept. <br>300 W. 22nd St . <br>Oak Brook , IL USA 60523 </p><p><img src='images/bbussm.jpg' width='130' height='119'></p><p>Boomers Make a Difference!</p>")
 );

function pageLoad()
{
	var object = document.getElementById("SmPosterPhoto");
	object.src="images/posterssml/" + finalistData[currentSlide - 1][1] + ".jpg";
	var object = document.getElementById("title");
	object.innerHTML = finalistData[currentSlide - 1][2];
	var object = document.getElementById("quote");
	object.innerHTML = finalistData[currentSlide - 1][3];
}

function moveNext()
{
	currentSlide++;
	if(currentSlide > maxSlides)
	{
		currentSlide = 1;
		prevSlide = maxSlides;
		nextSlide = currentSlide + 1;
	}
	else
	{
		prevSlide = currentSlide - 1;
		if(currentSlide == maxSlides)
		{
			nextSlide = 1;
		}
		else
		{
			nextSlide = currentSlide + 1;
		}
	}
	var object = document.getElementById("current");
	object.innerHTML = currentSlide;
	var object = document.getElementById("SmPosterPhoto");
	object.src="images/posterssml/" + finalistData[currentSlide - 1][1] + ".jpg";
	var object = document.getElementById("title");
	object.innerHTML = finalistData[currentSlide - 1][2];
	var object = document.getElementById("quote");
	object.innerHTML = finalistData[currentSlide - 1][3];
}

function movePrev()
{
	currentSlide--;
	if(currentSlide < 1)
	{
		currentSlide = maxSlides;
		prevSlide = currentSlide - 1;
		nextSlide = 1;
	}
	else
	{
		prevSlide = currentSlide - 1;
		nextSlide = currentSlide + 1;
	}
	var object = document.getElementById("current");
	object.innerHTML = currentSlide;
	var object = document.getElementById("SmPosterPhoto");
	object.src="images/posterssml/" + finalistData[currentSlide - 1][1] + ".jpg";
	var object = document.getElementById("title");
	object.innerHTML = finalistData[currentSlide - 1][2];
	var object = document.getElementById("quote");
	object.innerHTML = finalistData[currentSlide - 1][3];
}

function openLargePoster()
{
	window.open('largePoster.htm?filename='+finalistData[currentSlide - 1][0],'lrgposterwin','toolbar=no,resizable=no,width=775,height=500');
}

function loadLargePoster()
{
	var URL = document.URL;
	var trimLoc = URL.indexOf('filename=');
	var object = document.getElementById("lgPosterPhoto");
	object.src = 'images/posterslrg/' + URL.substring(trimLoc+9)+'.jpg';
	//alert(URL.substring(trimLoc+9));
	
}