// JavaScript Document

var undefined;

function Calculator(myURL)
	{
	myBase = "https://gateway.fundsxpress.com/calculators/";
	window.open(myBase + myURL,'','width=585,height=450,scrollbars=yes,resizable=yes');
	}

function LinkAlert(URL,target)

	{

	BankName = "Citizens National Bank of Albion"
	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 popup(URL,name,width,height) {
	window.open(URL,name,'width='+width+',height='+height);	
	}	
	
function confirmAllLinks() {
	for(var i = 0; i < document.links.length; i++) {
    	this_href = document.links[i].href;
		if (this_href.indexOf("weather.com")>0) {
			document.links[i].href = "javascript:LinkAlert('"+this_href+"');"
			//document.links[i].onclick = confirmLink;
			document.links[i].target = "_self";
			}
  		}
	}

window.onload = confirmAllLinks;		