// JavaScript Document

/************************************************************************************************************
* 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 : "_blank";
	msg = (msg) ? msg : 1;
	
	var messages = new Array(7);
	
	messages[0] = '<h2 align="center">Third Party Site Disclaimer</h1><br/>You are leaving State Center 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 State Center Credit Union. The site you are about to visit may have a privacy policy that is different than State Center Credit Union\'s. Please review their privacy policy. State Center 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. The credit union does not represent either the third party or the member, if the two enter into a transaction.  Privacy and security policies may differ from those practiced by the Credit Union.';
	
	messages[1] = '<h2 align="center">Third Party Site Disclaimer</h1><br/>These links to other web sites are provided to assist you in locating information. Once you click on a link, you will leave the credit union\'s web site and link to an alternate site that is not operated by the credit union. The fact that there is a link between State Center Credit Union\'s web site and another does not constitute endorsement for any product, service or organization. The credit union has no responsibility for the content of and does not guarantee the accuracy of any information on any of the sites listed. The credit union does not represent either the third party or the member if the two enter into a transaction. Privacy and security policies of other web sites may differ from those practiced by the credit union. ';
	
	messages[2] = '<h2 align="center">Non-Secure Email Disclaimer</h1><br/>As a convenience to you and to provide additional means of communications between you and State Center Credit Union, you can use electronic mail (e-mail) to contact the credit union regarding general inquiries and general access and maintenance issues. However communication via e-mail is not considered secure, and you agree that you will not use e-mail to transmit sensitive and/or confidential information such as account numbers, user IDs, or PINs, or to request or authorize any financial transaction.';
	
	messages[3] = '<h2 align="center">CU Members Mortgage Notice</h2><br />State Center Credit Union (SCCU) has Partnered with CU Members Mortgage to provide SCCU and its members with various home financing options to complement those offered by the credit union. <br /><br />By accessing the noted link you will be leaving your credit union\'s website and entering a website hosted by another party. Although your credit union has 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 credit union\'s website. We encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of your credit union. The credit union is not responsible for the content of the alternate web site. The credit union does not represent either the third party or the member if the two enter into a transaction. ';
	
	messages[4] = '<h3 align="center">You Are About To Leave<br />State Center Credit Union\'s Web Site.</h1><br />The web site you have selected is an external one located on another server.  While State Center Credit Union has no responsibility for any external web site, this is a trusted partner of State Center Credit Union and all information is maintained in a secure environment.<br /><br />State Center Credit Union makes no warranty, express or implied, regarding any external site. The credit union does not represent either the third party or the member, if the two enter into a transaction.  Privacy and security policies may differ from those practiced by the Credit Union.<br /><br /><br /><img src="https://www.statecentercu.com/htdocs/images/scculogo_popup.gif" width="190" height="43" /><br /><br />';
	
	messages[5] = '<h2 align="center">Homeowners Insurance Quote Transfer Notice</h3><br />You are about to leave State Center Credit Union\'s web site.<br /><br />The web site you have selected is an external one located on another server.  While State Center Credit Union has no responsibility for any external web site, this is a trusted partner of State Center Credit Union and all information is maintained in a secure environment.<br /><br />State Center Credit Union makes no warranty, express or implied, regarding any external site. The credit union does not represent either the third party or the member, if the two enter into a transaction.  Privacy and security policies may differ from those practiced by the Credit Union.<br /><br />';

	messages[6] = '<h2 align="center">Long Term Care Transfer Notice</h2><br />You are now leaving this site and will be transferred to a non-affiliated site that is not owned or controlled by State Center Credit Union.<br /><br />Insurance policies are not obligations of, deposits of, or guaranteed by State Center Credit Union.  Insurance policies are not insured by the National Credit Union Share Insurance Fund or any other agency of the United States, or State Center Credit Union.  Approval of any loan application will not be affected by your choice of insurer, agent, or broker. The credit union does not represent either the third party or the member, if the two enter into a transaction. Privacy and security policies may differ from those practiced by the Credit Union.<br /><br />The CUNA Mutual Group is licensed in all States and the District of Columbia (DC).';

	messages[7] = 'Personal information you enter on this form may be retained in the computer\'s cache file and may be visible to others who access this form from the same computer.  We strongly recommend that you do not use a <span style="text-decoration: underline;">public computer</span> to complete this form online.  Click continue if you understand and would like to open the online application.';
	
	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<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=\""+url+"\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Continue</a>  <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 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);
}
  
document.write('<div style="width:90%; text-align:center; position:absolute; top:50px; margin:0 auto;"><div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: center; margin:0 auto; border: thick solid #1974B3; padding: 15px; display: none; z-index: 3000; width:360px;"></div></div>');

function openPDF(page)
{
bWindow = window.open('fiFiles/static/documents/'+page,'newWin');
	bWindow = null;
	return;
}

function openNewsletter(which) {
	if (which != "")
	{
		openPDF(which);
	}
		
}

function openNewWin(page)
{
bWindow = window.open(page,'newWin');
	bWindow = null;
	return;
}

//end of file