function emailLink($thisEmail)
	{
		sendEmail = confirm('This email does not use SSL technology and is not secure. \r\n\r\nPlease do not send private information like account numbers or social security numbers. If you have account-specific questions, please call the credit union.\r\n\r\nDo you still want to send the email? Click "OK" for yes, "Cancel" for no.');
		if (sendEmail) {
			document.location='mailto:'+$thisEmail;
		}
		else {
			return false;
		}
	}

/*No unwanted email for this little website*/
function contact($name, $domain)
{
	$atmark='&#64;';
	$allTogetherNow=$name+$atmark+$domain;
	$result='<a href="mailto:'+$allTogetherNow+'" title="Click to send an email to the credit union." onclick="emailLink(\''+$allTogetherNow+'\'); return false;">'+$allTogetherNow+'</a>';
	return $result;
}

function loginCheck()
{
  document.login.target='_top';
  if (document.login['LoginName'].value=='' || document.login['LoginPin'].value=='')
    {alert("You need to add your username and password to log in."); return false;}
  else
    {return true;}
}

function popUpLink(winWidth, winHeight)
{
	var poppedWin=window.open('', "popUpWin", "scrollbars, resizable, width="+winWidth+", height="+winHeight);
	with(poppedWin.document) {
		write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\r\n');
		write('<html>\r\n<head>\r\n');
		write('<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">\r\n');
		write('<title>Leaving the Site</title>\r\n');
		write('<style>\r\n\tbody {margin:0; background-color:#fff; color:#000; font: .95em verdana, sans-serif;}\r\n\th1 {background-color:#9dae6d; color:#fff; margin:0 0 10px; border-bottom:2px solid #000; padding:5px 10px; font-size:1.75em;}\r\n\t#popupcontent {margin:0 10px;}\r\n\t#popupcontent p {margin:0 0 .75em;}\r\n\t.fineprint {border-top:1px solid #000; padding: .5em 0 0; font-size:85%; font-style:italic;}\r\n</style>\r\n');
		write('<sc'+'ript type="text/javascript">\r\nfunction selfDestruct() {\r\n\tvar dieWindow=setTimeout(\'this.close()\', 15000);\r\n}\r\n</sc'+'ript>\r\n');
		write('</head>\r\n');
		write('<body onLoad="selfDestruct()" id="popup" onblur="this.focus();">\r\n');
		write('<h1>Now Leaving this Site</h1>\r\n');
		write('<div id="popupcontent">\r\n');
		write('<p>To assist members in accessing information not maintained on this site, the Credit Union provides links to other Internet addresses. Be advised that:</p>\r\n');
				write('<ol>\r\n<li>By clicking on any link to other Internet addresses, you are leaving the Credit Union\'s web site;</li>\r\n');
				write('<li>You are linking to an alternate web site not operated by the Credit Union;</li>\r\n');
				write('<li>The Credit Union is not responsible for the content of the alternate web site; </li>\r\n');
				write('<li>The Credit Union does not represent either the third party or the member if the two enter into a transaction;</li>\r\n');
				write('<li>Privacy and security policies may differ from those practiced by the Credit Union;</li>\r\n</ol>\r\n');
		write('<p class="fineprint">This window will close itself after 15 seconds.  We\'re sorry for the inconvenience.</p>\r\n');
		write('</div>\r\n');		
		write('</body>\r\n</html>\r\n');
		close();
	}
	poppedWin.moveTo(((screen.width/2)-(winWidth/2)),((screen.height/2)-(winHeight/2)));
	poppedWin.focus();
}

function externalLinks()
{
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchorElement = anchors[i];
		if (anchorElement.getAttribute("href") && anchorElement.getAttribute("rel") == "new") {
			anchorElement.target = "_blank";
		}
		
		if (anchorElement.getAttribute("href") && anchorElement.getAttribute("rel") == "pdf") {
			anchorElement.target = "_blank";
		}
	}
}

function startUp() {
	externalLinks();
}

window.onload=startUp;