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 = "Vermilion Bank & 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(URL)
	{
	myQuery = document.f.NewQuery.value;
	UpdateQuery = myQuery + " site:"+URL;
	document.f.q.value = UpdateQuery;
	}

// This function loops through all the hyperlinks in a document and assigns
// the LinkAlert function to each weather.com link as an event handler.  Don't call it
// before the document is parsed and the links are all defined.  It is best
// to call it from the onload event handler of a <body> tag.
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;
