// CVS: $Id: fnb.js,v 1.6 2006-07-06 15:05:45 nin Exp $
function externalLinks() {
	/**
	* JavaScript Document for opening external links in XHTML document
	*/
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}

window.onload = externalLinks; // fire on startup

function confirm_leave(url)
{
	/**
	* prompt before exiting the website, use for external links.
	* call by onclick="confirm_leave('linkname')
	*/
	var answer = confirm("By clicking 'OK' you acknowledge leaving the F.N.B. website.\nYou will be routed to a third party site outside the control of the F.N.B. family of websites. .\n If you do not wish to leave the F.N.B. site, please click 'Cancel' now.")
	if (answer){
		window.location = url;
	}
	else{
		// do nothing. 
	}
}

function WMconfirm_leave(url)
{
/**
* prompt before exiting the website, use for external links.
* call by onclick="confirm_leave('linkname')
*/
var answer = confirm("By clicking 'OK' you acknowledge leaving the F.N.B. website.\nYou will be routed to a secure third party site for your F.N.B. Wealth Management trust account information.\n If you do not wish to leave the F.N.B. site, please click 'Cancel' now.")
if (answer){
window.location = url;
}
else{
// do nothing.
}
}
