var undefined;

function LaunchCalc(myURL)
	{
	myBase = "http://gateway.fundsxpress.com/calculators/";
	window.open(myBase + myURL,'','width=585,height=450,scrollbars=yes,resizable=yes');
	}
	
function LinkAlert(URL,target)

	{

	BankName = "Four Oaks Bank and Trust Company"
	MSG = "The " + BankName + " web site provides links to other web sites \n";
	MSG = MSG + "for convenience and informational purposes only. Users should \n";
	MSG = MSG + "be aware that when you select a link on the " + BankName + "'s web \n";
	MSG = MSG + "site to an external web site, they are leaving " + BankName + "'s site.\n";
	MSG = MSG + "\n";
	MSG = MSG + "Linked sites are not under the control of " + BankName + ".\n";
	MSG = MSG + BankName + " is not responsible for the contents of any linked site \n";
	MSG = MSG + "or any link contained in a linked site, or any changes or updates \n";
	MSG = MSG + "to such sites. The inclusion of a link does not imply endorsement \n";
	MSG = MSG + "by " + BankName + " of the site, its content, advertisers or sponsors. \n";
	MSG = MSG + "External sites may contain information that is copyrighted with \n";
	MSG = MSG + "restrictions on reuse. Permission to use copyrighted materials must \n";
	MSG = MSG + "be obtained from the original source and cannot be obtained \n";
	MSG = MSG + "from " + BankName + ".";
	
	myTarget = "_blank";
	if (target!=undefined) myTarget = target;
	if (confirm(MSG)) window.open(URL,myTarget);
	}
	
function SearchSite()
	{
	myQuery = document.f.NewQuery.value;
	UpdateQuery = myQuery + " site:www.resourcebk.com";
	document.f.q.value = UpdateQuery;
	}
	
function EmailAlert(){
	return confirm("In order to protect your privacy, please do not send account numbers and or other personal financial information through email as it is not secure. If you have any questions regarding existing account(s), please contact your local Four Oaks Bank and Trust Company. Thank you.");
	}	
	
function MakeAddress(acct,domain,link_text) {
	txt = link_text;
	if (txt=="" || txt==undefined) {
		txt = acct+"@"+domain;
		}
	link = '<a href="mailto:'+acct+"@"+domain+'" onClick="return EmailAlert();">'+txt+'</a>';
	document.write(link);
	}
	