if(window.event + "" == "undefined") event = null;
function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};
popUp = HM_f_PopUp;
popDown = HM_f_PopDown;


/*
META TAGS CONTENT AND DESCRIPTION BELOW


/*
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
*/


//if you are on homepage you need <script> var homepage = "yes";</script> to make codework properly

var imgdir;
var sitedir;
var securedir;
var homedir;

if(window.homepage)
{
imgdir="../../images/";
sitedir="site/";
securedir="../";
homedir="";
}
else if(window.absolutepage)
{
imgdir="http://www.centerabank.com/images/"
sitedir="http://www.centerabank.com/site/"
securedir="http://www.centerabank.com/site/"
homedir="http://www.centerabank.com/"
}
else if(window.securepage)
{
imgdir="https://www.centerabank.com/images/"
sitedir="http://www.centerabank.com/site/"
securedir="https://www.centerabank.com/site/"
homedir="http://www.centerabank.com/"
}
else
{
imgdir="../images/";
sitedir="";
securedir="";
homedir="../";
}


// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW
// ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW ROLLOVER CODE BELOW


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

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

personalbanking_on = new Image(104,17);
personalbanking_on.src = imgdir + "nav-personalbanking-on.gif";

personalbanking_off = new Image(104,17);
personalbanking_off.src = imgdir + "nav-personalbanking-off.gif";

busagricultbanking_on = new Image(151,17);
busagricultbanking_on.src = imgdir + "nav-busagricultbanking-on.gif";

busagricultbanking_off = new Image(151,17);
busagricultbanking_off.src = imgdir + "nav-busagricultbanking-off.gif";

investments_on = new Image(77,17);
investments_on.src = imgdir + "nav-investments-on.gif";

investments_off = new Image(77,17);
investments_off.src = imgdir + "nav-investments-off.gif";

ourcommunity_on = new Image(94,17);
ourcommunity_on.src = imgdir + "nav-ourcommunity-on.gif";

ourcommunity_off = new Image(94,17);
ourcommunity_off.src = imgdir + "nav-ourcommunity-off.gif";

loancenter_on = new Image(77,17);
loancenter_on.src = imgdir + "nav-loancenter-on.gif";

loancenter_off = new Image(77,17);
loancenter_off.src = imgdir + "nav-loancenter-off.gif";

aboutolb_on = new Image(71,17);
aboutolb_on.src = imgdir + "nav-aboutolb-on.gif";

aboutolb_off = new Image(71,17);
aboutolb_off.src = imgdir + "nav-aboutolb-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

//style sheet sniffer
document.write('<scr'+ 'ipt src="' + securedir + '_styles.js"></scr' + 'ipt>');

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.centerabank.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 showFAQ(faq){
		var pWidth = ( ((parseInt(screen.width) / 2)) - 700)
		var pHeight = (((parseInt(screen.height) / 2)) - 480)
        window.open(faq,'',"width=700,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");
}

