// JavaScript Document



function renderAnimatedNav() {
 
document.write('	<div class="vertical-container" >');
document.write('<h4>Explore Our Site</h4>');
document.write(' <div id="inner-container" >');

 
document.write('	<div id="homeLink" class="accordionButton"><a href="/index.html">HOME</a></div>');
document.write('	<div id="aboutusLink" class="accordionButton">ABOUT US</div>');
document.write('	<div id="aboutusMenu" class="accordionContent">');
document.write('	<div  class="accordionInner">');
document.write(' <ul style="margin-top: 10px;">'); 
document.write(' <li><a ');
if(page == 'board') { document.write(' class="current" ');}
document.write(' href="/board.html">Board of Directors</a></li>'); 

document.write(' <li><a ');
if(page == 'staff') { document.write(' class="current" ');}
document.write(' href="/staff.html">Staff</a></li>');

document.write(' <li><a ');
if(page == 'directions' || page == 'map_sanctuary' || page == 'map_lodge' || page == 'map_prairie') { document.write(' class="current" ');}
document.write(' href="/directions.html">Directions</a></li>');

document.write(' <li><a ');
if(page == 'contact') { document.write(' class="current" ');}
document.write(' href="/contact.html">Contact Us</a></li>');

document.write(' <li><a ');
if(page == 'membership') { document.write(' class="current" ');}
document.write(' href="/membership.html">Membership</a></li>');

document.write(' </ul>');
document.write(' </div>');
document.write(' </div>'); 

document.write('	<div id="discoveryLink" class="accordionButton">DISCOVERY CAMP</div>');
document.write('	<div id="discoveryMenu" class="accordionContent">');
document.write('	<div  class="accordionInner">');
document.write(' <ul style="margin-top: 10px;">'); 
document.write(' <li><a ');
if(page == 'discovery_camp') { document.write(' class="current" ');}
document.write(' href="/discovery_camp.html">Discovery Camp Home</a></li>'); 
document.write(' <li><a ');
if(page == 'prek_kindergarten') { document.write(' class="current" ');}
document.write(' href="/prek_kindergarten.html">Pre-K &amp; Kindergarten</a></li>'); 
document.write(' <li><a ');
if(page == 'firstsecond') { document.write(' class="current" ');}
document.write(' href="/firstsecond.html">First &amp; Second Grades</a></li>'); 

document.write(' <li><a ');
if(page == 'thirdfourth') { document.write(' class="current" ');}
document.write(' href="/thirdfourth.html">Third &amp; Fourth Grades</a></li>');

document.write(' <li><a ');
if(page == 'fifthsixth') { document.write(' class="current" ');}
document.write(' href="/fifthsixth.html">Fifth &amp; Sixth Grades</a></li>');

document.write(' <li><a target="_blank" href="/pdfs/Registration_2_10.pdf">Registration Form ~ <br/>Pre-K &amp; Kindergarten</a></li>');

document.write(' <li><a  target="_blank" href="/pdfs/Registration_1_10.pdf">Registration Form ~ <br/>First &mdash; Sixth Grades</sup></a></li>');

document.write(' </ul>');
document.write(' </div>');
document.write(' </div>'); 


document.write('	<div id="photoLink" class="accordionButton"><a href="/photo_gallery.php">PHOTO GALLERY</a></div>');
document.write('	<div id="educatorLink" class="accordionButton"><a href="/educators.html">EDUCATORS</a></div>');
document.write('	<div id="programsLink" class="accordionButton"><a href="/programs.html">SEASONAL PROGRAMS</a></div>');


document.write('	<div id="protectedLink" class="accordionButton">PROTECTED AREAS</div>');
document.write('	<div id="protectedMenu" class="accordionContent">');
document.write('	<div  class="accordionInner">');
document.write(' <ul style="margin-top: 10px;">');
 
document.write(' <li><a ');
if(page == 'talahi') {document.write(' class="current" ')}
document.write(' href="/talahi.html">Talahi Lodge</a></li>');

document.write(' <li><a ');
if(page == 'olin') {document.write(' class="current" ')}
document.write(' href="/olin.html">Olin Nature Preserve</a></li>');

document.write(' <li><a');
if(page == 'mississippi') {document.write(' class="current" ')}
document.write(' href="/mississippi.html">Mississippi Sanctuary</a></li>');

document.write(' <li><a');
if(page == 'hutchinson') {document.write(' class="current" ')}
document.write(' href="/hutchinson.html">The Hutchinson Bird Sanctuary</a></li>');

document.write(' <li><a');
if(page == 'heartland') {document.write(' class="current" ')}
document.write(' href="/heartland.html">Heartland Prairie</a></li>');

document.write(' </ul>');
document.write(' </div>');
document.write(' </div>'); 

document.write('	<div id="/kneehiLink" class="accordionButton"><a href="kneehi.html">CHILDREN&#39;S PROGRAMS</a></div>');
document.write('	<div id="/homeshoolLink" class="accordionButton"><a href="homeschool.html">HOMESCHOOL PROGRAMS</a></div>');
document.write('	<div id="/relatedLink" class="accordionButton"><a href="related_links.html">RELATED LINKS</a></div>');


document.write(' <div class="clear"></div>');
document.write(' </div>');
document.write(' </div>');  
 
}


