/************************************************************
CLIMATE COUNTS.ORG
************************************************************/

//loads join us page from right hand join us module
function loadJoinUs(email) {
	//alert(email);
	if (email == undefined || email == "" || email=="Enter Email") {
		return false;
	} else {
		location.href="http://www.climatecounts.org/join_us.php?email="+email;
		return false;
	}

}

//loads search page from right hand join us module
//hard coded path because it is used in the blog
function loadSearch() {
	var term = document.search.term.value;
	//alert(term);
	if (term == undefined || term == "") {
		return false;
	} else {
		location.href="http://climatecounts.org/searchresults.php?p=term&term="+term;
		return false;
	}
}

//loads search when enter key is hit
function loadSearchEnter(e) {
	if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) loadSearch();
	return false;
}


//loads pay pal from right hand join us module
function loadPayPal(value) {
	if (value == undefined || value == "") {
		return false;
	} else {
		obj = document.getElementById('dynapal');
		obj.href="http://climatecounts.org/paypal_redirect.php?value="+value
		return true;
	}
}

//loads paypal when enter key is hit
function loadPayPalEnter(e) {
	if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) loadPayPal();
	return false;
}
