userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function findElement(n,ly) {
	if (browserVers < 4)		return document[n];
	var curDoc = ly ? ly.document : document;
	var elem = curDoc[n];
	if (!elem) {
		for (var i=0;i<curDoc.layers.length;i++) {
			elem = findElement(n,curDoc.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (document.layers) {
				img = findElement(changeImages.arguments[i],0);
			}
			else {
				img = document.images[changeImages.arguments[i]];
			}
			if (img) {
				img.src = changeImages.arguments[i+1];
			}
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		footer_nav_about_over = newImage("images/footer_nav_about-over.gif");
		footer_nav_contact_over = newImage("images/footer_nav_contact-over.jpg");
		footer_nav_press_over = newImage("images/footer_nav_press-over.jpg");
		footer_nav_privacy_over = newImage("images/footer_nav_privacy-over.jpg");
		nav_abundant_over = newImage("images/nav_abundant-over.jpg");
		nav_renew_over = newImage("images/nav_renew-over.jpg");
		nav_ideas_over = newImage("images/nav_ideas-over.jpg");
		preloadFlag = true;
	}
}

function displayFooter(sel) {

	document.write('		<div style="position: relative;">');
	if (sel == 1) {
	document.write('		<a href="about.html">');
	document.write('			<img name="footer_nav_about" src="images/footer_nav_about-selected.gif" width="53" height="13" border="0" alt=""></a>');
	} else {
	document.write('		<a href="about.html"');
	document.write('			onmouseover="changeImages(\'footer_nav_about\', \'images/footer_nav_about-over.gif\'); return true;"');
	document.write('			onmouseout="changeImages(\'footer_nav_about\', \'images/footer_nav_about.gif\'); return true;"');
	document.write('			onmousedown="changeImages(\'footer_nav_about\', \'images/footer_nav_about-over.gif\'); return true;"');
	document.write('			onmouseup="changeImages(\'footer_nav_about\', \'images/footer_nav_about-over.gif\'); return true;">');
	document.write('			<img name="footer_nav_about" src="images/footer_nav_about.gif" width="53" height="13" border="0" alt=""></a>');
	}
	document.write('		<img src="images/footer_divider.jpg" width="27" height="13" alt="">');
//	if (sel == 3) {
//	document.write('		<a href="press.html">');
//	document.write('			<img name="footer_nav_press" src="images/footer_nav_press-selected.gif" width="63" height="13" border="0" alt=""></a>');
//	} else {
//	document.write('		<a href="press.html"');
//	document.write('			onmouseover="changeImages(\'footer_nav_press\', \'images/footer_nav_press-over.jpg\'); return true;"');
//	document.write('			onmouseout="changeImages(\'footer_nav_press\', \'images/footer_nav_press.jpg\'); return true;"');
//	document.write('			onmousedown="changeImages(\'footer_nav_press\', \'images/footer_nav_press-over.jpg\'); return true;"');
//	document.write('			onmouseup="changeImages(\'footer_nav_press\', \'images/footer_nav_press-over.jpg\'); return true;">');
//	document.write('			<img name="footer_nav_press" src="images/footer_nav_press.jpg" width="63" height="13" border="0" alt=""></a>');
//	}
//	document.write('		<img src="images/footer_divider.jpg" width="27" height="13" alt="">');
	if (sel == 4) {
	document.write('		<a href="privacy.html">');
	document.write('			<img name="footer_nav_privacy" src="images/footer_nav_privacy-selected.gif" width="73" height="13" border="0" alt=""></a>');
	} else {
	document.write('		<a href="privacy.html"');
	document.write('			onmouseover="changeImages(\'footer_nav_privacy\', \'images/footer_nav_privacy-over.jpg\'); return true;"');
	document.write('			onmouseout="changeImages(\'footer_nav_privacy\', \'images/footer_nav_privacy.jpg\'); return true;"');
	document.write('			onmousedown="changeImages(\'footer_nav_privacy\', \'images/footer_nav_privacy-over.jpg\'); return true;"');
	document.write('			onmouseup="changeImages(\'footer_nav_privacy\', \'images/footer_nav_privacy-over.jpg\'); return true;">');
	document.write('			<img name="footer_nav_privacy" src="images/footer_nav_privacy.jpg" width="73" height="13" border="0" alt=""></a>');
	}
	document.write('		<img src="images/footer_divider.jpg" width="27" height="13" alt="">');
	if (sel == 2) {
	document.write('		<a href="contact.html">');
	document.write('			<img name="footer_nav_contact" src="images/footer_nav_contact-selected.gif" width="60" height="13" border="0" alt=""></a>');
	} else {
	document.write('		<a href="contact.html"');
	document.write('			onmouseover="changeImages(\'footer_nav_contact\', \'images/footer_nav_contact-over.jpg\'); return true;"');
	document.write('			onmouseout="changeImages(\'footer_nav_contact\', \'images/footer_nav_contact.jpg\'); return true;"');
	document.write('			onmousedown="changeImages(\'footer_nav_contact\', \'images/footer_nav_contact-over.jpg\'); return true;"');
	document.write('			onmouseup="changeImages(\'footer_nav_contact\', \'images/footer_nav_contact-over.jpg\'); return true;">');
	document.write('			<img name="footer_nav_contact" src="images/footer_nav_contact.jpg" width="60" height="13" border="0" alt=""></a>');
	}
	document.write('		<img src="images/footer_divider.jpg" width="27" height="13" alt="">');
	document.write('		<a href="http://www.abundantforests.net/"');
	document.write('			onmouseover="changeImages(\'footer_nav_ip\', \'images/footer_nav_ip-over.jpg\'); return true;"');
	document.write('			onmouseout="changeImages(\'footer_nav_ip\', \'images/footer_nav_ip.jpg\'); return true;"');
	document.write('			onmousedown="changeImages(\'footer_nav_ip\', \'images/footer_nav_ip-over.jpg\'); return true;"');
	document.write('			onmouseup="changeImages(\'footer_nav_ip\', \'images/footer_nav_ip-over.jpg\'); return true;">');
	document.write('			<img name="footer_nav_ip" src="images/footer_nav_ip.jpg" width="102" height="13" border="0" alt=""></a>');
	document.write('		</div>');
	document.write('		<div style="position: relative; padding: 5px;">');
	document.write('		<img src="images/footer_info.jpg" width="175" height="32" alt="">');
	document.write('		</div>');

}

function displayRandFooter(opt) {

	var RanTitle= new Array(5)
	var RanText= new Array(5)
	RanTitle[1] = 'It&rsquo;s all about balance.';
	RanText[1] 	= 'We cannot live without our forests, nor would we ever want to. That&rsquo;s why we must carefully balance peoples&rsquo; need for wood and paper products with the needs of nature. By renewing, reusing and respecting this amazing resource, our forests can remain abundant now and in the future.';
	RanTitle[2] = 'Waste not. Want not.';
	RanText[2] 	= 'Did you know U.S. papermakers recycle enough paper to fill a 15-mile long train of boxcars every day?  Makes filling up your blue bin once a week seem like a piece of cake.';
	RanTitle[3] = 'More people. More trees.';
	RanText[3] 	= 'Since 1965, the number of trees growing in U.S. forests has increased 39%. That&rsquo;s amazing considering that in the same period of time our population has almost doubled.';
	RanTitle[4] = 'Our forests are growing, not disappearing.';
	RanText[4] 	= 'There are 12 million more acres of forests in the U.S. today than 20 years ago. That&rsquo;s good news for you, our planet and the many wildlife species who make the forest their home.';
	RanTitle[5] = 'Using wood and paper today helps our forests remain abundant for the future.';
//	RanText[5] 	= 'We plant more than 1.7 million new trees each day for the future. That&rsquo;s three times more than are harvested for the wood and paper products we use now.';
	RanText[5] 	= 'We plant more than 1.7 million new trees each day, more than making up for what is harvested.';

	var ran_number=Math.floor(Math.random()*5)+1;
	if (opt == 1) {
	//	document.write('<img src="images/gifts_footer_'+ran_number+'.jpg" alt="" hspace="5" vspace="0" border="0" width="770" height="190" /><br />');
		document.write('<img src="images/hiking_footer.gif" alt="" hspace="0" vspace="0" border="0" width="750" height="190" /><br />');
	} else {
		document.write('<img src="images/gifts_footer.gif" alt="" hspace="0" vspace="0" border="0" width="750" height="190" /><br />');
	}
	document.write('<div style="position: absolute; top: 30px; left: 200px; width: 500px;">');
	document.write('<div style="font-family: arial, sans-serif; font-size : 14px; letter-spacing: 1px; font-weight : normal; color : #4a1d00;">');
	document.write(RanTitle[ran_number]);
	document.write('</div>');
	document.write('<div style="font-family: Verdana, sans-serif; font-size : 11px; font-weight : normal; color : #000000;">');
	document.write(RanText[ran_number]);
	document.write('</div>');
	document.write('</div>');
}

function JumpToUrl(selObj) { 
	eval("this.location='"+selObj.options[selObj.selectedIndex].value+"'");
}