function confirmDelete() {
	var agree = confirm('This will delete your account and all subaccounts from our system.  Are you sure you wish to delete your account?');
	if(agree) {return true}
	else {return false}
		
}

function showPasswordBox() { 
	document.getElementById('changePassword').style.display = 'block';
}

function showAddressBox() {
	document.getElementById('changeAddress').style.display = 'block';
}
function showEmailBox() {
	document.getElementById('changeEmail').style.display = 'block';
}

function checkPW() {
if (accountManage.newPassword.value == "") {
alert( "Please enter a new password." );
accountManage.newPassword.focus();
	document.getElementById('changePassword').style.display = 'block';
return false;
}
}

function checkEmail() {
if (emailManage.emailaddress.value == "") {
alert( "Please enter an email address." );
emailManage.emailaddress.focus();
	document.getElementById('changeEmail').style.display = 'block';
return false;
}
else {
	var email = document.getElementById('emailaddress');
var filter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert('Please provide a valid email address');
emailManage.emailaddress.focus();
	document.getElementById('changeEmail').style.display = 'block';
return false;
}
}

}
 

function switchProgram(program) {
	
	programs = new Array ('big-tree','freshwater'); 
	
	programsBG = document.getElementById('program-details').style.background;
	
	if(program == 'waterDat') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_water_day.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Save the Date!</h5> <p>October 22, 2010</p> <p>9:30 a.m. to 2:00 p.m. at Talahi Lodge</p><p>Registration opens August 16, 2010</p><p> Dive IN! Water Stewardship Day at The Nature Institute in Godfrey, IL</p><p style="font-size: .8em;"><em>Made possible by a grant from the Illinois Environmental Protection Agency</em></p>'
	}
	
	if(program == 'big-tree') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_big_tree_registry.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Big Tree Registry</h5> <p>Saturday, November 13</p> <p>9 a.m - Noon at Talahi Lodge (<em>Cost: $5.00 per person inlcudes a Tree ID Book</em>)</p><p class="sm"> Participants will learn how to measure trees using the Illinois Big Tree Register guidelines and using the information to measure trees around the Olin Nature Preserve and Mississippi Sanctuary. Volunteers will spend about one hour learning how to measure trees and record GPS coordinates of trees.  The next hour or so, volunteers will head out to the preserves and find and measure 5-10 trees.  </p>'
	}
	
	if(program == 'audobon') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_big_tree_registry.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>A performance by Brian "Fox" Ellis as John James Audubon</h5> <p>September 28, 2010 </p> <p>7 p.m. at Talahi Lodge Amphitheatre (<em>Cost: Free</em>)</p><p>Please register at 618-466-9930</p><p class="sm"> Join storyteller and author Brian "Fox" Ellis as he brings history, ecology, art and literature to life as John James Audubon.</p>'
	}
	if(program == 'freshwater') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_freshwater_insects.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Aquatic Insect Lecture</h5> <p>Wednesday, March 10</p> <p>7 p.m. at Talahi Lodge</p><p>Ed DeWalt from the Illlinois Natural History Survey will give a talk about the conservation of freshwater insects.</p> <p>Limit: 30 people ~ Call 618-467-2521  to register.</p>'
	}
	if(program == 'flyingwild') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_migratory_birds.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Flying Wild Educator Workshop</h5> <p>Saturday, March 13</p> <p>8:30 a.m. - Noon at Talahi Lodge</p><p>Flying Wild is a new program for teachers on migratory birds. CPDU&#39;s available.</p><p>Cost: $20 ~ Contact Patti Brown 467-2521 for info.</p>'
	}
	if(program == 'wildflower') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_wildflower_walk.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Wildflower Letter Box Walk</h5> <p>Saturday, March 27 & Saturday, April 10</p> <p>9 a.m. - Noon ~ Meet at Talahi Lodge</p><p>Letterboxing is a intriguing pastime combining navigational skills and stamp artistry. Particpants will learn how to orienteer while finding and recognizing spring wildflowers.</p>'
	}
	if(program == 'habitat') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_bird_habitat.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Wild Bird Habitat Restoration Lecture</h5> <p>Wednesday, March 31</p> <p>7 p.m. at Talahi Lodge</p><p>Jeff Hoover from the Illinois Natural History Survey will give a power point presentation on the conservation of bird populations as well as habitat restoration and avian ecology.</p> <p>Limit 30 ~ Call 618-467-2521  to register.</p>'
	}
	if(program == 'frogsToads') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_frogs_toads.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Frogs &amp; Toads Program</h5> <p>Wednesday, April 7</p> <p>7 p.m. at Talahi Lodge</p><p>Paul Shetley returns to give help us learn about frogs and toads. Bring waders, flashlight and prepare to get a little wet!!!</p> <p>Cost: $3 ~ Call 618-467-2521  to register.</p>'
	}
	if(program == 'springBirds') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_spring_bird_olin.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Spring Bird Hikes at the Olin Preserve</h5> <p>Sundays, April 18 &amp; 25</p><p>Sundays, May 9, 16, &amp; 23</p> <p>8 a.m. ~ Meet at Talahi Lodge</p><p>Edna Alexander will lead birding hikes through TNI property.</p>'
	}
	if(program == 'landscaping') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_landscaping.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Native Landscaping Lecture</h5> <p>Wednesday, April 21</p> <p>7 p.m. at Talahi Lodge</p><p>Betty Struckhoff, from the Missouri Botanical Gardens will discuss the use of native vegetation in landscaping.</p><p>Limit: 30 ~ Call 618-467-2521  to register (Donations accepted).</p>'
	}
	if(program == 'riverwatch') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_riverwatch.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>RiverWatch Network Workshop</h5> <p>Saturday April 24</p> <p>10 a.m. - 2 p.m. at Lewis &amp; Clark Community College</p><p>Contact Vera Bojic for registration 618-468-4870.</p>'
	}
	if(program == 'invasive') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_invasive_species.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Invasive Species Talk and Walk</h5> <p>Saturday May 8</p> <p>9 a.m. - 11a.m. ~ Meet at  Talahi Lodge</p><p>Chris Evans of the Cooperative Weed Management Association will discuss invasives species and control methods at the Olin Nature Preserve.</p>'
	}
	if(program == 'glaciers') { 
	document.getElementById('program-details').style.background= 'url(_images/programs/bg_glacier_flowers.jpg) no-repeat left top';
	document.getElementById('program-details').innerHTML = '<h5>Geology Lecture and Field Trip</h5> <p>Friday, May 14 at 7 p.m. at Talahi Lodge</p> <p>Saturday, May 15 ~ 9 a.m. - Noon ~ Meet at  Talahi Lodge</p><p>Raymond Wiggers will present a lecture Friday evening titled "Glaciers to Wildflowers" and lead a 1/2 field trip  Saturday morning.</p> <p>Limit is 30 people. Cost: $10 for members and $15 for non members.  <br /> Call 618-467-2521  to register.</p>'
	}
}













