// JavaScript Document<script>

// List of domains that do not need the external website disclosure - split URLs with semi-colons
var strDomainFilters = "riverlandcu.org;memberconnectweb.com;loanliner.com;e-statementsonline.com;mmm1117.verio-web.com;tranzact.org"
var strMessage = "You are now leaving the RiverLand Credit Union Website.\n\nThe external website you are linking to is not operated by RiverLand Credit Union.\n\n We are not responsible for any content or information available on this external web site.\n\n RiverLand Credit Union is not responsible for, nor do we represent you or the External web site if you enter into any agreements.\n\n Privacy and Security policies may differ between our web site and this external site.";
// Do not edit below this point

var nav4 = window.Event ? true : false;

function processClicks(e) {
	// Grab the Source Element based on browser type
  if (nav4) 
	{
    var srcElem = e.target
  } 
	else 
	{
    var srcElem = event.srcElement
  }
	
	// Check for linked images
	if(srcElem.tagName == "IMG")
	{
		srcElem = srcElem.parentElement;
	}
	
	// If this clicked object is a link check the URL against  Domain Filters
	if(srcElem.tagName == "A")
	{
		var strURL = srcElem.href;
		// Determine if this is an external link, internal links are ok by default
		if(strURL.indexOf("http:") > -1 || strURL.indexOf("https:") > -1)
		{
			// Setup variables; by default we show the message unless the domain contains one of the filters
			var bShowAlert = true;
			var i = 0
			// Create an array of filters
			var arrDomainFilters = strDomainFilters.split(";");
			// Loop through filters and check against the URL
			for(i=0; i<arrDomainFilters.length;i++)
			{
				// if the filter is in the URL, we will NOT show the Message
				if(strURL.indexOf(arrDomainFilters[i]) != -1)
					bShowAlert = false;
			}
			// If the message is determined to be displayed, display it
			if(bShowAlert)
				alert(strMessage);
		}
	}	
}

// trap the click even based on browser type
if (nav4)
  document.captureEvents(Event.CLICK);
document.onclick = processClicks;

// function to open external links w/ the alert message
function openExtLink(strURL, strTarget)
{
	alert(strMessage);
	window.open(strURL, strTarget);
}