﻿function FP_jumpMenu(el,frm,sel) 
{//v1.0
	 var href=el.options[el.selectedIndex].value; if(sel) el.selectedIndex=0;
	 if('_new'==frm) open(href); else eval(frm+".location='"+href+"'");
}


function doClear(searchTerm) 
{
	if (searchTerm.value == searchTerm.defaultValue)
	{
         searchTerm.value = ""
    }
 }


function validateAmount(amount)
{
	if(amount.value.match( /^[0-9]+(\.([0-9]+))?$/))
	{
		return true;
	}
	else
	{
		alert('You must enter a valid donation.');
		amount.focus();
		return false;
	}
}


function SelecText(codebox)
{
	document.getElementById("codebox").select()
}


function checkEmail() 
{
	var email = document.getElementById("email");
	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");
		email.focus
		return false;
	}
}


function feedbackcheckEmail() 
{
	var femail = document.getElementById("feed-email");
	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (!filter.test(femail.value)) 
	{
		alert("Please provide a valid email address");
		femail.focus
		return false;
	}
}

