/*window.onresize=resize;
function resize(){
if (!window.homepage)
	{
	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="http://www.pnwfcu.org/site/";
    securedir="https://www.pnwfcu.org/site/";
    homedir="";
}
else if(window.absolutepage) {
imgdir="http://www.pnwfcu.org/images/"
sitedir="http://www.pnwfcu.org/site/"
securedir="http://www.pnwfcu.org/site/"
homedir="http://www.pnwfcu.org/"
}
else if(window.securepage)
{
imgdir="https://www.pnwfcu.org/images/"
sitedir="http://www.pnwfcu.org/site/"
securedir="https://www.pnwfcu.org/site/"
homedir="http://www.pnwfcu.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 navitems = new Array();
navitems["personal"] = new makeNavImage("personal",78,34);
navitems["business"] = new makeNavImage("business",77,34);
navitems["auto"] = new makeNavImage("autocenter",78,35);
navitems["loans"] = new makeNavImage("loans",56,34);
navitems["invest"] = new makeNavImage("invest",76,34);
navitems["mortgage"] = new makeNavImage("mortgage",99,34);
navitems["membered"] = new makeNavImage("membered",89,34);

/*  removed 200-95379 - 6/07
//switch to detect TPV header
if (window.TPVPage){
navitems["membered"] = new makeNavImage("membered_TPV",89,34);
}
else{
navitems["membered"] = new makeNavImage("membered",89,34);
}
*/


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){
self.location.href = "https://www.pnwfcu.org/Forms/OnlineForm.cgi?onweb=true&form=" + nameofapp;
}


function openPdf(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(sitedir+'pdf/'+ url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

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.pnwfcu.org/onlineserv/HB/demo.html");
//else openWin("https://www.pnwfcu.org/onlineserv/HB/")
}

function showWarning(url){
var content = new Array();
var index = 0;
content[index++] = "<h3 align='center'>Third Party Site Disclaimer</h3>By accessing the noted link you will be leaving Pacific Northwest Federal Credit Union's website and entering a website hosted by another party. Pacific Northwest Federal Credit Union 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 Pacific Northwest Federal Credit Union'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 Pacific Northwest Federal Credit Union's.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href='javascript:window.location=\""+url+"\";'>Continue</a>&nbsp;&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 showMessage(){
var content = new Array();
var index = 0;
content[index++] = "Due to the enhancements we are adding to our website, Account Access will be unavailable from 9:30am to 10:30am PST on Tuesday, November 15. Our Call Center will be available to help you during this time.";
content[index++] = "<br /><br /><br />";
content[index++] = "<div align=\"center\"><a href=\"javascript:void('0');\" onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Close</a></div></div>";	
document.getElementById("ex_dis").innerHTML = content.join("");
document.getElementById("ex_dis").style.display = "block";
scrollTo(0, 0);
}


function showMail(url){
var content = new Array();
var index = 0;
content[index++] = "<div align='center'><h3 align='center'>Please Note</h3>This is <strong>NOT</strong> secure e-mail, do not send personal/financial information. ";
content[index++] = "<br /><br />";
content[index++] = "<div align=\"center\"><a href='"+url+"' onclick=\"document.getElementById('ex_dis').style.display = 'none'\">Continue</a>&nbsp;&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 writeImage()
{
var ImageNum = (rand(46)); //Number of images, images are all named "img_" + number
var pic = imgdir+'img_'+ImageNum+'.jpg';
var imgCode='<img src='+pic+' width="186" height="115" alt="" />';	
document.write(imgCode);

}//end writeImage


function rand(number) 
{
return Math.ceil((Math.random()* number));       
}



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:350px; border: thin solid #1A448E; padding: 15px; display: none; z-index: 3000; width:350px;"></div>');
// OTHER FUNCTIONS ABOVE


function sendEmail(address)
{
	var msg = "This email is not secure.  Click OK to continue.";
	
	if (confirm(msg))
		document.location = "mailto:"+address;
}



