function Includes(graphic_header,writepic){
	this.graphic_header = graphic_header;
	this.makeHeader = makeHeader;
	this.makeFooter = makeFooter;
	this.pic = Math.ceil((Math.random()* 4)); //6 is the number of photos
	if(!writepic){
		this.writepic = true;
	}
	else{
		this.writepic = false;
	}
	
}

function makeHeader(){
	var index = 0;
	var header=new Array();
	header[index++]='<table width="100%" border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<!-- begin main nav cell -->';
	header[index++]='<!-- begin main nav cell -->';
	header[index++]='<!-- begin main nav cell -->';
	header[index++]='<td width="200" background="'+imgdir+'nav-bg.jpg" valign="top" align="center"><img src="'+imgdir+'logo-accessfcu.gif" width="200" height="66" border="0" alt="ACCESS Federal Credit Union"><br><!-- nav spacer --><img src="'+imgdir+'clearpix.gif" width="1" height="4"><br>';
	header[index++]='<!-- BEGIN NAVIGATION --><a href="'+sitedir+'onlineserv.html" onMouseOver="img_act(\'onlineservices\'); window.status=\'Online Services\'; return true" onMouseOut="img_inact(\'onlineservices\');"><img src="'+imgdir+'nav-onlineservices-off.gif" width="180" height="30" alt="online services" border="0" name="onlineservices"></a><a href="'+sitedir+'product.html" onMouseOver="img_act(\'products\'); popUp(\'HM_Menu1\',event); window.status=\'Products & Services\'; return true" onMouseOut="img_inact(\'products\'); popDown(\'HM_Menu1\');"><img src="'+imgdir+'nav-products-off.gif" width="180" height="30" alt="products and services" border="0" name="products"></a><a href="'+sitedir+'onlineserv_calculators.html" onMouseOver="img_act(\'calculators\'); popUp(\'HM_Menu2\',event); window.status=\'Financial Calculators\'; return true" onMouseOut="img_inact(\'calculators\'); popDown(\'HM_Menu2\');"><img src="'+imgdir+'nav-calculators-off.gif" width="180" height="30" alt="financial calculators" border="0" name="calculators"></a><a href="'+sitedir+'community.html" onMouseOver="img_act(\'community\'); window.status=\'Our Community\'; return true" onMouseOut="img_inact(\'community\');"><img src="'+imgdir+'nav-community-off.gif" width="180" height="30" alt="our community" border="0" name="community"></a><a href="'+sitedir+'info.html" onMouseOver="img_act(\'information\'); popUp(\'HM_Menu3\',event); window.status=\'Information\'; return true" onMouseOut="img_inact(\'information\');popDown(\'HM_Menu3\');"><img src="'+imgdir+'nav-information-off.gif" width="180" height="30" alt="information" border="0" name="information"></a><a href="'+sitedir+'links.html" onMouseOver="img_act(\'weblinks\'); window.status=\'Web Links\'; return true" onMouseOut="img_inact(\'weblinks\');"><img src="'+imgdir+'nav-weblinks-off.gif" width="180" height="30" alt="web links" border="0" name="weblinks"></a><a href="javascript:open_apps(\'email_app\');" onMouseOver="img_act(\'contactus\'); window.status=\'Contact Us\'; return true" onMouseOut="img_inact(\'contactus\');"><img src="'+imgdir+'nav-contactus-off.gif" width="180" height="30" alt="contact us" border="0" name="contactus"></a><a href="javascript:open_kids(\'site\/kids.html\');" onMouseOver="img_act(\'kids\'); window.status=\'Kids’ Page\'; return true" onMouseOut="img_inact(\'kids\');"><img src="'+imgdir+'nav-kids-off.gif" width="180" height="30" alt="kids\' page" border="0" name="kids"></a>';
	if(!window.homepage){
		header[index++]='<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="180" height="30" alt="home" border="0" name="home"></a>';
	}
	header[index++]='<!-- END NAVIGATION -->';
	header[index++]='</td>';
	header[index++]='<!-- end main nav cell -->';
	header[index++]='<!-- end main nav cell -->';
	header[index++]='<!-- end main nav cell -->';
	header[index++]='<td width="99%" valign="top" bgcolor="#FFFFFF">';
	header[index++]='<table border="0" cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<td colspan="3" bgcolor="#C4C5C7">';
	header[index++]='<table cellspacing="0" cellpadding="0">';
	header[index++]='<tr>';
	header[index++]='<td width="260"><img src="'+imgdir+'hed-'+this.graphic_header+'.gif" width="260" height="66" alt="Access Online" border="0"></td><td width="296" valign="top" background="'+imgdir+'login-bg.gif"><img src="'+imgdir+'clearpix.gif" width="296" height="11" alt="" border="0"><br><img src="'+imgdir+'clearpix.gif" width="106" height="21" alt="" border="0"><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="180" HEIGHT="44" id="login" ALIGN=""><PARAM NAME=movie VALUE="'+sitedir+'login-alt.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="'+sitedir+'login-alt.swf" quality=high bgcolor=#FFFFFF  WIDTH="180" HEIGHT="44" NAME="login" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT></td>';
	header[index++]='</tr>';
	header[index++]='</table>';
	header[index++]='</td>';
	header[index++]='</tr>';
	header[index++]='<tr>';
	header[index++]='<td><img src="'+imgdir+'clearpix.gif" width="20" height="1" alt="" border="0"></td><td width="99%"><img src="'+imgdir+'clearpix.gif" width="1" height="15" alt="" border="0"><br>';
	header[index++]='<table border="0" cellspacing="0" cellpadding="0" width="525">';
	header[index++]='<tr>';
	header[index++]='<td valign="top" class="ficontent">';
	if(this.writepic){
		header[index++]='<img src="'+imgdir+'pic'+this.pic+'.jpg" width="195" height="159" alt="" border="0" align="right">';
	}

	document.open("text/html","replace");
	document.writeln(header.join(""));
	document.close();
}
function makeFooter(backtotop){
	var index = 0;
	var footer=new Array();
	footer[index++]='<div id="ex_dis"><!-- clear --></div>';
	footer[index++]='</td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='</td><td><img src="'+imgdir+'clearpix.gif" width="15" height="1" alt="" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='<!--BEGIN FOOTER ROWS -->';
	footer[index++]='<tr>';
	footer[index++]='<td colspan="3"><img src="'+imgdir+'clearpix.gif" width="1" height="30" alt="" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='<tr>';
	footer[index++]='<td colspan="3" bgcolor="#D3E3F7"><a href="http://ifs.intuit.com/" onclick="showWarning(this.href); return false;"><img src="/mstinc/web/images/logo_91x22.png" width="91" height="22" alt="" border="0" /></a><a href="http://www.hud.gov" target="_blank"><img src="'+imgdir+'equalhl.gif" width="47" height="61" alt="Equal Housing Lender" border="0"></a><a href="http://www.ncua.gov" target="_blank"> <!--[if lt IE 7]><script type="text/javascript" src="/mstinc/web/js/png.js"></script><![endif]--><img src="http://www.accessfcu.org/mstinc/web/images/ncua_140x109_blue.png" width="140" height="109" border="0" alt="NCUA" /></a><img src="'+imgdir+'foot-watermark.gif" width="89" height="61" alt="" border="0"><img src="'+imgdir+'foot-address.gif" width="185" height="61" alt="Access Federal Credit Union · 102 E Seneca Street · PO Box 8 · Sherrill, NY 13461" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='</td>';
	footer[index++]='</tr>';
	footer[index++]='<!-- END FOOTER ROW -->';
	footer[index++]='</table>';

	document.open("text/html","replace");
	document.writeln(footer.join(""));
	document.close();
}

function makeSubNav(page){
	var index = 0;
	var subnav = new Array();
	if(page=="rates"){
	subnav[index++]='<div align="center">';
	subnav[index++]='<a href="rates_certificate.html">Share Rates</a> | ';
	subnav[index++]='<a href="rates_loan.html">Loan Rates</a> | ';
	subnav[index++]='<a href="product_loan_visa.html">Visa</a> | ';
	subnav[index++]='<a href="fees.html">Schedule of Fees</a> | ';
	subnav[index++]='<a href="product.html">Product &amp; Services</a>';
	subnav[index++]='</div><br>';
	} else {
	}
	document.open("text/html","replace");
	document.writeln(subnav.join(""));
	document.close();
}

