if (!window.imgdir)
{
var imgdir="http://www.fidhome.com/images/"
var sitedir="http://www.fidhome.com/site/"
var securedir="http://www.fidhome.com/site/"
var homedir="http://www.fidhome.com/"
}

function Include()
{
this.domain = "fidhome";
this.friendly = "Fidelity Homestead Association";
this.ib = "https://www.fidhome.com/onlineserv/HB";
this.ib_demo = "https://www.fidhome.com/onlineserv/HB/demo.html";
this.ib_open_window = false;
this.cm_open_window = true;
this.ib_register = "https://www.fidhome.com/onlineserv/HB/OnlineForm.cgi?form=enhancedNDB";
this.cm = "https://www.fidhome.com/onlineserv/CM/";
this.headergraphic = "checking";
this.rateslink = "rates_deposit.html";
this.makeTopNav = makeTopNav;
this.makeHeader = makeHeader;
this.makeFooter = makeFooter;
this.openIB = openIB;
this.openIBRegister = openIBRegister;
this.openCM = openCM;

}

function makeTopNav()
{


return (topnav);
}

function makeHeader()
{

var header=""
header+='<!-- START BACK PAGE CONTENT AREA -->';
header+='<!-- START BACK PAGE CONTENT AREA -->';
header+='<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">';
header+='	<tr>';
header+='		<td width="760" colspan="2"><img src="' + imgdir + 'clearpix.gif" width="1" height="15" alt="" border="0"></td>';
header+='	</tr>';
header+='	<tr>';
header+='	';
header+='<!--  GRAPHICAL SECTION HEADER BELOW  -->';
header+='<!--  GRAPHICAL SECTION HEADER BELOW  -->';
header+='		<td width="669" valign="top" bgcolor="#114E8B"><img src="' + imgdir + 'hed-' + this.headergraphic + '.gif" width="238" height="43" alt="Checking Accounts" border="0"><img src="' + imgdir + 'clearpix.gif" width="431" height="1" alt="" border="0"></td>';
header+='<!--  GRAPHICAL SECTION HEADER ABOVE  -->';
header+='<!--  GRAPHICAL SECTION HEADER ABOVE  -->';
header+='<!--  RATES LINK BELOW  -->';
header+='<!--  RATES LINK BELOW  -->';
header+='		<td width="91" valign="top"><a href="' + this.rateslink + '"><img src="' + imgdir + 'rates_button.gif" width="91" height="43" alt="Rates" border="0" align="right"></a></td>';
header+='<!--  RATES LINK ABOVE -->';
header+='<!--  RATES LINK ABOVE -->';
header+='	</tr>';
header+='	<tr>';
header+='		<td width="760" colspan="2"><img src="' + imgdir + 'clearpix.gif" width="1" height="15" alt="" border="0"></td>';
header+='	</tr>';
header+='	<tr>';
header+='		<td width="760" colspan="2" valign="top">';
header+='		';


return (header);
}

function makeFooter()
{

var footer=""
footer+='<table width="75%" align="center" cellpadding="2" cellspacing="1" border="0">';
footer+='	<tr>';
footer+='		<td width="50%" class="ficontent" valign="top" align="center">';
footer+='<img src="' + imgdir + 'white_memberfdic.gif" width="58" height="57" alt="" border="0">';
footer+='		</td>';
footer+='		<td width="50%" class="ficontent" valign="top" align="center">';
footer+='<img src="' + imgdir + 'white-fidelity.gif" width="225" height="88" alt="" border="0">';
footer+='		</td>';
footer+='	</tr>';
footer+='</table>	';
footer+='			';
footer+='			';
footer+='		</td>';
footer+='	</tr>';
footer+='</table>';
footer+='		';
footer+='<!-- END BACK PAGE CONTENT AREA -->';
footer+='<!-- END BACK PAGE CONTENT AREA -->';


return (footer);
}

function openIB(which)
{
if (which == 'demo')
	{
	if (this.ib_open_window == true)
		{
		window.open(this.ib_demo);
		}
	else
		{
		location.href = this.ib_demo;
		}
	}
else if (which == 'top')
	{
	if (this.ib_open_window == true)
		{
		window.open(this.ib);
		}
	else
		{
		top.location.href = this.ib;
		}
	}	
else if (which == 'demotop')
	{
	if (this.ib_open_window == true)
		{
		window.open(this.ib_demo);
		}
	else
		{
		top.location.href = this.ib_demo;
		}
	}		
else
	{
	if (this.ib_open_window == true)
		{
		window.open(this.ib);
		}
	else
		{
		location.href = this.ib;
		}
	}
}

function openIBRegister()
{
	window.open(this.ib_register);
}

function openCM()
{
if (this.cm_open_window == true)
	{	
	window.open(this.cm);
	}
else
	{
	location.href = this.cm;
	}
}

function showCalc(calc)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 275)
var pHeight = (((parseInt(screen.height) / 2)) -240)
window.open(calc,"hello","width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");

}
function tabover(howmuch)
{
var farover = '';
farover += '<img src="' + imgdir + 'clearpix.gif" width="' + howmuch + '" height="1" alt="" border="0">';
document.write(farover);
}

