var fiName = "Peoples State Bank";
var fiNameShort = "Peoples Bank";
var fiURL = "peoplesbankalbia.com";

/*
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
META TAGS CONTENT AND DESCRIPTION BELOW
*/
document.write('<meta name="keywords" content="Peoples State Bank, Bank, peoplesbankalbia, 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">');


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 Loans, 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
*/


//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.homepage)
{
imgdir="images/";
sitedir="site/";
securedir="site/";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.peoplesbankalbia.com/images/"
sitedir="http://www.peoplesbankalbia.com/site/"
securedir="http://www.peoplesbankalbia.com/site/"
homedir="http://www.peoplesbankalbia.com/"
}
else if(window.securepage)
{
imgdir="https://www.peoplesbankalbia.com/images/"
sitedir="http://www.peoplesbankalbia.com/site/"
securedir="https://www.peoplesbankalbia.com/site/"
homedir="http://www.peoplesbankalbia.com/"
}
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";


home_on = new Image(45,24);
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image(45,24);
home_off.src = imgdir + "nav-home-off.gif";

help_on = new Image(49,24);
help_on.src = imgdir + "nav-help-on.gif";

help_off = new Image(49,24);
help_off.src = imgdir + "nav-help-off.gif";

contactus_on = new Image(86,24);
contactus_on.src = imgdir + "nav-contactus-on.gif";

contactus_off = new Image(86,24);
contactus_off.src = imgdir + "nav-contactus-off.gif";

onlinebanking_on = new Image(180,25);
onlinebanking_on.src = imgdir + "nav-onlinebanking-on.gif";

onlinebanking_off = new Image(180,25);
onlinebanking_off.src = imgdir + "nav-onlinebanking-off.gif";

personal_on = new Image(180,25);
personal_on.src = imgdir + "nav-personal-on.gif";

personal_off = new Image(180,25);
personal_off.src = imgdir + "nav-personal-off.gif";

business_on = new Image(180,25);
business_on.src = imgdir + "nav-business-on.gif";

business_off = new Image(180,25);
business_off.src = imgdir + "nav-business-off.gif";

agriculture_on = new Image(180,25);
agriculture_on.src = imgdir + "nav-agriculture-on.gif";

agriculture_off = new Image(180,25);
agriculture_off.src = imgdir + "nav-agriculture-off.gif";

community_on = new Image(180,25);
community_on.src = imgdir + "nav-community-on.gif";

community_off = new Image(180,25);
community_off.src = imgdir + "nav-community-off.gif";

login_on = new Image(180,20);
login_on.src = imgdir + "nav-login-on.gif";

login_off = new Image(180,20);
login_off.src = imgdir + "nav-login-off.gif";

demo_on = new Image(45,10);
demo_on.src = imgdir + "nav-demo-on.gif";

demo_off = new Image(45,10);
demo_off.src = imgdir + "nav-demo-off.gif";

moreinfo_on = new Image(59,10);
moreinfo_on.src = imgdir + "nav-moreinfo-on.gif";

moreinfo_off = new Image(59,10);
moreinfo_off.src = imgdir + "nav-moreinfo-off.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('https://www.peoplesbankalbia.com/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 = 'https://www.peoplesbankalbia.com/Forms/OnlineForm.cgi?form=' + nameofapp + '&onWeb=TRUE';

}

function openPopupCS()
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 150)
var pHeight = (((parseInt(screen.height) / 2)) - 100)
aWindow = window.open(sitedir + 'popup_coming_soon.html','application',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=300,height=200,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>
**************************************************************************************************************/
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;
	
	var messages = new Array(6);
	// Standard 3rd Party Warning
	messages[0] = messages[1] = '<h2 style="text-align:center">Third Party Site Disclaimer</h2><p>You are now leaving the '+fiURL+' website.  The link has been provided for your convenience and '+fiName+' is not responsible for the content, links, privacy or security of information on non-'+fiNameShort+' sites.</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] = '<p>You are now leaving the '+fiURL+' website and are being transferred to a trusted partner site. Would you like to proceed?</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></div>';	
	$("#ex_dis").html(content.join("")).show();
	scrollTo(0,0);
}