 
function Includes(section,nopic){
	var number = Math.ceil((Math.random()* 3)) -1;
	var piclist = new Array('budget_corner','budget_corner','budget_corner');
	this.myhomepage = window.homepage ? true : false;
	this.makeHeader = makeHeader;
	this.makeFooter = makeFooter;
	section ? this.section = section : this.section = "home";
	this.pic = piclist[number];
	this.nopic = nopic;
	this.getContentAreaTop = getContentAreaTop;
	this.getContentAreaBottom = getContentAreaBottom;
	self.location.search.substring(1) == "print" ? this.print = true : this.print = false;
}

function makeHeader(){
	var index = 0;
	var header=new Array();
	header[index++]='<div align="left">';
	header[index++]='<!-- begin topnav table -->';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0" background="'+imgdir+'topnav-bg.gif">';
	header[index++]='<tr valign="TOP">';
	header[index++]='<td width="425"><img src="'+imgdir+'header-topnav-left.jpg" width=164 height=15 alt="" border="0"><a href="'+sitedir+'about.html" onmouseover="img_act(\'aboutus\'); showMenu(\'menu5\'); window.status=\'About Us\'; return true" onmouseout="oM.mout();img_inact(\'aboutus\');"><img src="'+imgdir+'nav-aboutus-off.gif" width=93 height=15 alt="About Us" border="0" name="aboutus"></a><a href="'+sitedir+'contact.html" onmouseover="img_act(\'contactus\'); showMenu(\'menu6\'); window.status=\'Contact Us\'; return true" onmouseout="oM.mout();img_inact(\'contactus\');"><img src="'+imgdir+'nav-contactus-off.gif" width=84 height=15 alt="Contact Us" border="0" name="contactus"></a><a href="'+sitedir+'account_disclosures_privacy.html" onmouseover="img_act(\'privacy\'); window.status=\'Privacy\'; return true" onmouseout="img_inact(\'privacy\');"><img src="'+imgdir+'nav-privacy-off.gif" width=84 height=15 alt="Privacy" border="0" name="privacy"></a></td>';
	header[index++]='<td width="319" align="right"><span class="date">';
	header[index++]=day[total.getDay()] + ', ' + month[total.getMonth()] + ' ' + total.getDate() + ', ' + total.getYear() + '</span></td>';
	header[index++]='<td width="16"><img src="'+imgdir+'topnav-rtcorner.jpg" width=16 height=15 alt="" border="0"></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<!-- end topnav table -->';
	header[index++]='<!-- begin logo/login table -->';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="TOP">';
	header[index++]='<td width="567"><img src="'+imgdir+'header-logo-top.jpg" width=164 height=89 alt="" border="0"><img src="'+imgdir+'header-logo-txt.jpg" width=403 height=89 alt="First National Bank of Milaca - Community Banking Since 1897" border="0"></td>';
	header[index++]='<td width="193"><img src="'+imgdir+'login-spacer.jpg" width=193 height=13 alt="" border="0"><br>';
	header[index++]='<a href="javascript:openIB();"><img src="'+imgdir+'header-login.jpg" width=193 height=59 alt="click Here to Login to Online Banking" border="0"></a><br>';
	header[index++]='<a href="javascript:openIB(\'demo\');"><img src="'+imgdir+'header-demo.gif" width=78 height=17 alt="Demo" border="0"></a><a href="'+sitedir+'electronic_olb.html"><img src="'+imgdir+'header-moreinfo.jpg" width=115 height=17 alt="More Info." border="0"></a><br></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<!-- begin header table -->';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="TOP">';
	header[index++]='<td width="164"><img src="'+imgdir+'header-logo-mid.jpg" width=164 height=27 alt="" border="0"></td>';
	header[index++]='<!-- insert header -->';
	header[index++]='<td width="596">';
	this.myhomepage ? header[index++]='<a href="'+sitedir+'contact_locations.html">' : header[index++]='';
	header[index++]='<img src="'+imgdir+'hed-'+this.section+'.gif" width=596 height=27 alt="Serving the Communities of Milaca, Isle, and Gilman" border="0">';
	this.myhomepage ? header[index++]='</a>' : header[index++]='';
	header[index++]='</td>';
	header[index++]='<!-- end header -->';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<!-- end header table -->';
	header[index++]='<!-- begin main table -->';
	header[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">';
	header[index++]='<tr valign="TOP">';
	header[index++]='<td width="171" background="'+imgdir+'nav-stretch.jpg">';
	header[index++]='<table width="171" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr valign="TOP">';
	header[index++]='<td width="171">';
	header[index++]='<img src="'+imgdir+'nav-logo.jpg" width=171 height=55 alt="" border="0"><br>';
	header[index++]='<a href="'+homedir+'home.html" onmouseover="img_act(\'home\'); showMenu(\'menu8\'); window.status=\'Home\'; return true" onmouseout="oM.mout();img_inact(\'home\');"><img src="'+imgdir+'nav-home-off.jpg" width=171 height=31 alt="Home" border="0" name="home"></a><br>';
	header[index++]='<a href="'+sitedir+'electronic.html" onmouseover="img_act(\'electronic\'); showMenu(\'menu1\'); window.status=\'Electronic Services\'; return true" onmouseout="oM.mout();img_inact(\'electronic\');"><img src="'+imgdir+'nav-electronic-off.jpg" width=171 height=31 alt="Electronic Services" border="0" name="electronic"></a><br>';
	header[index++]='<a href="'+sitedir+'accounts.html" onmouseover="img_act(\'accounts\'); showMenu(\'menu2\'); window.status=\'Accounts\'; return true" onmouseout="oM.mout();img_inact(\'accounts\');"><img src="'+imgdir+'nav-accounts-off.jpg" width=171 height=31 alt="Accounts and Services" border="0" name="accounts"></a><br>';
	header[index++]='<a href="'+sitedir+'lending.html" onmouseover="img_act(\'lending\'); showMenu(\'menu3\'); window.status=\'Lending\'; return true" onmouseout="oM.mout();img_inact(\'lending\');"><img src="'+imgdir+'nav-lending-off.jpg" width=171 height=31 alt="Lending" border="0" name="lending"></a><br>';
	header[index++]='<a href="'+sitedir+'help.html" onmouseover="img_act(\'help\'); showMenu(\'menu4\'); window.status=\'Help Center\'; return true" onmouseout="oM.mout();img_inact(\'help\');"><img src="'+imgdir+'nav-help-off.jpg" width=171 height=31 alt="Help Center" border="0" name="help"></a><br>';
	header[index++]='<img src="'+imgdir+'nav-bottom.jpg" width=171 height=72 alt="" border="0"><br>';
	if(hasHPABanner) { header[index++]='<div id="hpaBanner" style="display:none; position: relative; top: -70px;"><!-- HPA Banner --></div>'; }
	header[index++]='</td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='</td>';
	header [index++]= this.getContentAreaTop();
	if(!this.print){
		document.open("text/html","replace");
		document.writeln(header.join(""));
		document.close();
	}
	else{
	document.open("text/html","replace");
	document.writeln('<table height="100%" width="100%"border="0" cellspacing="0" cellpadding="10" bgcolor="#FFFFFF"><tr><td valign="top" class="ficontent"><div align="center"><strong><a href="javascript:window.print();">Print this page</a>&nbsp;&nbsp;&nbsp;<a href="javascript:self.close();">Close Window</a></strong></div>');
	document.close();
	}
	return;
}

function getContentAreaTop(){
	if(this.myhomepage){
			var index = 0;
			var content=new Array();
			content[index++]='<td width="26"><img src="'+imgdir+'clearpix.gif" width=26 height=1 alt="" border="0"></td>';
			content[index++]='<td width="551">';
			content[index++]='<table width="551" border="0" cellspacing="0" cellpadding="0">';
			content[index++]='<tr valign="TOP">';
			content[index++]='<td width="551" colspan="2" class="ficontent"><a href="http://www.fnbmilaca.com/site/FNBM_Budget.xls"><img src="'+imgdir+'custom/budget_corner.jpg" width=206 height=255 alt="Chart Your Path!" border=0 align="right" hspace=0 vspace=0></a>';
			content[index++]='<img src="'+imgdir+'clearpix.gif" width=1 height=27 alt="" border="0"><br>';
	}
	else{
			var index = 0;
			var mytd = "";
			var content=new Array();
			if(!document.layers){
				content[index++]='<td width="600" background="'+imgdir+'watermark.gif">';
			}
			else{
				content[index++]='<td width="600">';
			}
			//content[index++]='<td width="100">5<img src="'+imgdir+'clearpix.gif" width=26 height=1 alt="" border="0"></td>';
			content[index++]='<table border="0" cellpadding="0" cellspacing="0" width="100%">';
			content[index++]='<tr>';
			content[index++]='<td valign="top" class="ficontent" style="padding-left: 1em; padding-right: 0em; margin-right: 0em">';
			if(this.nopic)
			{
				mytd = '<br />';
			}
			else{
				mytd = '<img src="'+imgdir+'pix-'+this.pic+'.jpg" width=206 height=215 alt="" border="0" style="float: right; margin: 0em; padding: 0em; position: relative; left: 3px" /><br />';
			}
			content[index++]= mytd;
	}
	return content.join("");
}

function getContentAreaBottom(){
	if(this.myhomepage){
			return '</td></tr></table></td><td width="12" background="'+imgdir+'content-rtborder.gif"><img src="'+imgdir+'clearpix.gif" width=12 height=1 alt="" border="0"></td></tr></table>';
	}
	else{
			var index = 0;
			var mytd = "";
			var content=new Array();
			content[index++]='</td></tr></table></td>';
			content[index++]= mytd;
			content[index++]='<td width="12" background="'+imgdir+'content-rtborder.gif"><img src="'+imgdir+'clearpix.gif" width=12 height=1 alt="" border="0"></td></tr></table>';
			return content.join("");
	}
	return;
}

function makeFooter(){
	var index = 0;
	var footer=new Array();
	footer[index++]=this.getContentAreaBottom();
	footer[index++]='<table width="760" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">';
	footer[index++]='<tr valign="TOP">';
	footer[index++]='<td width="760"><a href="javascript:scrollTo(0,0);"><img src="'+imgdir+'footer-top.jpg" alt="Back to Top" width="165" height="75" border="0"></a><img src="'+imgdir+'footer-leftspacer.gif" alt="" width="147" height="75" border="0"><a href="javascript:open_link(\'http://www.hud.gov\');"><img src="'+imgdir+'footer-ehl.gif" alt="Equal Housing Lender" width="53" height="75" border="0"></a><a href="javascript:open_link(\'http://www.digitalinsight.com\');"><img src="'+imgdir+'footer-di.gif" alt="Digital Insight, Inc." width="113" height="75" border="0"></a><a href="javascript:open_link(\'http://www.fdic.gov\');"><img src="'+imgdir+'footer-fdic.gif" alt="Member FDIC" width="68" height="75" border="0"></a><a href="https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=www.fnbmilaca.com&lang=en" target="_new"><img src="'+imgdir+'footer-verisign.gif" alt="VeriSign" width="62" height="75" border="0"></a><img src="'+imgdir+'footer-rtcorner.gif" alt="" width="152" height="75" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';


	if(!this.print){
		document.open("text/html","replace");
		document.writeln(footer.join(""));
		document.close();
	}
	else{
	document.open("text/html","replace");
	document.writeln('<br><div align="center"><strong><a href="javascript:window.print();">Print this page</a>&nbsp;&nbsp;&nbsp;<a href="javascript:self.close();">Close Window</a></strong></div></td></tr></table>');
	document.close();
	}
	return;
}





//end file