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

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

function makeHeader(page,pagetitle){
	var header = new Array();
	var index = 0;
	
	header[index++] = '<!-- start header table -->';
	header[index++] = '<table border="0" width="760" cellspacing="0" cellpadding="0">';
	header[index++] = '<tr valign="top">';
  	header[index++] = '<td style="background-image: url('+imgdir+'bg.gif);"><img src="'+imgdir+'logo-topleft.gif" width="100" height="116" alt="" border="0"></td>';
	header[index++] = '<td><a href="'+homedir+'index.html"><img src="'+imgdir+'logo_new.gif" width="523" height="164" alt="Capital Community Bank" border="0"></a></td>';
	header[index++] = '<td style="background-image: url('+imgdir+'bg-nav.gif);"><img src="'+imgdir+'logo-topright.gif" width=137 height=116 alt="" border="0"></td>';
	header[index++] = '</tr>';
	header[index++] = '</table>';
	header[index++] = '<!-- end header table -->';
	header[index++] = '<!-- start main table -->';
	header[index++] = '<table border="0" width="600" cellspacing="0" cellpadding="0">';
	header[index++] = '<tr valign="top">';
	header[index++] = '<td width="100" background="'+imgdir+'bg.gif"><img src="'+imgdir+'logo-bottomleft.gif" width="100" height="48" alt="logo" border="0"><br /><br />';
	header[index++] = '<img src="'+imgdir+'ft1.gif" width=100 height=226 border=0 alt="">';
	header[index++] = '</td>';
	header[index++] = '<td width="523" bgcolor="#fde6c4">';
	header[index++] = '<!-- start nested content table -->';
	header[index++] = '<table width="523" border="0" cellspacing="0" cellpadding="0" align="center">';
	header[index++] = '<tr>';
	header[index++] = '<td colspan="3"><br>';

	if(page != "home"){
		if(page == "products") {
		header[index++]='<div style="float: right; width: 210px;">';
		header[index++]='<img src="'+imgdir+'hed-'+page+'.gif">';
		header[index++]='<a href="https://online1.elancard.com/oad/begin?locationCode=13010" target="_blank"><img src="'+imgdir+'banner_visa.gif" width="200" height="43" alt="" border="0" style="margin-top: 50px;"></a>';
		header[index++]='<a href="https://www.myaccountaccess.com/onlineCard/login.do?theme=elan2&loc=13010" target="_blank"><img src="'+imgdir+'banner_visaaccess.gif" width="200" height="43" alt="" border="0" style="display: block; margin-top: 1em;"></a>';
		header[index++]='</div>';
		}
		else {
		header[index++]='<img src="'+imgdir+'hed-'+page+'.gif" align="right">';
		}
	}
	
	if( page != "calculators" && page != "hours" && page != "onlinebanking" && page != "contactus" && page != "aboutccb" && page != "home") {
	header[index++]='<img src="'+imgdir+'photo-'+page+'.jpg" alt="Welcome to banking the way it used to be. Now on the internet." border="0">';
	}

	/*<!--This was added for 201-9527, and you should remove this and remove the page != home in the stanza directly above this (starting with clacs) if GRS is removed.-->*/
	if (page == "home" ){
		header[index++]='<img src="'+imgdir+'photo-'+page+'.jpg" alt="Welcome to banking the way it used to be. Now on the internet." border="0" style="float:left; margin-right: 10px;">';
		//Place text here for it to be next to the main images. header[index++]='<p>You may receive a phone call regarding your debit card being compromised and asking you to provide your card number and social security information; please be advised this is not Capital Community Bank. If for any reason our fraud dept. should call you, you will not be asked for card numbers or social security information. If you have any questions please call your local branch.</p>';
		header[index++]='<!--Start GRS banner Master Include -->';
		header[index++]='<div id="grpBanner" style="display:none; float:left; margin-left: 10px; width: 165px; margin-bottom: 1em;"><!-- GRS Banner --></div>';
		header[index++]='<!--End GRP banner Master Include-->';
		header[index++]='<div style="float: left; font-size: 0.75em; margin-left: 10px; margin-top: 0px; width: 49%">';
		header[index++]='<!--<a href="'+homedir+'property_disclaimer.html"><img src="'+imgdir+'promo_prop4sale.gif" width="185" height="88" alt="" border="0"></a>-->';
		//header[index++]='<p>We, your friends, at <strong>Capital Community Bank</strong> would like to <em><strong style="font-size: 200%">Thank You</strong></em> for your patience and understanding with the added stress experienced during our recent systems conversion.  We sincerely apologize for any inconvenience this may have caused you.  Most importantly, we appreciate our relationship with each one of you and look forward with optimism for your success in our continued association in the years to come.  Frankly, we are excited about our new system that will allow Capital Community Bank to provide you with improved products and services.  This new system dramatically enhances our ability to structure products and services to meet your financial needs, enabling us all with the systems base we need to build upon for the future.</p><p>We appreciate how many of you have already given many suggestions that have helped us convert our system.  We now invite and encourage your continued feedback and suggestions in improving this new system, and as to what products and services we could add to help you meet your financial goals.</p><p><em>Please select <strong>Contact Us</strong> to provide feedback</em></p><p>Thank you, again!</p><p>Sincerely,<br /><em><strong>Capital Community Bank</strong></em></p>';
		header[index++]='</div>';
		header[index++]='<div style="clear:both"></div><br />';
		header[index++]='<div style="text-align: center">';
		header[index++]='<a href="'+homedir+'property_disclaimer.html"><img src="'+imgdir+'cooltext445202515.png" alt="" border=0 onmouseout="this.src=\''+imgdir+'cooltext445202515.png\';" onmouseover="this.src=\''+imgdir+'cooltext445202515MouseOver.png\';"></a>';
		header[index++]='<br /><br />';
		header[index++]='<a href="https://online1.elancard.com/oad/begin?locationCode=13010" target="_blank"><img src="'+imgdir+'banner_visa.gif" width="200" height="43" alt="" border="0"></a><br />';
		header[index++]='<a href="https://www.myaccountaccess.com/onlineCard/login.do?theme=elan2&loc=13010" target="_blank"><img src="'+imgdir+'banner_visaaccess.gif" width="200" height="43" alt="" border="0" style="margin-top: 1em;"></a>';
		header[index++]='</div>';
		}
		
		header[index++]='</td>';
		header[index++]='</tr>';
		header[index++]='<tr>';
		header[index++]='<td width="20">&nbsp;</td>';
		header[index++]='<td width="483">';
		header[index++]='<font face="arial,helvetica" size="-1">';
		header[index++]='<br>';
	
	
	document.open('text/html','replace');
	document.write(header.join(""));
	document.close();
	return;
}

