if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;


/*
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
*/
document.write('<meta name="keywords" content="Atlanta Postal Credit Union, Federal, Credit , Union, apcu, A financial institution of excellence, featuring secure Internet-based services including Home Banking, Bill Payment, Bill Presentment, Quicken and Money interfaces, Stock Quotes, on-line applications, financial calculators, useful links and a wealth of financial information">');
/* MDM 03-25-10 change: Added this to the head to reduce CACHE issues */
document.write('<META HTTP-EQUIV="Pragma" CONTENT="no-cache"><META HTTP-EQUIV="Expires" CONTENT="-1">');
/* MDM End 03-25-10 change */
document.write('<meta name="description" content="ATM, ATM Locations, Account Access, Account Transfer, Automobile Loans, AutoVantage, Bank, Bank Account, Banking, Bill Payment, Bill Presentment, Brokerage, Cash, CDs, Certificates of Deposit, Checks, Checking Accounts, Consumer Loans, Convenience Services, Credit, Credit Card, Credit Card Applications, Credit Union, Digital Insight, Finance, Financial Calculator, Financial Institution, Financial Wizard, Loans, Home Loans, IRA, Money, Term Investment, Online Banking, Order Checks, Personal Financial Management, Rates, Mortgage Rates, Loan Rates, Terms, Retirement, Savings Accounts, Savings, Savings and Loan, Stock Quotes, Stocks, Student, Term Share Certificates, Thrifts, Visa Credit Cards">');
/*
META TAGS CONTENT AND DESCRIPTION ABOVE
META TAGS CONTENT AND DESCRIPTION ABOVE
META TAGS CONTENT AND DESCRIPTION ABOVE
*/


/*
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
*/

//to disable the right click functionality 
/*document.oncontextmenu = function() { hideContext();return false; } 
function hideContext(){
	alert('Sorry, right click functionality has been disabled.');
	return false;
}*/


//if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly

var imgdir;
var sitedir;
var securedir;
var homedir;

if (window.location.href.search( /https:\/\/skynet\.diginsite\.com/ ) == 0) {
	/* testing images on skynet */
	imgdir="https://skynet.diginsite.com/staging/apcu/apcudocs/images/";
	/* testing scripts on skynet */
	sitedir="https://skynet.diginsite.com/staging/apcu/apcudocs/site/";
	/* testing scripts on skynet */
	securedir="https://skynet.diginsite.com/staging/apcu/apcudocs/site/";
	homedir="/";
}
else if(window.homepage)
{
	/* testing images on skynet */
	/* imgdir="https://skynet.diginsite.com/staging/apcu/apcudocs/images/" */
	imgdir="/images/";
	/* testing scripts on skynet */
	//var sitedir="https://skynet.diginsite.com/staging/apcu/apcudocs/site/"
	var sitedir="/site/";
	/* testing scripts on skynet */
	//var securedir="https://skynet.diginsite.com/staging/apcu/apcudocs/site/"
	var securedir="/site/";
	homedir="/"
}
else if(window.absolutepage)
{
	imgdir="/images/";
	sitedir="/site/";
	securedir="/site/";
	homedir="/";
}
else if(window.securepage)
{
	imgdir="/images/";
	sitedir="/site/";
	securedir="/site/";
	homedir="/";
}
else
{
	imgdir="../images/";
	sitedir="";
	securedir="";
	homedir="../";
}

// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW


browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (((browserName == "Netscape") && (browserVer >= 3)) || ((browserName =="Microsoft Internet Explorer") && (browserVer >= 4)))
{
version = "ok";
rates_on = new Image();
rates_on.src = imgdir + "nav-rates-on.gif";

rates_off = new Image();
rates_off.src = imgdir + "nav-rates-off.gif";

member_on = new Image();
member_on.src = imgdir + "nav-member-on.gif";

member_off = new Image();
member_off.src = imgdir + "nav-member-off.gif";

onlineservices_on = new Image();
onlineservices_on.src = imgdir + "nav-onlineservices-on.gif";

onlineservices_off = new Image();
onlineservices_off.src = imgdir + "nav-onlineservices-off.gif";

infodesk_on = new Image();
infodesk_on.src = imgdir + "nav-infodesk-on.gif";

infodesk_off = new Image();
infodesk_off.src = imgdir + "nav-infodesk-off.gif";

contactus_on = new Image();
contactus_on.src = imgdir + "nav-contactus-on.gif";

contactus_off = new Image();
contactus_off.src = imgdir + "nav-contactus-off.gif";

whatsnew_on = new Image();
whatsnew_on.src = imgdir + "nav-whatsnew-on.gif";

whatsnew_off = new Image();
whatsnew_off.src = imgdir + "nav-whatsnew-off.gif";

home_on = new Image();
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image();
home_off.src = imgdir + "nav-home-off.gif";

lending_on = new Image();
lending_on.src = imgdir + "nav-lending-on.gif";

lending_off = new Image();
lending_off.src = imgdir + "nav-lending-off.gif";

savings_on = new Image();
savings_on.src = imgdir + "nav-savings-on.gif";

savings_off = new Image();
savings_off.src = imgdir + "nav-savings-off.gif";

realestate_on = new Image();
realestate_on.src = imgdir + "nav-realestate-on.gif";

realestate_off = new Image();
realestate_off.src = imgdir + "nav-realestate-off.gif";

convenience_on = new Image();
convenience_on.src = imgdir + "nav-convenience-on.gif";

convenience_off = new Image();
convenience_off.src = imgdir + "nav-convenience-off.gif";

business_lending_on = new Image();
business_lending_on.src = imgdir + "nav-business_lending-on.gif";

business_lending_off = new Image();
business_lending_off.src = imgdir + "nav-business_lending-off.gif";

frc_on= new Image();
frc_on.src= imgdir + "nav-frc-on.gif";

frc_off= new Image();
frc_off.src= imgdir + "nav-frc-off.gif";

/*planit_on= new Image();
planit_on.src= imgdir + "nav-planit-on.gif";

planit_off= new Image();
planit_off.src= imgdir + "nav-planit-off.gif";*/


fstc_on= new Image();
fstc_on.src= imgdir + "nav-fstc-on.gif";

fstc_off= new Image();
fstc_off.src= imgdir + "nav-fstc-off.gif";

go_on = new Image();
go_on.src = imgdir + "nav-go-on.gif";

go_off = new Image();
go_off.src = imgdir + "nav-go-off.gif";

demo_on = new Image();
demo_on.src = imgdir + "nav-demo-on.gif";

demo_off = new Image();
demo_off.src = imgdir + "nav-demo-off.gif";

apply_on = new Image();
apply_on.src = imgdir + "nav-apply-on.gif";

apply_off = new Image();
apply_off.src = imgdir + "nav-apply-off.gif";

reset_on = new Image();
reset_on.src = imgdir + "nav-reset-on.gif";

reset_off = new Image();
reset_off.src = imgdir + "nav-reset-off.gif";

submit_on = new Image();
submit_on.src = imgdir + "nav-submit-on.gif";

submit_off = new Image();
submit_off.src = imgdir + "nav-submit-off.gif";

backtotop_on = new Image();
backtotop_on.src = imgdir + "nav-backtotop-on.gif";

backtotop_off = new Image();
backtotop_off.src = imgdir + "nav-backtotop-off.gif";

investments_on = new Image();
investments_on.src = imgdir + "nav-investments-on.gif";

investments_off = new Image();
investments_off.src = imgdir + "nav-investments-off.gif";

youth_on = new Image();
youth_on.src = imgdir + "nav-youth-on.gif";

youth_off = new Image();
youth_off.src = imgdir + "nav-youth-off.gif";

consumer_on = new Image();
consumer_on.src = imgdir + "clearpix.gif";

consumer_off = new Image();
consumer_off.src = imgdir + "clearpix.gif";


}
else
version = "x";

function img_act(imgName)
{
if (version == "ok")
{
imgOn = eval(imgName + "_on.src");
document [imgName].src = imgOn;
}
}

function img_inact(imgName)
{
window.status = "";
 if (version == "ok")
{
imgOff = eval(imgName + "_off.src");
document [imgName].src = imgOff;
}
}

// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE

//style sheet sniffer
document.write('<scr'+ 'ipt src="' + securedir + '_styles.js"></scr' + 'ipt>');

function showCalc(calc)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 275)
var pHeight = (((parseInt(screen.height) / 2)) -240)
window.open(calc,"hello","width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");

}
function tabover(howmuch)
{
var farover = '';
farover += '<img src="/images/clearpix.gif" width="' + howmuch + '" height="1" alt="" border="0">';
document.write(farover);
}

function open_apps(nameofapp)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
//aWindow = window.open('/Forms/OnlineForm.cgi?form=' + nameofapp,'application',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=700,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");

location.href = '/Forms/OnlineForm.cgi?form=' + nameofapp + '&onWeb=TRUE';

}


function openWindow(url)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open(url,'newWin',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=700,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");
}


