if (!window.imgdir)
{
var imgdir="http://www.peoplesbankalbia.com/images/"
var sitedir="http://www.peoplesbankalbia.com/site/"
var securedir="http://www.peoplesbankalbia.com/site/"
var homedir="http://www.peoplesbankalbia.com/"
}

function Include()
{
this.domain = "peoplesbankalbia";
this.friendly = "Peoples State Bank";
this.ib = "https://www.peoplesbankalbia.com/onlineserv/HB";
this.ib_demo = "https://www.peoplesbankalbia.com/onlineserv/HB/demo.html";
this.ib_open_window = true;
this.cm_open_window = true;
this.ib_register = "https://www.peoplesbankalbia.com/onlineserv/HB/STDReg.cgi";
this.cm = "https://www.peoplesbankalbia.com/onlineserv/CM/";
this.headergraphic = "";
this.contentgraphic = "";

this.setHeaderGraphic = setHeaderGraphic;
this.setContentGraphic = setContentGraphic;
this.makeHeader = makeHeader;
this.makeTopNav = makeTopNav;
this.makeMainNav = makeMainNav;
this.makeLoginArea = makeLoginArea;
this.makeUltraseek = makeUltraSeek;
this.makeFooter = makeFooter;
this.makeFooterLogos = makeFooterLogos;
this.openIB = openIB;
this.openIBRegister = openIBRegister;
this.openCM = openCM;

}


/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/



/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/


function makeHeader()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#CECECD">';
content[index++] = '  <tr>';
content[index++] = '    <td rowspan="2"><img src="' + imgdir + 'logo-peoplesstatealbia.gif" width="180" height="118" border="0" alt="Peoples State Bank"></td><td align="right">' + inc.makeTopNav() + '</td>';
content[index++] = '  </tr>';
content[index++] = '	<tr>';
content[index++] = '		<td>' + inc.headergraphic + '<img src="' + imgdir + 'hed-photo.gif" width="86" height="94" border="0"></td>';
content[index++] = '	</tr>';
content[index++] = '</table>';
content[index++] = '<table width="760" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '  <tr>';
content[index++] = inc.makeMainNav();
content[index++] = '    <td width="40"><img src="' + imgdir + 'clearpix.gif" width="40" height="1" alt="" border="0"></td>';
content[index++] = '    <td width="505" valign="top" class="ficontent"><img src="' + imgdir + 'clearpix.gif" width="510" height="30" alt="" border="0"><br />';



//CODE GOES HERE


var index = 0;

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function makeTopNav()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '<a href="' + homedir + 'index.html" onMouseOver="img_act(\'home\'); window.status=\'Home\'; return true" onMouseOut="img_inact(\'home\');"><img src="' + imgdir + 'nav-home-off.gif" width="45" height="24" alt="Home" border="0" name="home"></a><a href="' + sitedir + 'faq.html" onMouseOver="img_act(\'help\'); window.status=\'Help\'; return true" onMouseOut="img_inact(\'help\');"><img src="' + imgdir + 'nav-help-off.gif" width="49" height="24" alt="Help" border="0" name="help"></a><a href="' + sitedir + 'contact.html" onMouseOver="img_act(\'contactus\'); window.status=\'Contact Us\'; return true" onMouseOut="img_inact(\'contactus\');"><img src="' + imgdir + 'nav-contactus-off.gif" width="86" height="24" alt="Contact Us" border="0" name="contactus"></a>';
//CODE GOES HERE

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function makeMainNav()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '<td style="width: 180px" valign="top" bgcolor="#CECECD"><a href="javascript:inc.openIB()" onMouseOver="img_act(\'login\'); window.status=\'ACCOUNT ACCESS Log-in\'; return true" onMouseOut="img_inact(\'login\');"><img src="' + imgdir + 'nav-login-off.gif" width="180" height="20" alt="ACCOUNT ACCESS Log-in" border="0" name="login"></a><br />';
content[index++] = '<a href="javascript:inc.openIB(\'demo\')" onMouseOver="img_act(\'demo\'); window.status=\'Demo\'; return true" onMouseOut="img_inact(\'demo\');"><img src="' + imgdir + 'nav-demo-off.gif" width="45" height="10" border="0" alt="Demo" name="demo"></a><a href="' + sitedir + 'olb.html" onMouseOver="img_act(\'moreinfo\'); window.status=\'More Info\'; return true" onMouseOut="img_inact(\'moreinfo\');"><img src="' + imgdir + 'nav-moreinfo-off.gif" width="59" height="10" alt="More Info" border="0" name="moreinfo"></a><img src="' + imgdir + 'accountaccess-right.gif" width="76" height="10"><br /><img src="' + imgdir + 'accountaccess-bottom.gif" width="180" height="38"><br />';
content[index++] = '<img src="' + imgdir + 'pixel-red.gif" width="180" height="16"><br />';
content[index++] = '<a href="' + sitedir + 'olb.html" onMouseOver="img_act(\'onlinebanking\'); window.status=\'Online Banking\'; return true" onMouseOut="img_inact(\'onlinebanking\');"><img src="' + imgdir + 'nav-onlinebanking-off.gif" width="180" height="25" alt="Online Banking" border="0" name="onlinebanking"></a><br />';
content[index++] = '<a href="' + sitedir + 'personal.html" onMouseOver="img_act(\'personal\'); window.status=\'Personal Banking\'; return true" onMouseOut="img_inact(\'personal\');"><img src="' + imgdir + 'nav-personal-off.gif" width="180" height="25" alt="Personal Banking" border="0" name="personal"></a><br />';
content[index++] = '<a href="' + sitedir + 'business.html" onMouseOver="img_act(\'business\'); window.status=\'Business Banking\'; return true" onMouseOut="img_inact(\'business\');"><img src="' + imgdir + 'nav-business-off.gif" width="180" height="25" alt="Business Banking" border="0" name="business"></a><br />';
content[index++] = '<a href="' + sitedir + 'agriculture.html" onMouseOver="img_act(\'agriculture\'); window.status=\'Agriculture Services\'; return true" onMouseOut="img_inact(\'agriculture\');"><img src="' + imgdir + 'nav-agriculture-off.gif" width="180" height="25" alt="Agriculture Services" border="0" name="agriculture"></a><br />';
content[index++] = '<a href="' + sitedir + 'community.html" onMouseOver="img_act(\'community\'); window.status=\'PSB Community\'; return true" onMouseOut="img_inact(\'community\');"><img src="' + imgdir + 'nav-community-off.gif" width="180" height="25" border="0" alt="PSB Community" name="community"></a><br />';
content[index++] = '<img src="' + imgdir + 'pixel-red.gif" width="180" height="22"><br />';
content[index++] = '<img src="' + imgdir + 'nav-bottom.gif" width="180" height="69"> ';
content[index++] = '    </td>';

