// JavaScript Document

var undefined;



function LinkAlert(URL,target)

	{

	BankName = "Texas National Bank"
	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 isValidEmail(parmValue) {
	var rex = new RegExp("^[\\w\\+-]+(\\.[\\w\\+-]+)?@((\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})\|([\\w\\+-]+\\.[a-zA-Z]{2,}))$");
	var pos = parmValue.search(rex);
	if (pos < 0) {
		return false;
		} 
	else {
		return true;
		}
	}

function mail(link_string,user,domain,nickname,subject) {
    var nn = "";
    var s = "";

    if (nickname != "") nn = nickname + " ";
	else  nn = make_nickname(link_string);
    if (subject != "") s = "?subject=" + subject ;
    document.write(link_string.link(make_href(user,domain,nn,s)));
  }
 
function make_href(user,domain,nickname,subject) {
    address = "mail" + "to" + ":" + nickname + make_address(user,domain);
	if (subject!=undefined) address = address + subject;
	return address;
    }

function make_address(user,domain) {
    return "&lt;" + user + "@" + domain + "&gt;" ;
    }

function make_nickname(link_string) {
    var names = link_string.split(",");
    if (names.length == 2) {
      return names[1] + " " + names[0] + " ";
    } else {
      return "";
    }
  }
function ExitNotice()  {
        if(confirm("You are now leaving the bank's web site. This institution does not guarantee or endorse the products, the security, or privacy practices on linked sites.  Nor is the institution responsible for the accuracy of data on linked sites. To remain at our site, click Cancel. To leave our site for the link you selected, click OK. Thank you for visiting our site.")) { return true;
} 
history.go(0);
return false;
}

function EmailWarning()  {
        if(confirm("For security reasons your e-mail should NOT contain confidential information such as your Social Security number, PIN, password or account number(s).   If you do not want to send unsecured e-mail, click Cancel. To continue and e-mail the person you selected, click OK. Thank you for visiting our site.")) { return true;
} 
history.go(0);
return false;
}
