function showall() {
showlayer('newslayer');
showlayer('productlayer');
showlayer('banklayer');
showlayer('aboutlayer');
showlayer('internetlayer');
showlayer('virtuallayer');
showlayer('quickthinklayer');
showlayer('datesNewslayer');

}

function hideall() {
hidelayer('newslayer');
hidelayer('productlayer');
hidelayer('banklayer');
hidelayer('aboutlayer');
hidelayer('internetlayer');
hidelayer('virtuallayer');
hidelayer('quickthinklayer');
hidelayer('datesNewslayer');


}


function hidecells() {
hidelayer('contactCell');
hidelayer('newsCell');
hidelayer('productsCell');
hidelayer('officesCell');
hidelayer('aboutCell');
hidelayer('investorCell');
hidelayer('IBSCell');



}
function news_on(status) {
if(status == "on"){
	document.news_button.src='images/Homepage/newsr.gif';
	document.center_image.src='images/front/news.jpg';
	}
else if(status == "off"){
	document.news_button.src='images/Homepage/newsn.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}
}
	
function products_on(status) {
if(status == "on"){
	document.products_button.src='images/Homepage/ProductsR.gif';
	document.center_image.src='images/front/products.jpg';
	}
else if(status == "off"){
	document.products_button.src='images/Homepage/ProductsO.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function bank_on(status) {
if(status == "on"){
	document.bank_button.src='images/Homepage/BankR.gif';
	document.center_image.src='images/front/bank.jpg';
	}
else if(status == "off"){
	document.bank_button.src='images/Homepage/BankO.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function contact_on(status) {
if(status == "on"){
	document.contact_button.src='images/Homepage/contact_usred.gif';
	document.center_image.src='images/front/contact_us.jpg';
	}
else if(status == "off"){
	document.contact_button.src='images/Homepage/contact_us.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function about_on(status) {
if(status == "on"){
	document.about_button.src='images/Homepage/AboutR.gif';
	document.center_image.src='images/front/about.jpg';
	}
else if(status == "off"){
	document.about_button.src='images/Homepage/AboutO.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function investor_on(status) {
if(status == "on"){
	document.investor_button.src='images/Homepage/InvestorR.gif';
	document.center_image.src='images/front/investor.jpg';
	}
else if(status == "off"){
	document.investor_button.src='images/Homepage/InvestorO.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function internet_on(status) {
if(status == "on"){
	document.internet_button.src='images/Homepage/InternetBankingB.gif';
	document.center_image.src='images/front/internetbanking.jpg';
	}
else if(status == "off"){
	document.internet_button.src='images/Homepage/InternetBankingW.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function virtual_on(status) {
if(status == "on"){
	document.virtual_button.src='images/Homepage/secure_email_on.gif';
	document.center_image.src='images/front/secure_email.jpg';
	}
else if(status == "off"){
	document.virtual_button.src='images/Homepage/secure_email_off.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function quickthink_on(status) {
if(status == "on"){
	document.quickthink_button.src='images/Homepage/pressrelease2.gif';
	document.center_image.src='images/front/quickthinking.jpg';
	}
else if(status == "off"){
	document.quickthink_button.src='images/Homepage/pressrelease1.gif';
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function datesNews_on(status) {
if(status == "on"){
	document.center_image.src='images/front/dates.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function bauer_on(status) {
if(status == "on"){
	document.center_image.src='images/front/bauer.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function nas_on(status) {
if(status == "on"){
	document.center_image.src='images/front/nasdaq.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function sba_on(status) {
if(status == "on"){
	document.center_image.src='images/front/sba.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function equal_on(status) {
if(status == "on"){
	document.center_image.src='images/front/equalhousing.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function fdic_on(status) {
if(status == "on"){
	document.center_image.src='images/front/fdic.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

function grand_on(status) {
if(status == "on"){
	document.center_image.src='images/front/internetbanking.jpg';
	}
else if(status == "off"){
	document.center_image.src='images/Homepage/home_square_Line.gif';
	
	}	
}

IE5=NN4=NN6=OPA=false
if(navigator.userAgent.toLowerCase().indexOf("opera")+1)OPA=true
else if(document.all)IE5=true
else if(document.layers)NN4=true
else if(document.getElementById)NN6=true

//window.onLoad =initialize   // call initialize() when page loads
var myObj
window.onresize = rePos     // call rePos() whenever page is resized

// Opera doesn't have an onresize event so you have to call rePos all the time.
if(OPA) setInterval("rePos()",500)




function initialize() {
	if(NN4){
	myAboutObj = document.aboutCell;
	myContactObj = document.contactCell;
	myInvestorObj = document.investorCell;
	myOfficesObj = document.officesCell;
	myProductsObj = document.productsCell;
	myNewObj = document.newsCell;
	myIBSObj = document.IBSCell;
	} else {
	myAboutObj = document.getElementById("aboutCell").style;
	myContactObj = document.getElementById("contactCell").style;
	myInvestorObj = document.getElementById("investorCell").style;
	myOfficesObj = document.getElementById("officesCell").style;
	myProductsObj = document.getElementById("productsCell").style;
	myNewObj = document.getElementById("newsCell").style;
	myIBSObj = document.getElementById("IBSCell").style;
	}
	rePos()
}

//var w=138   // width of the div
//var h=52   // height of the div

function rePos() {
	// compute center coordinate
	
	if(NN4||NN6) {
		xc=Math.round(window.innerWidth/2 + 6);
		xl=Math.round(window.innerWidth/2 - 378);
		//yc=Math.round((window.innerHeight/2)-(h/2))
	} else {
		xc=Math.round(document.body.clientWidth/2 + 6);
		xl=Math.round(document.body.clientWidth/2 - 379);
		//yc=Math.round((document.body.clientHeight/2)-(h/2))
	};
	if (xc < 390){
		xc=390;
		if(NN4||NN6) {
			xl=5;
		} else {
			xl=5;
		};
	};
	// reposition div
	if(this.NN4) {
		myAboutObj.moveTo(xc,387);
		myContactObj.moveTo(xc,340);
		myInvestorObj.moveTo(xc,409);
		myOfficesObj.moveTo(xc,363);
		myProductsObj.moveTo(xc,338);
		myNewObj.moveTo(xc,314);
		myIBSObj.moveTo(xl,314);
	} else {
		myAboutObj.left = xc + "px";
		myAboutObj.top = 387 + "px";
		myContactObj.left = xc + "px";
		myContactObj.top = 340 + "px";
		myInvestorObj.left = xc + "px";
		myInvestorObj.top = 409 + "px";
		myOfficesObj.left = xc + "px";
		myOfficesObj.top = 363 + "px";
		myProductsObj.left = xc + "px";
		myProductsObj.top = 338 + "px";
		myNewObj.left = xc + "px";
		myNewObj.top = 314 + "px";
		myIBSObj.left = xl + "px";
		myIBSObj.top = 211 + "px";
		
		//myObj.top = yc + "px"
	}
}

function popup_login (url, h, w, extras) {
	// initilize variables
	var props = "resizable=no,scrollbars=auto,status=yes,toolbar=no,menubar=no";
	// append the list of properties to the default properties
	if ( extras != "" ) {
		props += ","+ extras;
	}
	// require a height and width to be specified
	if ( w == "" || h == "" ) {
		return false;
	} else {
		// open the Pop-up Login window
		popupLogin = window.open(url, "popupLogin","width="+ w +",height="+ h +","+ props);
	}
}


function warning() {
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open('http://www.nasdaq.com');
} 
function warning2() {
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open('http://quotes.nasdaq.com/quote.dll?mode=stock&kind=&symbol=bbnk&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&FormType=&mkttype=&pathname=&page=multi&selected=BBNK');
}
function warningprix() {
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open('http://www.sanjosegrandprix.com');
} 
 
function myPopup() {
	window.open("media/popup.htm","","height=350,width=640,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=0,top=0")
}
function popupwindow8(){
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open("http://www.bauerfinancial.com/")
}
function popupwindow9(){
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open("http://www.sba.gov/")
}
function popupwindow10(){
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open("http://www.fdic.gov/quicklinks/consumers.html")
}
function popupwindow11(){
	window.alert('The link you have selected is located on another server. Please click OK to leave the Bridge Bank site and proceed to the selected site. Bridge Bank does not endorse this web site, its sponsor, or any of the policies, activities, products, or services offered on the site or by any advertiser on the site.');
	window.open("http://portal.hud.gov/portal/page/portal/HUD/program_offices/fair_housing_equal_opp")
}
function warningOnlineBanking() { 
 window.alert('Internet Banking may not be available at this time due to a technical issue. If you have questions or need assistance please contact your branch office.');
 window.open("http://ibs.secure-banking.com/homebank1541.htm")
} 