//CODE GOES HERE

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function setContentGraphic(graphic , alt_tag)
{
if (!alt_tag)
var alt_tag = "";

if (graphic == null)
	{
	this.contentgraphic = "";
	}
else
	{
	this.contentgraphic = '';
	}	
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function setHeaderGraphic(graphic , alt_tag)
{
if (!alt_tag)
var alt_tag = "";

if (graphic == null)
	{
	this.headergraphic = "";
	}
else
	{
	this.headergraphic = '<img src="' + imgdir + 'hed-' + graphic + '.gif" width="494" height="94" border="0" alt="Welcome to Peoples State Bank">';
	}	
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function makeLoginArea()
{
var content = new Array();
var index = 0;

//CODE GOES HERE

//CODE GOES HERE

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function makeUltraSeek()
{
var content = new Array();
var index = 0;

//CODE GOES HERE

//CODE GOES HERE

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function makeDateStamp()
{

var myDate = new Date();
var day = myDate.getDay();
var month = myDate.getMonth();
var date = myDate.getDate();
var year = "";

if (document.all)
	{
	year = myDate.getYear();
	}
else
	{
	year =myDate.getYear() + 1900;
	}	

var months = new Array ("January", "February","March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

var days = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");


//alert (days[day] + ", " + months[month] + " " + date + ",  " + year);
var finalDate = (days[day] + ", " + months[month] + " " + date + ",  " + year);


var content = new Array();
var index = 0;
content[index++] = '<td align="right" valign="middle"><font face="Verdana,Arial,Helvetica,sans-serif" size="1" color="#741533">' + finalDate + '</font><img src="' + imgdir + 'clearpix.gif" width="15" height="1" alt="" border="0"></td>';

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/




/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||HEADER FUNCTIONS|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/












/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/





/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/
function makeFooter()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '<br /><br />';
content[index++] = '</td>';
//content[index++] = '    <td width="20"><img src="' + imgdir + 'clearpix.gif" width="20" height="1" alt="" border="0"></td>';
content[index++] = '  </tr>';
content[index++] = '</table>';
content[index++] = '<div id="ex_dis" style="display:none">';
content[index++] = '	blank';
content[index++] = '</div>';

content[index++] = inc.makeFooterLogos();

//CODE GOES HERE

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function makeFooterLogos()
{
var content = new Array();
var index = 0;

//CODE GOES HERE
content[index++] = '<table width="760" border="0" cellspacing="0" cellpadding="0">';
content[index++] = '  <tr>';
content[index++] = '    <td bgcolor="#CECECD"><img src="' + imgdir + 'clearpix.gif" width="180" height="1"></td>';
content[index++] = '    <td width="40"><img src="' + imgdir + 'clearpix.gif" width="40" height="1" alt="" border="0"></td>';
content[index++] = '    <td><img src="' + imgdir + 'clearpix.gif" width="510" height="10" alt="" border="0"><br /><img src="' + imgdir + 'foot-address.gif" width="502" height="36" alt="102 S. Main Street - Albia, IA 52531 - (641) 932-7887" border="0"><br />';
content[index++] = '      <img src="' + imgdir + 'clearpix.gif" width="78" height="1"><a href="http://www.digitalinsight.com" target="_new"><!--[if lt IE 7]><script type="text/javascript" src="https://www.peoplesbankalbia.com/mstinc/web/js/png.js"></script><![endif]--><img src="https://www.peoplesbankalbia.com/mstinc/web/images/di_91x22_2c.png" width="91" height="22" style="margin-bottom:5px;" border="0" alt="Digital Insight, an Intuit company" /></a><img src="' + imgdir + 'clearpix.gif" width="31" height="1"><a href="http://www.hud.gov" target="_new"><img src="' + imgdir + 'equalhl.gif" width="39" height="34" alt="Equal Housing Lender" border="0"></a><img src="' + imgdir + 'clearpix.gif" width="26" height="1"><a href="http://www.fdic.gov" target="_new"><img src="' + imgdir + 'memberfdic.gif" width="57" height="19" alt="Member FDIC" border="0"></a><img src="' + imgdir + 'clearpix.gif" width="25" height="1"><a href="' + sitedir + 'privacy.html"><img src="' + imgdir + 'foot-privacy.gif" width="78" height="34" border="0" alt="Privacy Policy"></a><br />';
content[index++] = '    </td><td width="3"></td>';
content[index++] = '  </tr>';
content[index++] = '</table>';
//CODE GOES HERE

return (content.join(""));
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||FOOTER FUNCTIONS|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/





function openIB(which)
{

/*openPopupCS();*/

if (which == 'demo')
	{
	if (this.ib_open_window == true)
		{
		window.open(this.ib_demo);
		}
	else
		{
		location.href = this.ib_demo;
		}
	}
else if (which == 'topdemo')
	{
		top.location.href = this.ib_demo;
	}			
else if (which == 'top')
	{
		top.location.href = this.ib;
	}	
else
	{
	if (this.ib_open_window == true)
		{
		window.open(this.ib);
		}
	else
		{
		location.href = this.ib;
		}
	}
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function openIBRegister()
{

/*openPopupCS();*/

	window.open(this.ib_register);
}

function openCM()
{
if (this.cm_open_window == true)
	{	
	window.open(this.cm);
	}
else
	{
	location.href = this.cm;
	}
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function make_NAMEHERE_dropdown()
{

var items = new Array();
var index = -1;
items[index++] = new Array('#' , 'Make a Selection &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' , 'same');
items[index++] = new Array('link1.html' , 'Personal Checking Accounts' , 'same');
items[index++] = new Array('checking_business.html' , 'Business Checking Accounts' , 'same');
items[index++] = new Array('checking_fastline.html' , 'Fastline' , 'same');
items[index++] = new Array('checking_local.html' , 'Local Connections' , 'same');
		
writeout_dropdown(items);		
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function writeout_dropdown(items)
{
var whole = '<form name="form1">';
whole += '<select name="dropdown_nav" onChange="javascript:changeLocations();" class="dropdown">';
for (i=0; i < items.length; i++)
	{
	if (items[i][2] == "new")
		{
		var target="?new";
		}
	else if (items[i][2] == "top")
		{
		var target="?top";
		}	
	else
		{
		var target="";
		}	
	whole += '<option value="' + items[i][0] + target + '">' + items[i][1] + '</option>';
	}
whole += '</select>';
document.write(whole);
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function changeLocations()
{
var location = document.form1.dropdown_nav[document.form1.dropdown_nav.selectedIndex].value;

var first = location.indexOf("?");
if (first != -1)
	{
	var target = location.substring(first + 1 , location.length);
	location = location.substring(0 , first);
	}
else
	{
	var target = "";
	}	
	
	//alert(target);
	//alert(location);
	
if (target == "new")
	{
	window.open(location);
	}
else if (target == "top")
	{
	top.location.href = location;
	}	
else
	{
	window.location.href = location;
	}	

}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function make_NAMEHERE_subnav(whichnumber , breaknumber)
{
var items = new Array();
var index = -1;

items[index++] = new Array('<a href="link1.html">' , 'LINK1' , '</a>');
items[index++] = new Array('<a href="link2.html">' , 'LINK2' , '</a>');
items[index++] = new Array('<a href="link3" target="_new">' , 'LINK3' , '</a>');
items[index++] = new Array('<a href="link4.html">' , 'LINK4' , '</a>');


writeitout(items , whichnumber , breaknumber);
}

/*_______________________________________________________________________________________
||||||||||||||||||||||||||||||||||||||NEW FUNCTION|||||||||||||||||||||||||||||||||
_______________________________________________________________________________________*/

function writeitout(items , whichnumber , breaknumber)
{
var whole = '<div align="center" class="subnav">';
var spacer = ""
for (i=0; i < items.length; i++)
	{
	if (i != whichnumber)
		{
		spacer = " | ";
		if (i == items.length - 1)
			spacer = "";
		else if (i == breaknumber)
			spacer = "<br />";
		whole += items[i][0] + items[i][1] + items[i][2] + spacer;
		}
	else
		{
		spacer = " | ";
		if (i == items.length - 1)
			spacer = "";
		else if (i == breaknumber)
			spacer = "<br />";
		whole += items[i][1] + spacer;
		}
	}
whole += '</div><br />';
document.write(whole);
}
