/* Louis W. Adams, Jr.; March 28, 2009 */

window.onload = initAll;

/* Allocate variable names for global scope album data. */
var currImg = 0;
var fileName= "";
var titleText= "";
var captionText = new Array("")

/* All album photos are sequenced using lower case letters at the end of their names.  Add to array to have more photos, but extend the alphabetical sequence shown here. */
var LCLetter = new Array(
    "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","aa","ab","ac","ad"
)

/* Initialize album data. */
function initAll() {
    if (document.getElementById) {
    
        var x = document.getElementsByTagName('a');

        /* Find out which album is first on the list of links, and display it. */
        for (var i=0;i<x.length;i++) {
            if (x[i].className != 'album') continue;
            loadAlbum(x[i].id);
            break;
        }
        
        /* Display an album after the user clicks on an album link on the web page. */
        for (var i=0;i<x.length;i++) {
            if (x[i].className != 'album') continue;
            x[i].onclick = function() {
                loadAlbum(this.id);
                return false;
            }
        }
        
        /* Display the previous photo in album when the "Back" button is clicked. */
    	document.getElementById("AlbumBack").onclick = function() {
    		newSlide(-1); 
    	}
    	
    	/* Display the next photo in album when the "Next" button is clicked. */
    	document.getElementById("AlbumNext").onclick = function() {
    		newSlide(1); 
    	}
        
    }
    else {
        alert("Sorry.  Either the browser is using an old version of JavaScript that won't work here, or security software is blocking it.");
	}
}

/* Display next or previous photo and caption on web page. */
function newSlide(direction) {
	var imgCt = captionText.length;

	currImg = currImg + direction;
	if (currImg < 0) {
		currImg = imgCt-1;
	}
	if (currImg == imgCt) {
		currImg = 0;
	}
    loadPhotoAndCaption();
}

/* Load photo image and caption onto web page. */
function loadPhotoAndCaption() {
	document.getElementById("AlbumPhoto").src = "Shared/Image/Albums/" + fileName + LCLetter[currImg] + ".jpg";
	document.getElementById("AlbumText").innerHTML = (currImg+1) + "/" + captionText.length + ":  " + captionText[currImg];        
}