/************************************************************************************************************
* 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>
**************************************************************************************************************/
var fiName = "Atlanta Postal Credit Union";
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:showWarning('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 : 0;
	lk = (lk.substring(0,1)=="/" && !(lk.substring(0,8)=="/mstinc/"))? contextPath + lk: lk; // for local pages
	
	var messages = new Array(6);
	// Standard 3rd Party Warning
	messages[0] = messages[1] = '<h2 style="text-align:center">Attention Web Site Visitors</h2><p>When you click on any of the listed links, you are leaving ' + fiName + '\'s Web site and you are linking to an alternate Web site not operated by the Credit Union. ' + fiName + ' is not responsible for the availability or content of any alternate Web site. APCU does not represent either the third party or you if you enter into a transaction. Privacy and security policies may differ from those practiced by the Credit Union.</p>';
	// Standard Partner Warning
	messages[2] = '<h2 style="text-align:center">Partner Site Disclaimer</h2><p>By accessing the noted link you will be leaving our website and entering a partner site which is hosted by another party. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of our website. We encourage you to read and evaluate the privacy and security policies of the site which you are entering, which may be different than those of ours.</p>';
	// Standard Affiliate Warning
	messages[3] = '<h2 style="text-align:center">Affiliate Site Disclaimer</h2><p>By accessing the noted link you will be leaving our website and entering an affiliate site located which is hosted by another party. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of our website. We encourage you to read and evaluate the privacy and security policies of the site which you are entering, which may be different than those of ours.</p>';
	// Customize if requested
	messages[4] = messages[0];
	// Standard mailto: Insecure Warning
	messages[5] = '<h2 style="text-align:center">Email Disclaimer</h2><p>This is <strong>NOT</strong> a secured e-mail transmission. Please <strong>do not send personal/financial information</strong> via this method.</p>';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<div style="margin-top:1em;text-align:center"><a href="'+lk+'"'+(target?' target="'+target+'"':'')+' onclick="$(\'#ex_dis\').hide()">Continue</a>&#160;&#160;<a href="#" onclick="$(\'#ex_dis\').hide();return false;">Decline</a></div>';	
	$("#ex_dis").html(content.join("")).show();
	scrollTo(0,0);
}



function third_party(page)
{
self.location.href(page);
//self.location.href = (page);
//var pWidth = ( ((parseInt(screen.width) / 2)) - 125)
//var pHeight = (((parseInt(screen.height) / 2)) - 125)

//bWindow = window.open(page,'newWin',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=350,height=250,top=" + pHeight + ",left=" + pWidth);
}

function writeImage(which)
{
var alt="";
var border="1";
var align="right";
var hspace = "10";
var vspace = "10";
var width=166; // default
var height=250; // default

	if (which == "convenience")
	{
	var imageArray = new Array(
	imgdir + "photo-convenience-atmlocs.jpg",
	imgdir + "photo-convenience-card.jpg",
	imgdir + "photo-convenience-cheques.jpg",
	imgdir + "photo-convenience-internet.jpg",
	imgdir + "photo-convenience-keyteller.jpg",
	imgdir + "photo-convenience-pen.jpg"); 
	alt="Convenience Services";
	}
	else if (which == "savings")
	{
	var imageArray = new Array(
	imgdir + "photo-savings1.jpg",
	imgdir + "photo-savings-certificates.jpg",
	imgdir + "photo-savings-christmas.jpg",
	imgdir + "photo-savings-directdeposit.jpg",
	imgdir + "photo-savings-ira.jpg",
	imgdir + "photo-savings-primary.jpg",
	imgdir + "photo-savings-vacation.jpg",
	imgdir + "photo-savings-visadebit.jpg"); 
	alt="Savings Center";
	}
	else if (which == "lending")
	{
	var imageArray = new Array(
	imgdir + "photo-lending-boat.jpg",
	imgdir + "photo-lending-creditcards.jpg",
	imgdir + "photo-lending-farm1.jpg",
	imgdir + "photo-lending-farm2.jpg",
	imgdir + "photo-lending-farm3.jpg",
	imgdir + "photo-lending-secured.jpg",
	imgdir + "photo-lending-signature.jpg",
	imgdir + "photo-lending-student.jpg",
	imgdir + "photo-lending-vehicle.jpg"); 
	alt="Lending Center";
	}
	else if (which == "real")
	{
	var imageArray = new Array(
	imgdir + "photo-realestate-2ndmortgage.jpg",
	imgdir + "photo-realestate-homeequity.jpg",
	imgdir + "photo-realestate-mortgage.jpg"); 
	alt="Real Estate Center";
	}
	else
	{
	var imageArray = new Array(
	imgdir + "photo-savings1.jpg",
	imgdir + "photo-savings-certificates.jpg",
	imgdir + "photo-savings-christmas.jpg",
	imgdir + "photo-savings-directdeposit.jpg",
	imgdir + "photo-savings-ira.jpg",
	imgdir + "photo-savings-primary.jpg",
	imgdir + "photo-savings-vacation.jpg",
	imgdir + "photo-savings-visadebit.jpg"); 
	alt="Savings Center";
	}

	
var numImages = imageArray.length;
var iteratorNum = ( rand(numImages) - 1); //-1 to take into account that array starts at 0

var imgCode='<img src="' + imageArray[iteratorNum] + '" width="'+ width +'" height="'+ height +'" alt="' + alt + '" border="' + border + '" align="' + align + '" hspace="' + hspace + '" vspace="' + vspace + '">';
	
document.write(imgCode);

}//end writeImage


function rand(number) 
{
return Math.ceil((Math.random()* number));       
}