function makeLeftNav(page) {
	var leftnav = new Array();
	var index = 0;
	
	leftnav[index++]='<a href="https://www.capitalcombankonline2.com/onlineserv/HB/Signon.cgi" class="rollover" onMouseOver="window.status=\'Online Banking\'; return true"><img src="'+imgdir+'nav_onlinebanking_off.gif" width="137" height="49" alt="Online Banking" border="0" name="onlinebanking"></a><br>';
	leftnav[index++]='<a href="https://www.capitalcombankonline2.com/onlineserv/CM/" class="rollover" onMouseOver="window.status=\'Business Banking & Cash Management\'; return true"><img src="'+imgdir+'nav_busbankcashman_off.gif" width="137" height="80" alt="Business Banking & Cash Management" border="0" name="busbankcashman"></a><br>';
	leftnav[index++]='<a href="'+homedir+'products.html" class="rollover" onMouseOver="window.status=\'Products and Services\'; return true"><img src="'+imgdir+'nav_products_off.gif" width="137" height="49" alt="Products and Services" border="0" name="products"></a><br>';
	leftnav[index++]='<a href="'+homedir+'hours.html" class="rollover" onMouseOver="window.status=\'Hours and Locations\'; return true"><img src="'+imgdir+'nav_hours_off.gif" width="137" height="49" alt="Hours and Locations" border="0" name="hours"></a><br>';
	leftnav[index++]='<a href="'+homedir+'about.html" class="rollover" onMouseOver="window.status=\'About CCB\'; return true"><img src="'+imgdir+'nav_aboutus_off.gif" width="137" height="49" alt="About CCB" border="0" name="aboutus"></a><br>';
	leftnav[index++]='<a href="'+homedir+'calculators/loan.html" class="rollover" onMouseOver="window.status=\'Financial Calculators\'; return true"><img src="'+imgdir+'nav_calculators_off.gif" width="137" height="49" alt="Financial Calculators" border="0" name="calculators"></a><br>';
	leftnav[index++]='<a href="https://www.allegiancetech.com/capitalCommunityBankCUS.jsp" class="rollover" onMouseOver="window.status=\'Contact Us\'; return true"><img src="'+imgdir+'nav_contactus_off.gif" width="137" height="49" alt="" border="0" name="contactus"></a><br>';
	leftnav[index++]='<a href="'+homedir+'community.html" class="rollover" onMouseOver="window.status=\'Community\'; return true"><img src="'+imgdir+'nav_community_off.gif" width="137" height="49" alt="Community" border="0" name="community"></a><br>';
	leftnav[index++]='<a href="'+homedir+'espanol.html" class="rollover" onMouseOver="window.status=\'Espanol\'; return true"><img src="'+imgdir+'nav_espanol_off.gif" width="137" height="49" alt="Espanol" border="0" name="espanol"></a><br>';
	if(page != "home"){
	leftnav[index++]='<a href="'+homedir+'index.html" class="rollover" onMouseOver="window.status=\'Home\'; return true" ><img src="'+imgdir+'nav_home_off.gif" width="137" height="49" alt="home" border="0" name="home"></a>';
	}
	leftnav[index++]='</td>';
	

	return leftnav.join("");
}

