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

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

function makeHeader(pagename,sectionimg,section_alts){
	var header = new Array();
	var index = 0;
	
	header[index++] = '<div id="ex_dis"><!-- comment --></div>';
	header[index++] = '<table width="610" border="0" cellspacing="0" cellpadding="0">';
	header[index++] = '	<tr>';
	header[index++] = '<td><img src="'+imgdir+'table1-1.gif" width="101" height="99" alt="" border="0"><img src="'+imgdir+'pix-blue.gif" width="81" height="99" alt="" border="0"><img src="'+imgdir+'table1-3.gif" width="331" height="99" alt="Paul\'s Valley National Bank" border="0"><img src="'+imgdir+'pix-blue.gif" width="97" height="99" alt="" border="0"></td>';
	header[index++] = '</tr>';
	header[index++] = '</table>';
	header[index++] = '<table width="610" border="0" cellspacing="0" cellpadding="0">';
	header[index++] = '<tr>';
	header[index++] = '<td><img src="'+imgdir+'table2-1.gif" width="109" height="30" alt="" border="0"><img src="'+imgdir+'table2-2.gif" width="196" height="30" alt="" border="0"><img src="'+imgdir+'hed-'+sectionimg+'.gif" alt="'+section_alts+'" border="0"></td>';
	header[index++] = '</tr>';
	header[index++] = '</table>';
	header[index++] = '<!--Ending Top (Above Content and Navigation)-->';
	header[index++] = '<table width="610" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">';
	header[index++] = '<tr>';
	header[index++] = '<!--Beginning Navigation-->';
	header[index++] = makeLeftNav(pagename);
	header[index++] = '<!--Beginning Navigation-->';
	header[index++] = '<td><table width="460" border="0" cellspacing="0" cellpadding="0" bgcolor="white">';
	header[index++] = '<tr>';
	header[index++] = '<!--Beginning Main Content Area Max. Width="460"-->';
	header[index++] = '<!--Beginning Main Content Area Max. Width="460"-->';
	header[index++] = '<!--Beginning Main Content Area Max. Width="460"-->';
	header[index++] = '<td width="460" valign="TOP" bgcolor="#FFFFFF" background="'+imgdir+'background.gif"><img src="'+imgdir+'pix-clear.gif" width="460" height="5" alt="" border="0"><br>';
	
	
	document.open('text/html','replace');
	document.write(header.join(""));
	document.close();
	return;
}

function makeLeftNav(section) {
	var leftnav = new Array();
	var index = 0;
	
	var onlinebankingimg = (section=="onlinebanking")?"nav_onlinebanking_on.gif":"nav_onlinebanking_off.gif";
	var personalimg = (section=="personal")?"nav_personal_on.gif":"nav_personal_off.gif";
	var businessimg = (section=="business")?"nav_business_on.gif":"nav_business_off.gif";
	var calculatorsimg = (section=="calculators")?"nav_calculators_on.gif":"nav_calculators_off.gif";
	var contactimg = (section=="contact")?"nav_contact_on.gif":"nav_contact_off.gif";
	var aboutimg = (section=="about")?"nav_about_on.gif":"nav_about_off.gif";
	var helpimg = (section=="help")?"nav_help_on.gif":"nav_help_off.gif";
	var homeimg = (section=="home")?"nav_home_on.gif":"nav_home_off.gif";
	
	leftnav[index++] = '<td width="139" valign="TOP" background="'+imgdir+'nav-background.gif">';
	leftnav[index++] = '<img src="'+imgdir+'pix-clear.gif" width="139" height="5" alt="" border="0">';
	leftnav[index++] = '<a href="'+sitedir+'onlinebanking.html" class="rollover"><img name="onlinebanking" src="'+imgdir+onlinebankingimg+'" width="139" height="28" alt="Online Banking" border="0"></a><br>';
	//leftnav[index++] = '<a href="'+sitedir+'products_personal.html" class="rollover"><img name="personal" src="'+imgdir+personalimg+'" width="139" height="28" alt="Personal Products and Services" border="0"></a><br>';
	leftnav[index++] = '<a href="'+sitedir+'products_business.html" class="rollover"><img name="business" src="'+imgdir+businessimg+'" width="139" height="28" alt="Business Products and Services" border="0"></a><br>';
	leftnav[index++] = '<a href="'+sitedir+'calculators_loan.html" class="rollover"><img name="calculators" src="'+imgdir+calculatorsimg+'" width="139" height="28" alt="Financial Calculator" border="0"></a><br>';
	leftnav[index++] = '<a href="'+sitedir+'contact.html" class="rollover"><img name="contact" src="'+imgdir+contactimg+'" width="139" height="28" alt="Contact Us" border="0"></a><br>';
	leftnav[index++] = '<a href="'+sitedir+'about.html" class="rollover"><img name="about" src="'+imgdir+aboutimg+'" width="139" height="28" alt="About Us" border="0"></a><br>';
	//leftnav[index++] = '<a href="'+sitedir+'help.html" class="rollover"><img name="help" src="'+imgdir+helpimg+'" width="139" height="28" alt="Help" border="0"></a><br>';
	leftnav[index++] = '<a href="'+homedir+'index.html" class="rollover"><img name="home" src="'+imgdir+homeimg+'" width="139" height="28" alt="Home" border="0"></a><br>';
	leftnav[index++] = '</td>';
	

	return leftnav.join("");
}

function makeFooter(){
	var footer = new Array();
	var index = 0;
	
	footer[index++]='<table border="0" width="400" cellspacing="0" cellpadding="0" style="background-color: #fff;">';
	footer[index++]='<tr>';
	footer[index++]='<td style="vertical-align: middle;"><div align="center"><a href="' + sitedir + 'fdic_coverage.pdf" target="_blank"><img src="'+imgdir+'fdic.gif" width="57" height="23" border="0"></a><img src="'+imgdir+'pix-clear.gif" width="45">';
	footer[index++]='<a href="http://ifs.intuit.com" onclick="return displayThirdPartyAlert(1,this);"><img src="/mstinc/web/images/di_140x34_1c_k.png" width="140" height="34" border="0" alt="Powered by Intuit" /></a><img src="'+imgdir+'pix-clear.gif" width="45">';
	footer[index++]='<img src="'+imgdir+'equalhl.gif" width="41" height="38" border="0"></div>';
	footer[index++]='<p style="text-align: center;"><a href="' + sitedir + 'safe.html">Mortgage Loan Originator List</a></p>';
	footer[index++]='</td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='<br></td>';
	footer[index++]='<!--Ending Main Content Area-->';
	footer[index++]='<!--Ending Main Content Area-->';
	footer[index++]='<!--Ending Main Content Area-->';
	footer[index++]='</tr>';
	footer[index++]='</table></td>';
	footer[index++]='<td valign="TOP" background="'+imgdir+'content-right-background.gif"><img src="'+imgdir+'pix-clear.gif" width="11" height="10" alt="" border="0"></td>';
	footer[index++]='</tr>';
	footer[index++]='</table>';
	footer[index++]='<table width="610" border="0" cellspacing="0" cellpadding="0">';
	footer[index++]='<tr>';
	footer[index++]='<!--Beginning Address-->';
	footer[index++]='<td><img src="'+imgdir+'address.gif" width="610" height="25" alt="Pauls Valley National Bank--101 W. Paul Ave.--Pauls Valley, OK 73075" border="0"></td>';
	footer[index++]='<!--Ending Address-->';
	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("");
	}	
// end of file
	

