var imgdir = "../../images/"

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if (((browserName == "Netscape") && (browserVer >= 3)) || ((browserName =="Microsoft Internet Explorer") && (browserVer >= 4)))
{
version = "ok";
home_on = new Image(26,20);
home_on.src = imgdir + "nav-home-on.gif";

home_off = new Image(26,20);
home_off.src = imgdir + "nav-home-off.gif";

pb_on = new Image(78,20);
pb_on.src = imgdir + "nav-personal-on.gif";

pb_off = new Image(78,20);
pb_off.src = imgdir + "nav-personal-off.gif";

bb_on = new Image(75,20);
bb_on.src = imgdir + "nav-business-on.gif";

bb_off = new Image(75,20);
bb_off.src = imgdir + "nav-business-off.gif";

company_on = new Image(60,20);
company_on.src = imgdir + "nav-company-on.gif";

company_off = new Image(60,20);
company_off.src = imgdir + "nav-company-off.gif";

auto_on = new Image(52,20);
auto_on.src = imgdir + "nav-autocenter-on.gif";

auto_off = new Image(52,20);
auto_off.src = imgdir + "nav-autocenter-off.gif";

travel_on = new Image(26,20);
travel_on.src = imgdir + "nav-travel-on.gif";

travel_off = new Image(26,20);
travel_off.src = imgdir + "nav-travel-off.gif";

help_on = new Image(20,20);
help_on.src = imgdir + "nav-help-on.gif";

help_off = new Image(20,20);
help_off.src = imgdir + "nav-help-off.gif";

insider_on = new Image (140,20);
insider_on.src = imgdir + "nav-insider-on.gif";

insider_off = new Image (140,20);
insider_off.src = imgdir + "nav-insider-off.gif";

code_on = new Image (61,20);
code_on.src = imgdir + "nav-code-on.gif";

code_off = new Image (61,20);
code_off.src = imgdir + "nav-code-off.gif";

addserv_on = new Image (84,20);
addserv_on.src = imgdir + "nav-addserv-on.gif";

addserv_off = new Image (84,20);
addserv_off.src = imgdir + "nav-addserv-off.gif";

}
else
version = "x";

function img_act(imgName)
{
if (version == "ok")
{
imgOn = eval(imgName + "_on.src");
document [imgName].src = imgOn;
}
}

function img_inact(imgName)
{
window.status = "";
 if (version == "ok")
{
imgOff = eval(imgName + "_off.src");
document [imgName].src = imgOff;
}
}

// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE
// ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE ROLLOVER CODE ABOVE

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="../images/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.ibank-1stfed.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 makeTopNav()
{
var topnav=""
topnav+='<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#ffffff">';
topnav+='	<tr valign="top">';
topnav+='  		<td><a href="../frame_set/home.html" target="_top" title="Carrollton Bank- We\'re about people. We\'re about you."><img src="../../images/carrollton_newlogo.gif" width=354 height=86 alt="Carrollton Bank- We\'re about people. We\'re about you." title="Carrollton Bank- We\'re about people. We\'re about you." border="0"></a></td>';
topnav+='		<td class="ficontent"><BR>';
//topnav+='			<!-- https://www.carrolltonbank.com/online/default.asp -->';
//topnav+='			<a class="homelink" href="https://www.carrolltonbankonline2.com/onlineserv/HB/Signon.cgi" target="_blank">Personal Online Banking</a><BR>';
//topnav+='			<a class="homelink" href="https://www.carrolltonbankonline2.com/onlineserv/CM/" target="_blank">Business Online Banking</a><br>';
//topnav+='			<a class="homelink" href="https://www.carrolltonbankonline2.com/onlineserv/HB/security_site/privacy.html" target="_blank">Security Information</a></td>';
//topnav+='		<td align="center" valign="middle" width="300" height="102"><a href="#" name="bannerLink" id="bannerLink"><img src="../../images/clearpix.gif" name="bannerImg" id="bannerImg" border="0" /></a>';	
topnav+='        </td>';
topnav+='	</tr>';
topnav+='</table>';


return (topnav);
}

//be sure to make tab names match the image names that go with the tabs...
var tabs = new Array();
tabs[0] = "home";
tabs[1] = "pb";
tabs[2] = "bb";
tabs[3] = "company";
tabs[4] = "auto";
//tabs[5] = "travel";
tabs[5] = "help";
tabs[6] = "insider";
tabs[7] = "code";
tabs[8] = "addserv";


var on_or_off = new Array();
var on_mouse_out = new Array();

for (var i = 0; i < tabs.length; i++)
	{
	if (parent.whichlit == tabs[i])
		{
		on_or_off[i] = 'on';
		on_mouse_out[i] = '';
		}
	else
		{
		on_or_off[i] = 'off';
		on_mouse_out[i] = 'onMouseOut="img_inact(\'' + tabs[i] + '\');"';
		}		
	//alert(' tab= ' + tabs[i] + '\n onoroff= ' + on_or_off[i] + '\n onmouseout= ' + on_mouse_out[i]);
	}


