if (typeof imgdir == "undefined") imgdir="../images/";
if (typeof securedir == "undefined") securedir="../";
if (typeof homedir == "undefined") homedir="../";
if (typeof sitedir == "undefined") sitedir="";

function Includes(){
	this.makeHeader = makeHeader;
	this.makeFooter = makeFooter;
}

function makeHeader(sectionimg,sectiontitle){
	var header = new Array();
	var index = 0;
	header[index++] = '<table cellspacing="0" cellpadding="0" border="0" width="600">';
	header[index++] = '	<tr valign="top">';
	header[index++] = '		<!--Logo-->';
	header[index++] = '		<td width="118"><img src="'+imgdir+'logo-salyersvillebank.gif" width="118" height="127" alt="Salyersville National Bank" border="0"></td>';
	header[index++] = '		<!--End Logo-->';
	header[index++] = '		<td width="386"><img src="'+imgdir+'logo-header.gif" width="482" height="127" alt="Salyersville National Bank" border="0"></td>';
	header[index++] = '	</tr>';
	header[index++] = '</table>';
	header[index++] = '<table cellspacing="0" cellpadding="0" border="0" width="600">';
	header[index++] = '	<tr valign="top">';
	header[index++] = '		<td width="135" background="'+imgdir+'nav-bgcolor.gif"><br>';
	header[index++] = '<a href="https://www.salyersvillebank2.com/onlineserv/HB/" onMouseover="on(\'onlinebanking\');st(\'Online Banking\');return true;" onMouseout="off(\'onlinebanking\');st(\'\');return true;" target="_blank"><img name="onlinebanking" src="'+imgdir+'nav-onlinebanking-off.gif" width="135" height="18" alt="Online Banking" border="0"></a>';
	header[index++] = '<a href="'+sitedir+'products.html" onMouseover="on(\'productsandservices\');st(\'Products and Services\');return true;" onMouseout="off(\'productsandservices\');st(\'\');return true;"><img name="productsandservices" src="'+imgdir+'nav-productsandservices-off.gif" width="135" height="18" alt="Products and Services" border="0"></a>';
	header[index++] = '<a href="'+sitedir+'savings.html" onMouseover="on(\'calculators\');st(\'Calculators\');return true;" onMouseout="off(\'calculators\');st(\'\');return true;"><img name="calculators" src="'+imgdir+'nav-calculators-off.gif" width="135" height="18" alt border="0"></a>';
	header[index++] = '<a href="'+sitedir+'about.html" onMouseover="on(\'aboutus\');st(\'About Us\');return true;" onMouseout="off(\'aboutus\');st(\'\');return true;"><img name="aboutus" src="'+imgdir+'nav-aboutus-off.gif" width="135" height="18" alt="About Us" border="0"></a>';
	header[index++] = '<a href="'+sitedir+'contact.html" onMouseover="on(\'contactus\');st(\'Contact Us\');return true;" onMouseout="off(\'contactus\');st(\'\');return true;"><img name="contactus" src="'+imgdir+'nav-contactus-off.gif" width="135" height="18" alt="Contact Us" border="0"></a>';
	//header[index++] = '<a href="'+sitedir+'help.html" onMouseover="on(\'help\');st(\'Help\');return true;" onMouseout="off(\'help\');st(\'\');return true;"><img name="help" src="'+imgdir+'nav-help-off.gif" width="135" height="18" alt="Help" border="0"></a>';
	if (!window.homepage){
	header[index++] = '<a href="'+homedir+'index.html" onmouseover="on(\'home\');st(\'Home\');return true;" onmouseout="off(\'home\');st(\'\');return true;"><img name="home" src="'+imgdir+'nav-home-off.gif" alt="Home" width="135" border="0" height="18"></a>';
	}
	header[index++] = '</td>';
	header[index++] = '	<td width="7" bgcolor="#ffffff"><img src="'+imgdir+'pix-clear.gif" width="7" height="1" alt border="0"></td>';
	header[index++] = '		<td align="right" width="455" bgcolor="#FFFFFF">';
	header[index++] = '<table cellspacing="0" cellpadding="0" border="0" width="455">';
	header[index++] = '	<tr valign="top">';
	header[index++] = '       <td width="455"><br>';
	header[index++] = '	<!--- Begin Header Section: Graphic must be align="right"--->';
	header[index++] = writeSectionHeader(sectionimg,sectiontitle);
	header[index++] = '<br><br></td>';
	header[index++] = '	<!--- End Header Section --->';
	header[index++] = '    </tr>';
	header[index++] = '    <tr valign="top">';
	header[index++] = '	   <td width="455">';
	header[index++] = '	   <font size="-1" face="Arial,Helvetica">';
	
	document.open('text/html','replace');
	document.write(header.join(""));
	document.close();
	return;
}