function makeLeftLinks(section)
{

var links = '';

if (section == 1)
	{
	links += '<a href="' + sitedir + 'about.html">About Us</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'letter.html">Letter from the CEO</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'staff.html">Our Staff</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'hours.html">Hours & Locations</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="javascript:open_apps(\'guestbook_app\');">Contact Us</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else if (section == 2)
	{
	links += '<a href="' + sitedir + 'personal_checking.html">Checking</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'personal_savings.html">Savings</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'personal_mm.html">Money Market</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'personal_loans.html">Personal Loans</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'other_services.html">Other Services</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'faq.html">FAQs</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="http://www.centerabank.com/prodserv/rates.html">Rates</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'calculators.html">Calculators</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else if (section == 3)
	{
	links += '<a href="' + sitedir + 'business_checking.html">Checking</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'personal_savings.html">Savings</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'business_mm.html">Money Market</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'commercial_loans.html">Commercial Loans</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'agricultural_loans.html">Agriculture Loans</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'business_other.html">Other Services</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'faq.html">FAQs</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'calculators.html">Calculators</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else if (section == 4)
	{
	links += '<a href="' + sitedir + 'cd.html">CDs</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'ira.html">IRAs</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="http://www.centerabank.com/prodserv/rates.html">Rates</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'calculators.html">Calculators</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else if (section == 5)
	{
	links += '<a href="' + sitedir + 'community_links.html">Community Links</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'hours.html">Hours & Locations</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'staff.html">Our Staff</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="javascript:open_apps(\'guestbook_app\');">Contact Us</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'calculators.html">Calculators</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else if (section == 6)
	{
	links += '<a href="' + sitedir + 'personal_loans.html">Personal Loans</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'commercial_loans.html">Commercial Loans</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'agricultural_loans.html">Agricultural Loans</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'calculators.html">Calculators</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else if (section == 7)
	{
	links += '<a href="' + sitedir + 'olb_billpay.html">Online Banking &</a> &nbsp;&nbsp;&nbsp;<br><a href="' + sitedir + 'olb_billpay.html">Bill Pay</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="https://www.centerabank.com/onlineserv/HB/demo.html" target="_top">Demo</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="https://www.centerabank.com/onlineserv/HB/OnlineForm.cgi?form=enhancedNDB" target="_new">Apply Now/Sign Up</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="javascript:showFAQ(\'faq-securitytips.html\')">Security</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'eft_disclosure.html">EFT Agreement &</a> &nbsp;&nbsp;&nbsp; <a href="' + sitedir + 'eft_disclosure.html">Disclosure</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="' + sitedir + 'faq.html">FAQs</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	links += '<a href="javascript:open_apps(\'guestbook_app\');">Contact Us</a><img src="' + imgdir + 'bullet2.gif" width="17" height="9"><br>';
	return (links);
	}
else
	{
	return (false);
	}
	
}

function makeFooter()
{
var footer=""
footer+='<br><br>';
footer+='<table width="90%" align="center" cellpadding="2" cellspacing="1" border="0">';
footer+='	<tr>';
footer+='		<td width="25%" class="subnav" valign="top" align="center">';
footer+='		<img src="' + imgdir + 'memberfdic.gif" width="57" height="34" alt="" border="0">';
footer+='		</td>';
footer+='		<td width="50%" class="subnav" valign="top" align="center">';
footer+='		<a href="http://www.centerabank.com/site/privacy.html">Privacy Policy</a>  | <a href="javascript:showFAQ(\'http://www.centerabank.com/site/faq-securitytips.html\');">Security Tips</a>';
footer+='		</td>';
footer+='		<td width="25%" class="subnav" valign="top" align="center">';
footer+='		<img src="' + imgdir + 'equalhl.gif" width="41" height="38" alt="" border="0">';
footer+='		</td>';
footer+='	</tr>';
footer+='</table>';
footer+='<br><br>';


return (footer);
}

var back_pics = new Array();
back_pics[0] = '<img src="' + imgdir + 'pic-01wheat.jpg" width="188" height="86" alt="" border="1">';
back_pics[1] = '<img src="' + imgdir + 'pic-02field.jpg" width="188" height="86" alt="" border="1">';
back_pics[2] = '<img src="' + imgdir + 'pic-03sunset.jpg" width="188" height="86" alt="" border="1">';
back_pics[3] = '<img src="' + imgdir + 'pic-04field.jpg" width="188" height="86" alt="" border="1">';
back_pics[4] = '<img src="' + imgdir + 'pic-05barn.jpg" width="188" height="86" alt="" border="1">';
back_pics[5] = '<img src="' + imgdir + 'pic-06hands.jpg" width="188" height="86" alt="" border="1">';

function makeBackPics(num1 , num2)
{
var pics = '';

pics +='<table width="90%" align="center" cellpadding="2" cellspacing="1" border="0">';
pics +='<tr>';
pics +='<td width="50%" class="ficontent" valign="top" align="center">';
pics += back_pics[num1];
pics +='</td>';
pics +='<td width="50%" class="ficontent" valign="top" align="center">';
pics += back_pics[num2];
pics +='</td>';
pics +='</tr>';
pics +='</table>';
pics +='<br>';
pics +='<span class="ficontent">';

return (pics);
}

//useage: <a href="javascript:show_warning('http://www.hotmail.com');">Test Link</a>
//needs images button_continue and button_cancel in the ../images folder (buttons are 109X28) 
function show_warning(URL)
{

	//page variables
	var page_bgcolor="#FFFFE6";
	var border_color="#710C2D";
	var table_bgcolor="#FFFFE6";
	var time_visible=30000; //automatically closes after this time

	//content creation
	var content=""
	content+='<html>';
	content+='<head>';
	content+='<title>3rd Party Disclaimer</title>';
	content+='</head>';
	content+='<body bgcolor="' + page_bgcolor + '" onload=javascript:setTimeout(\'self.close()\','  + time_visible + ')>';
	content+='<table bgcolor="' + border_color + '" align="center" width="300" cellspacing="2" cellpadding="0" border="0">';
	content+='	<tr>';
	content+='	    <td>';
	content+='		<table bgcolor="' + table_bgcolor +'" align="center" width="100%" cellspacing="1" cellpadding="6" border="0">';
	content+='			<tr>';
	content+='	    		<td>You are leaving Centera Bank\'s web site and will be redirected to another site.  Centera Bank makes no endorsement or claims about the accuracy or content of the information contained in these sites.  The security and privacy policies on these sites may be different than those of Centera Bank.';
	content+='				 <div align="center"><a href="'+URL+'" target="_blank" onClick="setTimeout(\'self.close()\',2000)">I Accept</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:self.close();">I Decline</a></div>';	
	content+='				</td>';
	content+='			</tr>';
	content+='		</table>';
	content+='		</td>';
	content+='	</tr>';
	content+='</table>';
	content+='</body>';
	content+='</html>';

	//actual centering popup code
	outsideURL=URL;
	var pWidth = ((parseInt(screen.width) - 340) / 2); 
	var pHeight = ((parseInt(screen.height) - 570) / 2);
     newwin = window.open("","newwin", "width=340,height=200,left="+pWidth+",top="+pHeight+", scrollbars=0");
 	newwin.document.open();
	newwin.document.write(content);
	newwin.document.close();
}	

function showWarningwather(form){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = 'You are leaving Centera Bank\'s web site and will be redirected to another site. Centera Bank makes no endorsement or claims about the accuracy or content of the information contained in these sites. The security and privacy policies on these sites may be different than those of Centera Bank.';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="#" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'; document.forms[\'QuoteForm\'].submit();">I Accept</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">I Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}

function showWarningtopmarket(form){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = 'You are leaving Centera Bank\'s web site and will be redirected to another site. Centera Bank makes no endorsement or claims about the accuracy or content of the information contained in these sites. The security and privacy policies on these sites may be different than those of Centera Bank.';
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><a href="#" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'; document.forms[\'QuoteForm\'].submit();">I Accept</a>&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">I Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0); //used to make sure that the end user sees the disclaimer.

}
