/* These functions adds a disclosure to all off site links */
var links;
linkDisclosure = 	"You are leaving the Gratiot Community Credit Union Web site. The Web site you have selected is an external one located on another server. Gratiot Community Credit Union has no responsibility for any external Web site. It neither endorses the information,content, presentation, or accuracy nor makes any warranty, express or implied, regarding any external site. Thank you for visiting the Gratiot Community Credit Union Web site.";

function addLinkDisclosure () {
	if(!document.getElementsByTagName || !document.domain) return false; // exit if we can't do it
	
	var offSite = new Array; 								// For our link that lead off site
	var domain = document.domain;							// The domain of the current document
	domain = domain.replace('www.', '');					// To make things consistant take out "www."
	var domainRegex = new RegExp(domain+"|mailto|cuanswers\.com|itsme247\.com", "i"); 	// Cuz vars in /regexes/ can be sticky
	links = document.getElementsByTagName('A'); 			// An array of all our page link objects
	for(var i=0; i<links.length; i++) {
		if(!links[i].href.match(domainRegex)) {
			offSite.push(links[i].href);
			links[i].target = "_blank";
			links[i].onclick = function () {
				return window.confirm(linkDisclosure);
			}
		}
	}
}