function makeFooter(arg1){
	var footer = new Array();
	var index = 0;
	
	if (arg1=="disclosure") {
	footer[index++] = '<p><br>';
	footer[index++] = '<table border="0" cellpadding="0" cellspacing="3" align="center">';
	footer[index++] = '	<tr>';
	footer[index++] = '		<td align="center"><font face="arial, helvetica" size="-2"><strong>Account Disclosures</strong></font></td>';
	footer[index++] = '	</tr>';
	footer[index++] = '	<tr>';
	footer[index++] = '		<td align="center"><font face="arial, helvetica" size="-2"><a href="'+sitedir+'disc_deposit_agreement.html">Deposit Account Agreement</a> | <a href="'+sitedir+'disc_funds_availability.html">Funds Availability Policy Disclosure</a></td>';
	footer[index++] = '	</tr>';
	footer[index++] = '	<tr>';
	footer[index++] = '		<td align="center"><font face="arial, helvetica" size="-2"><a href="'+sitedir+'disc_multiple.html">Multiple Accounts Disclosure</a> | <a href="'+sitedir+'disc_electronic_funds.html">Electronic Funds Transfer Agreement and Disclosures</a></td>';
	footer[index++] = '	</tr>';
	footer[index++] = '</table>';
	}
	
	if (!window.homepage) {
	footer[index++] = '<p><BR>';
	footer[index++] = '<center>';
	footer[index++] = '<table width="400" border="0">';
	footer[index++] = '<tr>';
	footer[index++] = '	<td align="left"><a href="http://www.fdic.gov"><img src="'+imgdir+'fdic.gif" border="0"></a></td>';
	footer[index++] = '	<td align="center">';
	footer[index++] = '<!-- BEGINNING OF NFRONT COPYRIGHT -->';
	footer[index++] = '<center>';
	footer[index++] = '<!--[if lt IE 7]><script language="JavaScript" src="/mstinc/web/js/png.js"></script><![endif]--><img src="/mstinc/web/images/di_140x34_1c_k.png" width="140" height="34" alt="Digital Insight, an Intuit company" />';
	footer[index++] = '</center>';
	footer[index++] = '<!-- END OF NFRONT COPYRIGHT -->';
    footer[index++] = '</td>';
	footer[index++] = '<td align="right">';
	footer[index++] = '<img src="'+imgdir+'equalhl.gif">';
	footer[index++] = '</td>';
	footer[index++] = '</tr>';
	footer[index++] = '</table>';
	footer[index++] = '</center>';
	footer[index++] = '<!-- End FDIC NFRONT EHL  LOGOS -->';
	footer[index++] = '<!-- Insert Footer Content Here -->';
	footer[index++] = '<!--- End Content --->';
	footer[index++] = '<!--- End Content --->';
	footer[index++] = '<!--- End Content --->';
	}
	
	footer[index++] = '</font>';
	footer[index++] = '</td>';
	footer[index++] = '</tr>';
	footer[index++] = '</table>';
	footer[index++] = '<br>';
	footer[index++] = '</td>';
	footer[index++] = '<td width="3" bgcolor="#003366"><img src="'+imgdir+'pix-clear.gif" width="3" height="1" border="0" alt=""></td>';
	footer[index++] = '</tr>';
	footer[index++] = '</table>';
	footer[index++] = '<!--Footer Table-->';
	footer[index++] = '<table cellspacing="0" cellpadding="0" border="0" width="600">';
	footer[index++] = '<tr valign="top">';
	footer[index++] = '		<td width="600"><img src="'+imgdir+'ft-address.gif" width="600" height="29" alt="200 E. Maple Street / Salyersville, KY 41465" border="0"></td>';
	footer[index++] = '	</tr>';
	footer[index++] = '</table>';
	footer[index++] = '<!--End Footer Table-->';

	document.open('text/html','replace');
	document.write(footer.join(""));
	document.close();

	return;
}
	
	function writeSectionHeader(sectionimg,sectiontitle){
		var content = new Array();
		var index = 0;
		if(typeof sectionimg != "undefined") {
			content[index++] = '<img src="'+imgdir+'hed-'+sectionimg+'.gif" width="217" height="28" alt="'+sectiontitle+'" border="0" align="right">';
		}
		else {
			content[index++] = '';
		}
		return content.join("");
	}	
// end of file
	