function loadAlbum(selectAlbum) {
    currImg = 0;            // Reset to first image number for album.
    captionText = [];       // Reset caption array to empty.    
    fileName= selectAlbum;  // Prefix for image file names.

    /* Load new album data.  This is the only place in this script to specify album information. Case order is unimportant. */
    switch(selectAlbum) {
        case "KudzuControl_10-07-24":
            titleText= "Kudzu Control (July 2010)";        

            captionText[0]= "Within a week after Rob Freeman and Bob Reynolds treated kudzu with the herbicide Milestone, it was clear which kudzu had been treated: untreated kudzu is its usual rich green, but the color of treated kudzu began to fade.";
            captionText[1]= "Some vines were clearly dead.  But was the entire plant, including the crown, dead?";
            captionText[2]= "Kudzu treated in the high ground above the parking area was dead, or dying.";
            captionText[3]= "Meanwhile, ground next to the propagation beds was cleared of kudzu and other material so Linda McHam and Don Crowder could put in the final strip of landscape fabric there.";
            captionText[4]= "Linda tilled the ground beneath the nearby trees to loosen it up for raking and cleanup.";
            captionText[5]= "Lou Adams began raking out the ground along a line, as shown in the photo.  This area will be a harbor from the hot summer sun.";
            captionText[6]= "It's remarkable how many rocks must be cleared from the ground on this site.";
            captionText[7]= "After Milestone had a chance to work on the kudzu for two weeks, Jason Bagwell of SCC bush-hogged the uncleared nursery ground and high ground above the parking area.  The photo shows part of the latter ground behind the sheds.  Two weeks earlier this ground was covered with kudzu.  We hope the kudzu is permanently gone, but we'll have to wait until the following spring to know for sure.";
            captionText[8]= "This is another photo of ground above our site cleared of kudzu and bush-hogged by Jason.  Kudzu debris litters the ground like straw.";
            captionText[9]= "By this time the treated kudzu on the periphery of our site was a crispy brown.  We plan to leave this kudzu alone, and evaluate the effect of the herbicide the following spring.";
            captionText[10]= "Now that Jason bush-hogged the uncleared nursery ground, we began the job of clearing the ground.  Here Peggy Romine rakes up dead kudzu, live weeds, rocks, and other lumpy material upon which we do not want to place landscape fabric.";
            captionText[11]= "But raking the hard ground was quite a challenge.  Bob Reynolds suggested shallowly tilling the ground to make it easier to rake, as shown in the photo.  Bob brought his tractor and tiller attachment to the site.";
            captionText[12]= "However, it was necessary to stop the tiller every few minutes to remove kudzu vines that had wrapped around the tiller rotor.  So Lou Adams and Bob raked loose dead kudzu vines off the ground to minimize work stoppages.  That worked very well.  The photo shows Bob taking his turn.";
            captionText[13]= "Here you can see the line of raked-up kudzu &quot;straw&quot; left of center, raked ground in the center, and tilled ground at the right.  Bob is raking in the far background.";
            captionText[14]= "Bob is about two-thirds finished tilling in this photo.  Before tilling, he turned on the irrigation sprinklers for about an hour, dampening the dry ground to keep down dust.";
            captionText[15]= "But that did not always work!";
            captionText[16]= "Watch that sprinkler-head pipe Bob!";
            captionText[17]= "Closeup of the tiller attachment on the tractor.  The lack of dragging vines shows our strategy of raking off vines paid off.";
            captionText[18]= "When Bob finished, the ground was substantially cleared of vegetation, and ready for a final raking.  Tilling pulled up most kudzu crowns, which Milestone weakened or killed.  Thanks Bob!  Photos by Lou Adams.";
            
            break;
        case "LandscapeEvaluation_10-06":
            titleText= "Landscape Evaluation (June 2010)";        

            captionText[0]= "First Place, Industry: <a href=http://www.smithdrug.com/>Smith Drug Company</a>.<br /><br />A list of volunteers who helped make this project a success is presented after the last photo, which is viewed now by clicking on the Back button below.";
            captionText[1]= "First Place, Industry: <a href=http://www.smithdrug.com/>Smith Drug Company</a>, continued.";
            captionText[2]= "First Place, Industry: <a href=http://www.smithdrug.com/>Smith Drug Company</a>, continued.";
            captionText[3]= "First Place, Public Service (Large): <a href=http://www.converse.edu/>Converse College</a>.";
            captionText[4]= "First Place, Public Service (Large): <a href=http://www.converse.edu/>Converse College</a>, continued.";
            captionText[5]= "First Place, Public Service (Small): <a href=http://www.sws-sssd.org/>Spartanburg Water System</a>.";
            captionText[6]= "First Place, Public Service (Small): <a href=http://www.sws-sssd.org/>Spartanburg Water System</a>, continued.";
            captionText[7]= "First Place, Public Service (Small): <a href=http://www.sws-sssd.org/>Spartanburg Water System</a>, continued.";
            captionText[8]= "First Place, Professional: Champion Investment Corporation.";
            captionText[9]= "First Place, Professional: Champion Investment Corporation, continued.";
            captionText[10]= "First Place, Professional: Champion Investment Corporation, continued.";
            captionText[11]= "First Place Tie, Commercial (Large): <a href=http://www.qs1.com/>QS/1</a>.";
            captionText[12]= "First Place Tie, Commercial (Large): <a href=http://www.qs1.com/>QS/1</a>, continued.";
            captionText[13]= "First Place Tie, Commercial (Large): <a href=http://www.qs1.com/>QS/1</a>, continued.";
            captionText[14]= "First Place Tie, Commercial (Large): <a href=http://www.qs1.com/>QS/1</a> Parking.";
            captionText[15]= "First Place Tie, Commercial (Large): <a href=http://www.qs1.com/>QS/1</a> Parking, continued.";
            captionText[16]= "First Place Tie, Commercial (Large): <a href=http://www.qs1.com/>QS/1</a> Parking, continued.";
            captionText[17]= "First Place, Commercial (Small): <a href=http://www.integralservices.com/>Integral Solutions Group</a>.";
            captionText[18]= "First Place, Commercial (Small): <a href=http://www.integralservices.com/>Integral Solutions Group</a>, continued.";
            captionText[19]= "First Place, Commercial (Small): <a href=http://www.integralservices.com/>Integral Solutions Group</a>, continued.";
            captionText[20]= "First Place, Commercial (Banks): <a href=http://www.firstcitizensonline.com/>First Citizens Bank</a> (East Henry Street).";
            captionText[21]= "First Place, Commercial (Banks): <a href=http://www.firstcitizensonline.com/>First Citizens Bank</a> (East Henry Street), continued.";
            captionText[22]= "First Place, Commercial (Banks): <a href=http://www.firstcitizensonline.com/>First Citizens Bank</a> (East Henry Street), continued.";
            captionText[23]= "First Place, Branch Libraries: <a href=http://www.infodepot.org/zLoc/WDFinfo.asp>Spartanburg County Library (Woodruff)</a>.";
            captionText[24]= "First Place, Branch Libraries: <a href=http://www.infodepot.org/zLoc/WDFinfo.asp>Spartanburg County Library (Woodruff)</a>, continued.";
            captionText[25]= "First Place, Branch Libraries: <a href=http://www.infodepot.org/zLoc/WDFinfo.asp>Spartanburg County Library (Woodruff)</a>, continued.";
            captionText[26]= "First Place, Apartments/Hotels/Motels: <a href=http://www.parkplaceapthomes.com/>Park Place Apartments</a>.";
            captionText[27]= "First Place, Apartments/Hotels/Motels: <a href=http://www.parkplaceapthomes.com/>Park Place Apartments</a>, continued.";
            captionText[28]= "First Place, Apartments/Hotels/Motels: <a href=http://www.parkplaceapthomes.com/>Park Place Apartments</a>, continued.<br /><br /><a href=LandscapeEvaluation.html>The Landscape Evaluation Committee</a> of Spartanburg Men's Garden Club consists of Marlene & Frank Falk.  This year the people who evaluated and photographed locations were Grant Cobb, Bob Covert, Charles Crescenzi, Don Crowder, Brandon DeNully, Marlene & Frank Falk, Jan Huffman, Joe Maple, Gail McCullough, Lyn Murajda, Henry Pittman, Bob Powell, Martha & Mort Sams, Sue Steiner, and Jane & Jack Turner.  Only photographs of locations receiving first place awards are shown due to space limitations.  Thanks to the businesses and organizations who beautify our communities through attractive landscaping.";
            
            break;
        case "KudzuControl_10-06-24":
            titleText= "Kudzu Control (June 2010)";        

            captionText[0]= "Rob Freeman, owner of <a href=http://www.freemangas.com/>Freeman Gas</a>, generously donated to the Club the herbicide <a href=http://www.dowagro.com/ivm/forestry/prod/milestonevm_plus.htm>Milestone</a>, which he uses to eliminate kudzu from his personal property.  Rob brought with him an all terrain vehicle with a tank in the back for spray applications.  The photo shows (left to right) Don Crowder, Newt Hardie, Rob Freeman, Linda McHam, Paul-David Blakeley, and Bob Reynolds looking over the vehicle.";
            captionText[1]= "Newt Hardie (left), President of the Kudzu Coalition, referred us to Rob Freeman when we faced the difficult problem of eliminating the large area of kudzu at the Club's new location at Spartanburg Community College.  Bob Reynolds and Don Crowder (left to right) manage the plant nursery and site construction, respectively.";
            captionText[2]= "Not only did Rob donate herbicide, but he also helped apply it!  Here is sprays kudzu on a portion of ground for the plant nursery.  Herbicide spray is emitted from retractable booms in the back of the vehicle.  We began in the morning so still air minimized spray drift.  Milestone controls southern pines, elm, waxy leaved and legume species, and kudzu is a legume (&quot;pea family&quot;).";
            captionText[3]= "The booms are easier to see from the back of the vehicle.  Besides kudzu, the ground has a mix of Johnson grass and morning glory, both pesky plants.";
            captionText[4]= "After Rob applied herbicide using the booms on flat ground that had low-growing plants, Bob Reynolds (background) used a hand sprayer to apply herbicide to larger mounds of kudzu.  The large tank at the back of the vehicle becomes a mobile liquid supply for the sprayer.  A pump on the vehicle feeds liquid to the hand sprayer.";
            captionText[5]= "Bob's spray is visible as a blue stream.  Rob added a blue colorant to the spray solution so it is easier to see where it has been applied to the plants.  It washes off in the rain, and is biologically harmless.";
            captionText[6]= "Here is a closeup of blue colorant on kudzu leaves.";
            captionText[7]= "Rob and Bob not only treated kudzu within the Club site, but also into the adjacent field of invading kudzu.  This additional kudzu-free buffer gives us additional time to prepare for defending against an invasion by the aggressive pest.";
            captionText[8]= "Paul-David Blakeley (far right) looks on and Rob and Bob reload for another run.  Paul-David is a Kudzu Coalition volunteer and the owner of Kudzilla.  Kudzilla is a skid-steer loader (&quot;Bobcat&quot;) with special attachments for kudzu removal.  Paul-David used Kudzilla earlier in the year to clear out a lot of kudzu, especially under trees near the plant nursery.  You can see photos of that <a href=Albums_SpartanburgCC.html>elsewhere on our website</a>.";
            captionText[9]= "Some of the chemicals brought by Rob, which includes glyphosate (&quot;Roundup&quot;).  Note the hand spray applicator in the back.";
            captionText[10]= "Reading instructions is always a good idea.  Don Crowder prepares a backpack for spraying glyphosate on Johnson grass.";
            captionText[11]= "Here Don sprays Johnson grass that is nearly as tall as he is.  The grass is on ground above the parking and shed areas.";
            captionText[12]= "The Johnson grass here is dwarfed here by mimosa trees and tall woody shrubs.  Note kudzu up in the tall plants.";
            captionText[13]= "Linda McHam sprays glyphosate along our gravel drive to kill weeds.  Evenually grass will be planted there.";
            captionText[14]= "Bob stretches to extend his range, and Rob looks on.  This is an area towards the entrance to the Club site, where kudzu is doing an end-run.  We plan to knock kudzu back to a controllable boundary.";
            captionText[15]= "Just exactly where are these guys going to stop??";
            captionText[16]= "This flat field was mowed for us by the college, and is a parking area for Club plant sales.  The plant nursery is hidden at left in the background, behind the truck.  However, note the line of kudzu at the right.  Mowing restrains the kudzu, hence the straight boundary.";
            captionText[17]= "Another view of the field mowed up to the field of kudzu at right.  The plant nursery is in the far left background.";
            captionText[18]= "Rob and Bob spray along this line of kudzu, and the mounds of kudzu beyond, which cover trees and shrubs.";
            captionText[19]= "With the parking area behind them, Rob and Bob spray along the edge of an area of ground that rises above our site.  Rob drives at ground level, and Bob wades into the thicket of weeds hunting kudzu.";
            captionText[20]= "&quot;More hose please.&quot;";
            captionText[21]= "There is raised ground above the gravel drive next to the plant nursery, with a steep and high embankment.  Bob gingerly walks up to the edge, spraying as he goes, while Rob keeps up with him in the vehicle.";
            captionText[22]= "One of the last things they do is treat kudzu along the edge of a grove of trees.  It is located fairly far from our site proper, but kudzu vines were already snaking through the grass towards our site. It is a heavy infestation, and the treatment is only meant to slow down the kudzu.  It will be a couple of weeks before we expect to see significant effects in all the areas where we applied Milestone.  Photos by Lou Adams.";
            
            break;
        case "PlantSale_10-04-24":
            titleText= "Spring Plant Sale (April 2010)";        

            captionText[0]= "Early morning arrivers had the best choice from over 2,000 trees and shrubs.";
            captionText[1]= "Although the weather threatened rain and a few sprinkles fell in the morning, the cool weather made for great shopping. Note the range of plants available for sale &ndash; a great selection!";
            captionText[2]= "Club members (in brown aprons) assist buyers with information about different plants.";
            captionText[3]= "Dogwoods are our signature trees and we had plenty of varieties on hand to choose from.";
            captionText[4]= "Charles Covert (brown apron, right) and Beth Waddell (apron, left) wrote up tickets for each customer to speedup the checkout process.";
            captionText[5]= "Susie Dempsey (black hair) and her friend found a few trees and shrubs to use in their landscapes.";
            captionText[6]= "Charles Covert writes up a trailer load of plants for Master Gardener Elaine Allen.";
            captionText[7]= "Joe Maple, longtime club member, Master Gardener instructor, and Plant-a-Row supporter, discusses plants with a buyer.";
            captionText[8]= "John Woodward, Tom Bartram, and Ben Waddell (left to right) staff the sales table and enjoy a doughnut mid-morning.";
            captionText[9]= "The checkout lines were full, but it did not take long to get through due to the help of our volunteers.";
            captionText[10]= "Many buyers had a hard time making up their minds but most found something they could take home and enjoy.";
            captionText[11]= "The nursery area was full of customers most of the morning and sales were brisk. We sold over half of our inventory, and will have plenty to carry through for our fall sale in October. As we packed up after the sale, the rain poured. Good timing&hellip; Photos by Linda McHam.";
            
            break;
        case "PottingSession_10-03-16":
            titleText= "Potting Session (March 2010)";        

            captionText[0]= "Ed Wilde and Gisela Otto pot up <i>Cryptomeria radicans</i> for the spring plant sale on April 24.";
            captionText[1]= "A great group of volunteers turned out on March 18th. Left to right: Mort Sams, Ben Waddell, Gail McCullough (foreground), Bob Reynolds, Henry Pittman, and John Woodward. Partially hidden in the background are Lou Adams, Mac Davis, and Don Oldham.";
            captionText[2]= "Lou Adams, Bob Reynolds, Don Oldham, Mort Sams, Mac Davis, Ben Waddell (foreground), John Woodward, Gail McCullough, and Henry Pittman (left to right) turn the session into an assembly line.";
            captionText[3]= "Linda McHam gets out from behind the camera and takes a turn at shoveling sand for the potting session.";
            captionText[4]= "Chelsea Fogle, a horticulture student at SCC, helps Linda McHam load more donated plants into the truck.";
            captionText[5]= "Ben Waddell and Linda McHam picked up 430 3-gallon pots from David Settle's home in Inman. David has said that we can take as many as we need! Thanks, David!";
            captionText[6]= "The pots are stacked behind our shed at Hatcher Garden, ready for the potting sessions.";
            captionText[7]= "Ben Waddell stakes <i>Cryptomeria radicans</i> so they look their best for the plant sale.";
            captionText[8]= "Lou Adams, Cindy Quillen, Bob Reynolds, Earl Quillen and Don Crowder (left to right) pot up <i>Cryptomeria radicans</i>.";
            captionText[9]= "Lou Adams, Frank Falk, and Ed Wilde (left to right) attach plant labels that identify the type of plant and its price.";
            captionText[10]= "Our <a href=Albums_PlantPropagation.html>propagation efforts</a> from last summer are bearing fruit&hellip; or more precisely, flowers, this spring! These sprouting cuttings are for future potting sessions. We hope to make improvements in our success rate this coming summer when the propagation frame is <a href=Albums_SpartanburgCC.html>moved to SCC</a>. Photos by Linda McHam and Jeff Hayes.";
            
            break;
        case "FallPicnicMeeting_09-09-28":
            titleText= "Fall Picnic & Meeting at Hatcher Garden (September 2009)";        

            captionText[0]= "Terrie Rourke's elegant table arrangements for the picnic.  Very nice!";
            captionText[1]= "Volunteers setting up the sales table and other stuff.";
            captionText[2]= "Club announcements before the meal.";
            captionText[3]= "Members were encouraged to see new plants in the propagation bed. About 85% have rooted!<br /><br />Photos by Linda McHam.";
            
            break;
        case "LitterPickUp_09-09":
            titleText= "Litter Pick-Up (September 2009)";        

            captionText[0]= "Charlie Covert (left) hands a safety vest to Kudzu Coalition member Paul Savko, as Lou Adams looks on. Four  Kudzu Coalition volunteers helped pickup litter, who are also Club members: Lou, Newt Hardie, Peggy Romine, and Tim Hemphill.";
            captionText[1]= "Newt Hardie (left) and Charles Covert work their way north along North Pine Street in front of Converse College.";
            captionText[2]= "Frank Falk bags a big one.  Yuck.";
            captionText[3]= "Ben Waddell and Peggy Romine tie up orange Adopt-A-Highway bags that are filled to the brim near the corner of North Pine Street and Isom Street.  That's a wrap!<br /><br />Photos by Jeff Hayes.";
            
            break;
        case "PruningParty08-12-06":
            titleText= "Pruning Party (December 2008)";        

            captionText[0]= "In the morning chill, club members remove arbor tie from young trees on Business I-85 during first shift.  Left to right: Stan Klotz, Jim Barbee, Charlie Covert, Henry Pittman, Ben Waddell, John Woodward, and Ed Wilde.";
            captionText[1]= "Second shift club members working at Hearon Circle were rewarded by the nearby McDonald's with free coffee and a free lunch!  Left to right: Bob Reynolds, Ed Wilde, Norm Schoss, and Phyllis Lewis (McDonald's owner).";
            captionText[2]= "In the afternoon, club members review the DOT map of Business I-85 before starting to prune.  Left to right: Joyce Crescenzi, Charlie Crescenzi, Jeff Hayes, Charlie Covert, and Ed Wilde.<br /><br />Photos by Linda McHam.";
            
            break;
        case "FavoritePhotos_":
            titleText= "Favorite Photos";        

            captionText[0]= "Potting session held October 20, 2007.  Left to right: Chris Rives, Jim Ward, Karen Ward, Steve Patton, [?], John Woodward, Peggy Romine, David Kyle, Jack Turner, Charlie Crescenzi, Mort Sams, Stan Klotz, Susan MacDowell, Dianne Fergusson, Valerie Hare, Joe Rives, Marie Engley, and [?].  Help us identify the two unknowns in the photo!<br /><br />Photo provided by Henry Pittman.";
            captionText[1]= "Valerie Hare (left) and Dianne Fergusson planned and directed the Plant Sale from 2007 to 2008 with great enthusiasm.  Potting session held October 20, 2007.<br /><br />Photos by Henry Pittman.";
            captionText[2]= "Tasso Ghionis reveals the newest addition to his family (and possibly the SMGC?) during the 2008 annual Club picnic: Katerina Ghionis.<br /><br />Photo by Linda McHam.";

            break;            
    }
    document.getElementById("AlbumTitle").innerHTML = titleText;    // Load album title onto web page.
    loadPhotoAndCaption();
}