Email Disclaimer
/* Email utility function */
function openEmailLink(passedAddress) {
window.location.href = 'mailto:' + passedAddress; // Open the email URI, which will open the default email program.
window.setTimeout(function(){history.back()},500); // Go back to the previous page after 500 milliseconds.
}
/* Escape HTML utility function
* 1. Recursively decode the URL.
* 2. Use the replace() method to strip out known problematic characters.
*/
function escapeHTML(URL) {
/* Recursively decode the URL. */
var newURL = decodeURI(URL); // Decode the original URL and assign the value to a new variable called "newURL".
if (newURL != URL) { // If the new URL does not match the original...
newURL = escapeHTML(newURL); // Pass the new URL through the escapeHTML utility function again.
}
/* Use the replace() method to strip out known problematic characters. */
return newURL.replace(//g, '') // Replace greater than sign.
.replace(/'/g, '') // Replace single quote.
.replace(/"/g, '') // Replace double quotes.
.replace(/\+/g, '') // Replace plus sign.
.replace(/\(/g, '') // Replace open paren.
.replace(/\)/g, '') // Replace close paren.
.replace(/\{/g, '') // Replace open curly brace.
.replace(/\}/g, '') // Replae close curly brace.
.replace(/\r/g, '') // Replace carriage returns.
.replace(/\n/g, ''); // Replace new lines.
}
/* Get the URL
* 1. Get the URL from the URL parameter in the address bar.
* 2. Pass the URL through the escapeHTML utility function.
* 3. Use the encodeURI() function to encode the resulting URL.
*/
var URL = encodeURI(escapeHTML(location.search.substring(1)/*1*/)/*2*/)/*3*/;
/* Set the name of the FI */
var FI_NAME = 'First Eagle Bank';
/* Set the message text
* There's no need for any popup message anymore.
* Don't edit the last two lines that contain the links unless absolutely necessary.
* Make sure there is no target attribute on the Continue link when you use the openExternalLink() function.
*/
var message = 'Notice: Because there is a small risk that information transmitted via ';
message += 'Internet email could fall into the wrong hands, ' + FI_NAME + ' ';
message += 'suggests that confidential information, such as account numbers or ';
message += 'social security numbers, not be transmitted via email. Instead, please ';
message += 'contact ' + FI_NAME + ' directly at your nearest bank branch. Thank you.';
/* Do not edit the next two lines unless absolutely necessary */
links = '
Continue | ';
links += 'Go Back
';
/* Write the message into the document. */
document.write(message);
document.write(links);