//window.onerror = function(){ return true; }


if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();


/*
window.onresize=resize;
function resize(){
self.location.href=self.location.href;
}
*/
function makeNavImage(name,width,height){
this.name_on="nav_" + name +"_on.gif";
this.name_off="nav_" + name +"_off.gif";
this.width=width;
this.height=height;
this.newimage_on = new Image(width,height);
this.newimage_on.src = dir + '/images/' + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = dir + '/images/' + this.name_off;
}


function img_act(imgName){

document[imgName].src =  navitems[imgName].newimage_on.src;
}

function img_inact(imgName){
window.status = "";
document[imgName].src =  navitems[imgName].newimage_off.src;
}


document.write('<img src="'+dir+'/images/wcscreenrez.gif?width='+screen.width+'&height='+screen.height+'" width="1" height="1">'); 


function target_blank(url){
    tmp = window.open(url);
    tmp = null;
}

function wcInternalPopup(url, height, width){
    var wide=width;
    var tall=height;
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = (((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = 'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'internalpopup',features);
} 

function wcPopup(url, height, width, disclaimer){
    var wide=width;
    var tall=height;
    var halfwide = (wide/2);
    var halftall = (tall/2);
    var pWidth = (((parseInt(screen.width) / 2)) - halfwide);
    var pHeight = (((parseInt(screen.height) / 2)) - halftall);
    var features = 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,width='+wide+',height='+tall+',top='+pHeight+',left='+pWidth;
    window.open(url,'externalpopup',features);
} 


/************************************************************************************************************
* This function is used in the onclick of the a tag to display the external site warning. 
* @param msg - Integer specifying the which message to display.
* @param lk - The a link object
* Usage: <a href="http://wwww.mysite.com" onclick="return displayThirdPartyAlert(1,this);">My Site</a>
**************************************************************************************************************/
function displayThirdPartyAlert(msg,lk){
	var description = lk.innerHTML;
	if(description.indexOf('alt="') != -1){
		var x = description.indexOf('alt="')+5;
		var temp = description.substring(x);
		description = temp.substring(0,temp.indexOf("\""));
	}
	showWarning(lk.href, description, lk.target, msg)
	return false;
}

/************************************************************************************************************
* This function is used in the href of the a tag to display the external site warning. 
* @param lk - The url of the site to be opened
* @param desc - The description of the site to be opened, i.e. the name of the site.
* @param target - Allows for the window to opened in a new window
* @param msg - Integer specifying the which message to display.
* Usage: <a href="javascript:('http://wwww.mysite.com');">My Site</a>
**************************************************************************************************************/
function showWarning(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "_top";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(6);
	messages[0] = '<h2>Third Party Site Disclaimer</h2><br/>You are leaving Rockland Federal Credit Union\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Rockland Federal Credit Union. The site you are about to visit may have a privacy policy that is different than Rockland Federal Credit Union\'s. Please review their privacy policy. Rockland Federal Credit Union does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[1] = '<h2>Third Party Site Disclaimer</h2><br/>You are leaving Rockland Federal Credit Union\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Rockland Federal Credit Union. The site you are about to visit may have a privacy policy that is different than Rockland Federal Credit Union\'s. Please review their privacy policy. Rockland Federal Credit Union does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[2] = '<h2>Third Party Site Disclaimer</h2><br/>You are leaving Rockland Federal Credit Union\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Rockland Federal Credit Union. The site you are about to visit may have a privacy policy that is different than Rockland Federal Credit Union\'s. Please review their privacy policy. Rockland Federal Credit Union does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[3] = '<h2>Third Party Site Disclaimer</h2><br/>You are leaving Rockland Federal Credit Union\'s website. Links that may be accessed via <strong>' +desc+ '</strong> are for the convenience of informational purposes only. Any products and services accessed through <strong>'+ lk +'</strong> are not provided or guaranteed by Rockland Federal Credit Union. The site you are about to visit may have a privacy policy that is different than Rockland Federal Credit Union\'s. Please review their privacy policy. Rockland Federal Credit Union does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[4] = '<h2>E-mail Disclaimer</h2><br />WARNING: E-mail is an unsecure method of communication.  Any information contained in your message could be viewed by a third party.  Sensitive information such as passwords or social security numbers should be omitted from e-mail messages.';
	
	messages[5] = '<h2>USA Patriot Act</h2><br/>Customer Identification Requirements<br /><br />In accordance with Section 326 of the USA Patriot Act, applicants for new accounts are requested to provide current picture identification that verifies identity including name, address and other identifying information.<br /><br />In some cases, identification will be requested for current account holders if original documentation was not obtained with the opening of the account. In all cases, protection of our customers\' identity and confidentiality is our pledge to you. <br /><br />We proudly support all efforts to protect and maintain the security of our customers and our country.';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="'+lk+'" target="'+target+'" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0);
}

function openIB(){
    showMessage();
}

function show_warning(url){
var content = new Array();
var index = 0;
content[index++] = "<h2>Third Party Site Disclaimer</h2>By accessing the noted link you will be leaving your financial institution's website and entering a website hosted by another party. Your financial institution has not approved this as a reliable partner site.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of your financial institution's website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of your financial institution's.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"javascript:void('0');\" onclick=\"window.open('"+url+"');document.getElementById('ex_dis').style.display = 'none'\">Continue</a>&nbsp;&nbsp;<a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Decline</a></div></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}

function show_patriot(lk){
var content = new Array();
var index = 0;
content[index++] = "<h2>USA Patriot Act</h2><br/>Customer Identification Requirements<br /><br />In accordance with Section 326 of the USA Patriot Act, applicants for new accounts are requested to provide current picture identification that verifies identity including name, address and other identifying information.<br /><br />In some cases, identification will be requested for current account holders if original documentation was not obtained with the opening of the account. In all cases, protection of our customers\' identity and confidentiality is our pledge to you. <br /><br />We proudly support all efforts to protect and maintain the security of our customers and our country.";
content[index++] = "<br /><br /><br />";
content[index++] = '<div align="center"><a href="javascript:void(0);" onclick="wcPopup(\''+lk+'\',\'600\',\'800\');document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Decline</a></div></div>';
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}

/**
 *	Please use this function instead of show_patriot() for forms that link to other forms.
 *	IE6 can't handle opening a new window that's given the same name as the current window.
 */
function show_patriot2(lk){
var content = new Array();
var index = 0;
content[index++] = "<h2>USA Patriot Act</h2><br/>Customer Identification Requirements<br /><br />In accordance with Section 326 of the USA Patriot Act, applicants for new accounts are requested to provide current picture identification that verifies identity including name, address and other identifying information.<br /><br />In some cases, identification will be requested for current account holders if original documentation was not obtained with the opening of the account. In all cases, protection of our customers\' identity and confidentiality is our pledge to you. <br /><br />We proudly support all efforts to protect and maintain the security of our customers and our country.";
content[index++] = "<br /><br /><br />";
content[index++] = '<div align="center"><a href="\''+lk+'\'">Continue</a>&#160;&#160;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Decline</a></div></div>';
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}

function refuse() {
/*
document.getElementById('ex_dis').style.display = 'none';
history.go(-1);
*/
self.close();
}

function email_warning(url){
    url = "mailto:"+url;
   //content creation
   var content = new Array();
          var index = 0;
   content[index++] = '<h3>E-mail Disclaimer</h3><br />WARNING: E-mail is an unsecure method of communication.  Any information contained in your message could be viewed by a third party.  Sensitive information such as passwords or social security numbers should be omitted from e-mail messages.';
   content[index++] = '<br /><br /><br />';
   content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Decline</a></div></div>'; 
   document.getElementById("ex_dis").innerHTML = content.join("");
   document.getElementById("ex_dis").style.display = "block";
   scrollTo(0, 0);
}

function checkSize()
{
    var width = 800; // Default window width is 800px

    if ( typeof(window.innerWidth) == 'number' ) { width = window.innerWidth; } //Non-IE
    else if ( document.documentElement && ( document.documentElement.clientWidth ) ) { width = document.documentElement.clientWidth; } //IE 6+ in 'standards compliant mode'
    else if ( document.body && ( document.body.clientWidth ) ) { width = document.body.clientWidth; } //IE 4 compatible

    return width;
}
  
document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: left; position:absolute; top:125px; left:' + (parseInt(checkSize()/2)-175) + 'px; border: thin solid #163275; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');


function sReplace(str)
{  // replace strings in the SD so the FI can bold text, creatd line breaks, etc.
	var result = (str == "") ? "&#160;" : str;
	while (result.indexOf("(br)") > -1) result = result.replace(/\(br\)/, "<br />");
	while (result.indexOf("(sup)") > -1) result = result.replace(/\(sup\)/, "<sup>");
	while (result.indexOf("(/sup)") > -1) result = result.replace(/\(\/sup\)/, "</sup>");
	while (result.indexOf("(bold)") > -1) result = result.replace(/\(bold\)/, "<strong>");
	while (result.indexOf("(/bold)") > -1) result = result.replace(/\(\/bold\)/, "</strong>");
	return result;
}



//end of file