function open_apps(nameofapp)
{
var pWidth = ( ((parseInt(screen.width) / 2)) - 350)
var pHeight = (((parseInt(screen.height) / 2)) - 300)
aWindow = window.open('https://www.fidhome.com/Forms/OnlineForm.cgi?form=' + nameofapp,'application',"toolbar=0,location=0,directories=0,status=0,menubar=0,width=700,height=600,top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=1,status=1");
}

function make_mortgage_dropdown()
{

var items = new Array();
items[0] = new Array('#' , 'Make a Selection' , 'same');
items[1] = new Array('mortgage_welcome.html' , 'Mortgage Center' , 'same');
items[2] = new Array('mortgage_construction.html' , 'Home Buying and Home Construction Loans' , 'same');
items[3] = new Array('mortgage_home_improvement.html' , 'Home Equity and Home Improvement Loans' , 'same');
items[4] = new Array('mortgage_real.html' , 'Commercial Real Estate Loans' , 'same');
		
writeout_dropdown(items);		
}

function make_about_dropdown()
{

var items = new Array();
items[0] = new Array('#' , 'Make a Selection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' , 'same');
items[1] = new Array('about_locations.html' , 'Branch Locations' , 'same');
items[2] = new Array('about_business.html' , 'Business Hours' , 'same');
items[3] = new Array('about_financial.html' , 'Financial Statement' , 'same');
items[4] = new Array('about_directors.html' , 'Directors & Officers' , 'same');
items[5] = new Array('about_history.html' , 'History' , 'same');
		
writeout_dropdown(items);		
}

function make_cd_dropdown()
{

var items = new Array();
items[0] = new Array('#' , 'Make a Selection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' , 'same');
items[1] = new Array('frame_set/savings.html' , 'Savings Accounts' , 'top');
items[2] = new Array('cd.html' , 'Certificates of Deposits' , 'same');
items[3] = new Array('ira.html' , 'Retirement and Education Savings Accounts' , 'same');
		
writeout_dropdown(items);		
}

function make_checking_dropdown()
{

var items = new Array();
items[0] = new Array('#' , 'Make a Selection&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' , 'same');
items[1] = new Array('checking.html' , 'Personal Checking Accounts' , 'same');
items[2] = new Array('checking_business.html' , 'Business Checking Accounts' , 'same');
items[3] = new Array('checking_fastline.html' , 'Fastline' , 'same');
items[4] = new Array('checking_local.html' , 'Local Connections' , 'same');
		
writeout_dropdown(items);		
}

function writeout_dropdown(items)
{
var whole = '<form name="form1">';
whole += '<select name="dropdown_nav" onChange="javascript:changeLocations();" class="dropdown">';
for (i=0; i < items.length; i++)
	{
	if (items[i][2] == "new")
		{
		var target="?new";
		}
	else if (items[i][2] == "top")
		{
		var target="?top";
		}	
	else
		{
		var target="";
		}	
	whole += '<option value="' + items[i][0] + target + '">' + items[i][1] + '</option>';
	}
whole += '</select></form>';
document.write(whole);
}

function changeLocations()
{
var location = document.form1.dropdown_nav[document.form1.dropdown_nav.selectedIndex].value;

var first = location.indexOf("?");
if (first != -1)
	{
	var target = location.substring(first + 1 , location.length);
	location = location.substring(0 , first);
	}
else
	{
	var target = "";
	}	
	
	//alert(target);
	//alert(location);
	
if (target == "new")
	{
	window.open(location);
	}
else if (target == "top")
	{
	top.location.href = location;
	}	
else
	{
	window.location.href = location;
	}	

}

function make_mortgage_subnav(whichnumber , breaknumber)
{
var items = new Array();
items[0] = new Array('<a href="mortgageequity_real.html">' , 'Real Estate' , '</a>');
items[1] = new Array('<a href="mortgageequity_mortgages.html">' , 'Mortgages' , '</a>');
items[2] = new Array('<a href="http://www.mortgagecuso.com/" target="_new">' , 'Mortgage Center' , '</a>');
items[3] = new Array('<a href="mortgageequity_why.html">' , 'Why Home Equity' , '</a>');
items[4] = new Array('<a href="mortgageequity_types.html">' , 'Types of Equity' , '</a>');
items[5] = new Array('<a href="https://www.bestsourcecu.org/onlineserv/loan_app.html" target="_new">' , 'Apply' , '</a>');

writeitout(items , whichnumber , breaknumber);
}


function writeitout(items , whichnumber , breaknumber)
{
var whole = '<div align="center" class="subnav">';
var spacer = ""
for (i=0; i < items.length; i++)
	{
	if (i != whichnumber)
		{
		spacer = " | ";
		if (i == items.length - 1)
			spacer = "";
		else if (i == breaknumber)
			spacer = "<br>";
		whole += items[i][0] + items[i][1] + items[i][2] + spacer;
		}
	else
		{
		spacer = " | ";
		if (i == items.length - 1)
			spacer = "";
		else if (i == breaknumber)
			spacer = "<br>";
		whole += items[i][1] + spacer;
		}
	}
whole += '</div><br>';
document.write(whole);
}