function makeMainNav()
{
var mainnav=""


/*if (parent.whichlit == tabs[0])
{
	var pWidth = ((parseInt(screen.width) - 480) / 2); 
	var pHeight = ((parseInt(screen.height) - 500) / 2);
        window.open("../../bankcard_popup.html","", "scrollbars=1,width=480,height=500,left="+pWidth+",top="+pHeight+"");
}	*/



//--------------------------------HOME TAB GOES HERE--------------------------------

mainnav+='<table width="735" border="0" cellspacing="0" cellpadding="0">';
mainnav+='				<tr valign="top"><td width="95" align="center"><a href="../frame_set/home.html" target="_top" onMouseOver="img_act(\'home\'); javascript:changetext(content[1]); window.status=\'Home\'; return true" ' + on_mouse_out[0] + '><img src="../../images/nav-home-' + on_or_off[0] + '.gif" width="26" height="20" alt="Home" border="0" name="home"></a></td>';
mainnav+='				<td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';

//--------------------------------PERSONAL TAB GOES HERE--------------------------------

mainnav+='<td width="" align="center"><a href="../frame_set/personal.html" target="_top" onMouseOver="img_act(\'pb\'); javascript:changetext(content[2]); window.status=\'Personal Banking\'; return true" ' + on_mouse_out[1] + '><img src="../../images/nav-personal-' + on_or_off[1] + '.gif" width="78" height="20" alt="Personal Banking" border="0" name="pb"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';

//----------------------------------BUSINESS TAB GOES HERE--------------------------------

mainnav+='<td width="" align="center"><a href="../frame_set/business.html" target="_top" onMouseOver="img_act(\'bb\'); javascript:changetext(content[3]); window.status=\'Business Banking\'; return true" ' + on_mouse_out[2] + '><img src="../../images/nav-business-' + on_or_off[2] + '.gif" width="75" height="20" alt="Business Banking" border="0" name="bb"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';


//----------------------------------ADDITIONAL SERVICES TAB GOES HERE -----------------------

mainnav+='<td width="" align="center"><a href="../frame_set/additional.html" target="_top" onMouseOver="img_act(\'addserv\'); javascript:changetext(content[9]); window.status=\'Additional Services\'; return true" ' + on_mouse_out[8] + '><img src="../../images/nav-addserv-' + on_or_off[8] + '.gif" width="84" height="20" alt="Additional Services" border="0" name="addserv"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';

//----------------------------------COMPANY INFO TAB GOES HERE--------------------------------

//mainnav+='<td width="" align="center"><a href="../frame_set/company.html" target="_top" onMouseOver="img_act(\'company\'); javascript:changetext(content[4]); window.status=\'Company Info\'; return true" ' + on_mouse_out[3] + '><img src="../../images/nav-company-' + on_or_off[3] + '.gif" width="60" height="20" alt="Company Info" border="0" name="company"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';


//----------------------------------INSIDER TRANSACTIONS TAB ---ADDed 6/11/03------------------

//mainnav+='<td width="" align="center"><a href="#"  onMouseOver="img_act(\'insider\'); javascript:changetext(content[5]); window.status=\'Insider Transactions\'; return true" ' + on_mouse_out[6] + '><img src="../../images/nav-insider-' + on_or_off[6] + '.gif" width="140" height="20" alt="Insider Transactions-SEC Filings" border="0" name="insider"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';


//----------------------------------CODE OF ETHICS TAB GOES HERE--------------------------------

//mainnav+='<td width="" align="center"><a href="../frame_set/ethics.html" target="_top" onMouseOver="img_act(\'code\'); javascript:changetext(content[8]); window.status=\'Code of Ethics\'; return true" ' + on_mouse_out[7] + '><img src="../../images/nav-code-' + on_or_off[7] + '.gif" width="61" height="20" alt="Auto Center" border="0" name="code"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';

//----------------------------------AUTO TAB GOES HERE--------------------------------

//mainnav+='<td width="" align="center"><a href="../frame_set/auto.html" target="_top" onMouseOver="img_act(\'auto\'); javascript:changetext(content[5]); window.status=\'Auto Center\'; return true" ' + on_mouse_out[4] + '><img src="../../images/nav-autocenter-' + on_or_off[4] + '.gif" width="52" height="20" alt="Auto Center" border="0" name="auto"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';

//----------------------------------TRAVEL TAB GOES HERE--------------------------------

//mainnav+='<td width="" target="_top" align="center"><a href="../frame_set/travel.html" target="_top" onMouseOver="img_act(\'travel\'); javascript:changetext(content[6]); window.status=\'Travel\'; return true" ' + on_mouse_out[5] + '><img src="../../images/nav-travel-' + on_or_off[5] + '.gif" width="26" height="20" alt="Travel" border="0" name="travel"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';

//----------------------------------HELP TAB GOES HERE-------------------

mainnav+='<td width="" align="center"><a href="../frame_set/help.html" target="_top" onMouseOver="img_act(\'help\'); javascript:changetext(content[7]); window.status=\'Help\'; return true" ' + on_mouse_out[5] + '><img src="../../images/nav-help-' + on_or_off[5] + '.gif" width="20" height="20" alt="Help" border="0" name="help"></a></td><td width="10"><img src="../../images/nav-divider.gif" width="10" height="20" alt="" border="0"></td>';


mainnav+='				</tr>';
mainnav+='			</table>';

return (mainnav);
}


