//window.onresize=resize;
//function resize(){
//self.location.href=self.location.href;
//}

if(window.event + "" == "undefined") event = null;
function showMenu(){return false};
function mout(){return false};
function dummyObject() {this.mout=mout};
oM = new dummyObject();

// CALL TO CORRECT DIRECTORY BELOW
var imgdir = "../images/";
var sitedir = "";
var securedir = "";
var homedir = "../";


if
(window.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}


else if(window.fcfs_page)
{
imgdir="../images/"
sitedir="../site/"
securedir="../site/"
homedir="../"
}



else if(window.absolutepage)
{
imgdir="http://www.plus4cu.org/images/"
sitedir="http://www.plus4cu.org/site/"
securedir="http://www.plus4cu.org/site/"
homedir="http://www.plus4cu.org/"
}
else if(window.securepage)
{
imgdir="https://www.plus4cu.org/images/"
sitedir="http://www.plus4cu.org/site/"
securedir="https://www.plus4cu.org/site/"
homedir="http://www.plus4cu.org/"
}
// CALL TO CORRECT DIRECTORY ABOVE

// ROLLOVER CODE BELOW
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 = imgdir + this.name_on;
this.newimage_off = new Image(width,height);
this.newimage_off.src = imgdir + this.name_off;
}

var nav_heights=21;

var navitems = new Array();
navitems["home"] = new makeNavImage("home",43,nav_heights);
navitems["about"] = new makeNavImage("about",56,nav_heights);
navitems["products"] = new makeNavImage("products",109,nav_heights);
navitems["membership"] = new makeNavImage("membership",70,nav_heights);
navitems["applications"] = new makeNavImage("applications",139,nav_heights);
navitems["tools"] = new makeNavImage("tools",100,nav_heights);

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;
}
// ROLLOVER CODE ABOVE

// OTHER FUNCTIONS BELOW
function openWin(url,name,width,height,options){
var n = name;
var w = width;
var h = height;
var o = options;
n = (n==null)?"_blank":n;
w = (isNaN(w) || w==null)?700:w;
h = (isNaN(h) || h==null)?600:h;
o = (o==null)?"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1":(o.indexOf(",")!=0)?","+o:o;

var posX = Math.ceil((parseInt(screen.width) - w) / 2);
var posY = Math.ceil((parseInt(screen.height) - h) / 2);
aWindow = window.open(url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function open_apps(nameofapp){
window.open("https://www.plus4cu.org/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp);
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function openIB(page){
if (page=="demo") self.location.href = homedir+"index.html?demo";
else self.location.href = homedir+"index.html";
//if (page=="demo") openWin("https://www.plus4cu.org/onlineserv/HB/demo.html");
//else openWin("https://www.plus4cu.org/onlineserv/HB/")
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function openCM(type){
    if(type == ""){
self.location.href="https://www.plus4cu.org/onlineserv/CM/";
}
    else if(type == "demo"){
self.location.href="http://www.cmdemo.com/customer_demo/index.html";
}
    else{
self.location.href="https://www.plus4cu.org/onlineserv/CM/";
}
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 function showWarning(url){
	//content creation
	var content = new Array();
        var index = 0;
	
	if (url == "IB_warning") {
    	content[index++] = '<div align="left">Please note that a phishing email is circulating via email asking that members fill out a survey with a chance to receive a $50 credit to their card. It is from a Houston Postal email address and it imitates our old HPCU website. This email is not a legitimate email and you should not enter any information to this website. It asks for your card number, expiration date and a PIN.  Do not answer the survey or click on the link.  This is not a legitimate offer from Plus4 Credit Union.  Plus4 will not ask for your personal information or PIN number. If you are a member of Plus4 and have entered your information to this website, please contact us immediately at 713-970-6200 so we can take the appropriate steps to safeguard your account.</div>';
    	content[index++] = '<br /><br /><br />';
    	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Close</a></div></div>';	
	} else if (url == "disable_apps") {
        content[index++] = '<div align="left">Our online applications are temporarily unavailable. Please print out the pdf version of our electronic application and fax, mail or email it according to the instructions on the form. We apologize for any inconvenience this may cause.</div>';
    	content[index++] = '<br /><br /><br />';
    	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Close</a></div></div>';	
    } else {
    	content[index++] = '<span class="header">Third Party Site Disclaimer</span><br />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. The credit union does not represent either the third party or the member if the two enter into a transaction. 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+'">Continue</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">Decline</a></div></div>';	
    }
		
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:3% 3%; border: thin solid #660033; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=003366,offX=7,offY=8,positive=true); "></div>');

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


 function EFT_Warning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<strong>Have you read the EFT Disclosure and agree to all the terms stated?</strong><br />';
	content[index++] = '<br />';
	content[index++] = '<div align="center"><a href="https://www.plus4cu.org/Forms/OnlineForm.cgi?onweb=true&form=visa_app">I Agree</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">I Do Not Agree</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #5E70D4; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=5E70D4,offX=7,offY=8,positive=true); "></div>');


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



 function EFT_MEM(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<strong>Have you read and agreed to the terms and conditions in the membership booklet?</strong><br />';
	content[index++] = '<br />';
	content[index++] = '<div align="center"><a href="https://www.plus4cu.org/Forms/OnlineForm.cgi?onweb=true&form=membership_app">I Agree</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">I Do Not Agree</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #5E70D4; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=5E70D4,offX=7,offY=8,positive=true); "></div>');


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


 function EFT_Visa_Warning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<strong>Have you read the EFT Disclosure and agree to all the terms stated?</strong><br />';
	content[index++] = '<br />';
	content[index++] = '<div align="center"><a href="https://www.plus4cu.org/Forms/OnlineForm.cgi?onweb=true&form=visa_app">I Agree</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">I Do Not Agree</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #5E70D4; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=5E70D4,offX=7,offY=8,positive=true); "></div>');


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



 function EFT_Warning_OB(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<strong>Have you read the EFT Disclosure and agree to all the terms stated?</strong><br />';
	content[index++] = '<br />';
	content[index++] = '<div align="center"><a href="https://www.plus4cu.org/Forms/OnlineForm.cgi?onweb=true&form=visa_app">I Agree</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'">I Do Not Agree</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}
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: center; position:absolute; margin:25% 25%; border: thin solid #5E70D4; padding: 15px; visibility: hidden;z-index: 300; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=5E70D4,offX=7,offY=8,positive=true); "></div>');


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////




function open_EFT_pop()
{
window.open('http://www.plus4cu.org/site/eft_disclosure_pop.pdf','EFT','width=620,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no')
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	

function open_terms_pop()
{
window.open('http://www.plus4cu.org/site/terms_conditions	_pop.html','Terms','width=620,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no')
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


function open_Membership_Booklet_pop()
{
window.open('http://www.plus4cu.org/site/membership_booklet.html','EFT','width=620,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no')
}

function openWindow(page) {
	window.open(page,'newWin','width=620,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
}