function makeFooter(page){
	var footer = new Array();
	var index = 0;
	
	footer[index++]='</font>';
	footer[index++]='<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: center; position:absolute; border: 2px solid #000000; padding: 15px; display: none; z-index: 300; width:350px;  top:50; left:150px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=CCCCCC,offX=7,offY=8,positive=true); "></div>';
	footer[index++]='</td>';
	footer[index++]='<td width="20" >&nbsp;</td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='<!-- end nested content table -->';
	footer[index++]='<td width="137" background="'+imgdir+'bg-nav.gif">';
	footer[index++] = makeLeftNav(page);
	footer[index++]='</td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='<!-- end main table -->';
	if(!window.verisign) {
	footer[index++]='<table border="0" width="600" cellspacing="0" cellpadding="0">';
	footer[index++]='<tr valign="top">';
	footer[index++]='<td bgcolor="#fde6c4" background="'+imgdir+'bg.gif">';
	footer[index++]='<br>';
	footer[index++]='<img src="'+imgdir+'bg.gif" width=100 height=10 border=0 alt=""></td>';
	footer[index++]='<td bgcolor="#fde6c4" valign="bottom"><img src="'+imgdir+'ft-space.gif" width="523" height="1" alt border="0"><br><br><p align="center"><font face="Arial" size="4" color="#008000"><a href="'+homedir+'Information-Privacy-Disclosure.pdf" target="_blank">Privacy Policy</a></font></p><br><br><br>';
	footer[index++]='<!-- Begin FDIC NFRONT EHL  Logos -->';
	footer[index++]='<center>';
	footer[index++]='<br>';
	footer[index++]='<table width="400" border="0">';
	footer[index++]='<tr>';
	footer[index++]='<td align="left">';
	footer[index++]='<a href="http://www.fdic.gov" onclick="showWarning(this.href); return false;" target="_blank"><img SRC="'+imgdir+'footer-fdic.gif" border=0></a></td>';
	footer[index++]='<td align="center">';
	footer[index++]='<!-- BEGINNING OF NFRONT COPYRIGHT -->';
	footer[index++]='<CENTER>';
	footer[index++]='<a href="http://ifs.intuit.com" onclick="showWarning(this.href); return false;" target="_blank"><img src="/mstinc/web/images/logo_140x34.png" width="140" height="34" border="0" alt="" /></a>';
	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++]='<br><br>';
	
	footer[index++]='<img src="'+imgdir+'ft-space.gif" width="523" height="1" alt border="0"></td>';
	footer[index++]='<td background="'+imgdir+'bg-nav.gif"><img src="'+imgdir+'bg-nav.gif" width="137" height="40" alt border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='</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" && sectionimg != "none"){
			content[index++]='<img src="'+imgdir+'hed-'+sectionimg+'.gif" width="598" height="39" border="0" alt="'+sectiontitle+'" />';
		}
		
		return content.join("");
	}
	
	document.write('<scr'+'ipt src="/mstinc/grp/js/grp.js" type="text/javascript">/* GRP */</scr'+'ipt>');
	document.write('<scr'+'ipt type="text/javascript">if(typeof grp!=\'undefined\')grp.show(\'capitalcombank.com\');</scr'+'ipt>');
// end of file
	

