function Includes(graphic_header){
	this.graphic_header = graphic_header;
	this.makeHeader = makeHeader;
	this.makeFooter = makeFooter;
	//var pic = Math.ceil((Math.random()* 6)); //6 is the number of photos
	//this.photo = '<img src="'+imgdir+'pic'+pic+'.jpg" width="145" height="146" alt="" border="0">'
}

function makeHeader(){
	var index = 0;
	var header=new Array();
	header[index++]='<table width="740" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<td width="262" rowspan="2" valign="top"><img src="'+imgdir+'logo_gateway_cb.gif" width="262" height="90" alt="Gateway Community Bank" border="0"></td>';
	header[index++]='<td width="173"><img src="'+imgdir+'clearpix.gif" width="173" height="1" alt="" border="0"></td>';
	header[index++]='<td width="195" valign="top"><img src="'+imgdir+'image_login1.jpg" width="195" height="71" alt="" border="0"></td>';
	header[index++]='<td width="110" valign="top"><img src="'+imgdir+'online_banking.jpg" width="110" height="71" alt="Online Banking" border="0"></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="368" colspan="2" valign="top"><img src="'+imgdir+'login_bar.jpg" width="368" height="19" alt="" border="0"></td>';
	header[index++]='<!-- ONLINE BANKING LOGIN LINK BELOW -->';
	header[index++]='<td width="110" valign="top"><a href="javascript:openIB();" onMouseOver="img_act(\'olblogin\'); window.status=\'LOGIN\'; return true" onMouseOut="img_inact(\'olblogin\');"><img src="'+imgdir+'nav-olblogin-off.gif" width="110" height="19" alt="LOGIN" border="0" name="olblogin"></a></td>';
	header[index++]='<!-- ONLINE BANKING LOGIN LINK ABOVE -->';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><img src="'+imgdir+'clearpix.gif" width="262" height="1" alt="" border="0"></td>';
	header[index++]='<!-- SECTION HEADER CHANGES BELOW -->';
	header[index++]='<td width="478" colspan="3"><img src="'+imgdir+'hed-'+this.graphic_header+'.gif" width="478" height="27" alt="Welcome to Our Website" border="0"></td>';
	header[index++]='<!-- SECTION HEADER CHANGES ABOVE -->';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='<table width="740" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<td width="262" valign="top" background="'+imgdir+'nav-filler.gif">';
	header[index++]='<table width="262" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+sitedir+'about.html" onMouseOver="img_act(\'aboutus\'); popUp(\'HM_Menu1\',event);window.status=\'About Us\'; return true" onMouseOut="img_inact(\'aboutus\');popDown(\'HM_Menu1\');"><img src="'+imgdir+'nav-aboutus-off.gif" width="262" height="33" alt="About Us" border="0" name="aboutus"></a></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="javascript:openIB();" onMouseOver="img_act(\'pcbanking\'); window.status=\'Online Banking\'; popUp(\'HM_Menu2\',event); return true" onMouseOut="img_inact(\'pcbanking\');popDown(\'HM_Menu2\');"><img src="'+imgdir+'nav-onlinebanking-off.gif" width="262" height="24" alt="Online Banking" border="0" name="pcbanking"></a></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+sitedir+'personal.html" onMouseOver="img_act(\'personal\'); popUp(\'HM_Menu3\',event);window.status=\'Personal Banking\'; return true" onMouseOut="popDown(\'HM_Menu3\');img_inact(\'personal\');"><img src="'+imgdir+'nav-personal-off.gif" width="262" height="24" alt="Personal Banking" border="0" name="personal"></a></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+sitedir+'business.html" onMouseOver="img_act(\'business\'); window.status=\'Business Banking\'; popUp(\'HM_Menu4\',event); return true" onMouseOut="popDown(\'HM_Menu4\');img_inact(\'business\');"><img src="'+imgdir+'nav-business-off.gif" width="262" height="24" alt="Business Banking" border="0" name="business"></a></td>';
	header[index++]='</tr>';	
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+sitedir+'rates.html" onMouseOver="img_act(\'rates\'); popUp(\'HM_Menu5\',event); window.status=\'Rates and Specials\'; return true" onMouseOut="img_inact(\'rates\');popDown(\'HM_Menu5\');"><img src="'+imgdir+'nav-rates-off.gif" width="262" height="24" alt="Rates and Specials" border="0" name="rates"></a></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+sitedir+'financial.html" onMouseOver="img_act(\'financialproducts\'); popUp(\'HM_Menu6\',event); window.status=\'Financial Products\'; return true" onMouseOut="img_inact(\'financialproducts\');popDown(\'HM_Menu6\');"><img src="'+imgdir+'nav-financialproducts-off.gif" width="262" height="24" alt="Financial Products" border="0" name="financialproducts"></a></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+sitedir+'faq.html" onMouseOver="img_act(\'help\'); popUp(\'HM_Menu7\',event); window.status=\'Help\'; return true" onMouseOut="img_inact(\'help\');popDown(\'HM_Menu7\');"><img src="'+imgdir+'nav-help-off.gif" width="262" height="24" alt="Help" border="0" name="help"></a></td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td width="262"><a href="'+homedir+'home.html" onMouseOver="img_act(\'home\'); window.status=\'Home\'; return true" onMouseOut="img_inact(\'home\');"><img src="'+imgdir+'nav-home-off.gif" width="262" height="24" alt="Home" border="0" name="home"></a></td>';
	header[index++]='</tr>';
 if (window.homepage) {
	header[index++]='<tr><td><div id=\"ttBanner\" style=\"display:none; text-align: center; margin-top: 1em;\"><!-- TT Banner --></div></td></tr>';
	
	header[index++]='<tr><td><p style="text-align: center; margin-top: 1em"><img src="images/GiftCard.jpg" alt="" title="" border="0" /></p></td></tr>';
}
	header[index++]='<tr>';
	header[index++]='<td width="262"><br><br><br><br><br><br></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='</td>';

	header[index++]='<td width="15"><img src="'+imgdir+'clearpix.gif" width="15" height="1" alt="" border="0"></td>';
	header[index++]='<td width="448" valign="top">';
	header[index++]='<table width="448" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<td width="448" class="ficontent">';

	document.open("text/html","replace");
	document.writeln(header.join(""));
	document.close();
}
function makeFooter(backtotop){
	var index = 0;
	var footer=new Array();
	var index = 0;
	var footer=new Array();
	footer[index++]='</td>';
	footer[index++]='</tr>';
	footer[index++]='<tr>';
	footer[index++]='<!-- START FOOTER LINKS -->';
	footer[index++]='<td width="448" align="center"><a href="javascript:show_warning(\'http://www.fdic.gov\');"><img src="'+imgdir+'memberfdic2.gif" width="57" height="31" alt="Member FDIC" border="0"></a><img src="'+imgdir+'clearpix.gif" width="100" height="1" alt="" border="0"><a href="javascript:show_warning(\'http://www.digitalinsight.com\');"><!--[if lt IE 7]><script type="text/javascript" src="https://www.gatewaycb.com/mstinc/web/js/png.js"></script><![endif]--><img src="https://www.gatewaycb.com/mstinc/web/images/di_140x34_1c_k.png" width="140" height="34" border="0" alt="Digital Insight, an Intuit company" /></a><img src="'+imgdir+'clearpix.gif" width="100" height="1" alt="" border="0"><a href="javascript:show_warning(\'http://www.hud.gov\');"><img src="'+imgdir+'equalhl.gif" width="41" height="38" alt="Equal Housing Lender" border="0"></a></td>';
	footer[index++]='<!-- END FOOTER LINKS -->';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='</td>';
	footer[index++]='<td width="15"><img src="'+imgdir+'clearpix.gif" width="15" height="1" alt="" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='<table width="740" border="0" cellspacing="0" cellpadding="0">';
	footer[index++]='<tr>';
	footer[index++]='<td width="740"><img src="'+imgdir+'footer.gif" width="740" height="56" alt="5390 Williams Drive, Roscoe, IL 61073, 815-623-5243, 2215 Cranston Rd, Beloit, WI 53511, 608-313-6662" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';

	
	document.open("text/html","replace");
	document.writeln(footer.join(""));
	document.close();
}

