//prevents the js errors before the page finishes loading
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;

//this code is the _script.js file
var directCall;
var directCall2; 
var securedir;
 if(window.file){
   directCall="";
   directCall2="site/";
   directCall3="site/";
   securedir="site/";
   }
 else if(window.absolute){
    
    directCall="http://www.belmontsavingsonline.com/";
    directCall2="http://www.belmontsavingsonline.com/site/";
    securedir="http://www.belmontsavingsonline.com/site/";
 }
  else if(window.secure){
    
    directCall="https://www.belmontsavingsonline.com/";
    directCall2="http://www.belmontsavingsonline.com/site/";
    securedir="https://www.belmontsavingsonline.com/site/";
 }    
else{
   directCall="../";
   directCall2="";
   securedir="";
   }

// 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";

        onlinebanking_on = new Image(168,93); onlinebanking_on.src = directCall + "images/nav-onlinebanking-on.gif";
		onlinebanking_off = new Image(168,93); onlinebanking_off.src = directCall + "images/nav-onlinebanking-off.gif";
		
        businessbanking_on = new Image(168,44);  businessbanking_on.src = directCall + "images/nav-businessbank-on.gif";
		businessbanking_off = new Image(168,44); businessbanking_off.src = directCall + "images/nav-businessbank-off.gif";
		
		privacy_on = new Image(88,30);  privacy_on.src = directCall + "images/nav-privacy-on.gif";
		privacy_off = new Image(88,30); privacy_off.src = directCall + "images/nav-privacy-off.gif";
		
        aboutus_on = new Image(88,30);	     aboutus_on.src = directCall + "images/nav-aboutus-on.gif";
		aboutus_off = new Image(88,30);       aboutus_off.src = directCall + "images/nav-aboutus-off.gif";
        
        contactus_on = new Image(44,30);       contactus_on.src = directCall + "images/nav-contactus-on.gif";
		contactus_off = new Image(44,30);      contactus_off.src = directCall + "images/nav-contactus-off.gif";
		
        employment_on = new Image(77,30);     employment_on.src = directCall + "images/nav-employment-on.gif";
		employment_off = new Image(77,30);    employment_off.src = directCall + "images/nav-employment-off.gif";
		
        services_on = new Image(168,29);         services_on.src = directCall + "images/nav-services-on.gif";
		services_off = new Image(168,29);        services_off.src = directCall + "images/nav-services-off.gif";
		
        loan_on = new Image(168,24);            loan_on.src = directCall + "images/nav-loan-on.gif";
		loan_off = new Image(168,24);           loan_off.src = directCall + "images/nav-loan-off.gif";
        
        deposit_on = new Image(168,54);       deposit_on.src = directCall + "images/nav-deposit-on.gif";
		deposit_off = new Image(168,54);      deposit_off.src = directCall + "images/nav-deposit-off.gif";
		
        locations_on = new Image(168,44);            locations_on.src = directCall + "images/nav-locations-on.gif";
		locations_off = new Image(168,0);           locations_off.src = directCall + "images/nav-locations-off.gif";

 /*       news_on = new Image(168,34);           news_on.src = directCall + "images/nav-news-on.gif";
		news_off = new Image(168,34);          news_off.src = directCall + "images/nav-news-off.gif";
 */         

		financials_on = new Image(168,29);            financials_on.src = directCall + "images/nav-financials-on.gif";
		financials_off = new Image(168,29);           financials_off.src = directCall + "images/nav-financials-off.gif";
      
        sitemap_on = new Image(168,24);            sitemap_on.src = directCall + "images/nav-sitemap-on.gif";
		sitemap_off = new Image(168,24);           sitemap_off.src = directCall + "images/nav-sitemap-off.gif";
		
		bankingmatters_on = new Image(168,24);   bankingmatters_on.src = directCall + "images/nav-bankingmatters-on.gif";
		bankingmatters_off = new Image(168,24);   bankingmatters_off.src = directCall + "images/nav-bankingmatters-off.gif";
        
        home_on = new Image(168,0);            home_on.src = directCall + "images/nav-home-on.gif";
        home_off = new Image(168,0);           home_off.src = directCall + "images/nav-home-off.gif";
        
        green_circle = new Image(9,9);            green_circle.src = directCall + "images/green_circle.gif";
        green_arrow = new Image(9,9);          green_arrow.src = directCall + "images/green_arrow.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  



// open calculator windows
 function showCalc(calc){
 	if(newWin != null){
		newWin.close();
		}
	var pWidth = ( ((parseInt(screen.width) / 2)) - 275 )
	var pHeight = (((parseInt(screen.height) / 2)) -240)
	      newWin = window.open(calc,'hello',"width=550,height=480,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");
	}

//open application windows
//sample link <a href="javascript:openwin('https://www.FIDOMAIN.com/Forms/OnlineForm.cgi?form=some_app')"></a>
	function open_window(URL) {
	 aWindow = window.open(URL,"application","toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=600,height=450,screenX=100,screenY=104,top=90,left=100");
	  }  



//style sheet sniffer 
navigator.userAgent.indexOf('Mac') != -1 ? document.write('<link href="'+securedir+'_macstyle.css" rel="stylesheet">') : document.write('<link href="'+securedir+'_winstyle.css" rel="stylesheet">');

//disable right click menu
var message="Function Disabled!";

function clickIE(){
    if (document.all){
        popUp('HM_Menu1');
        return false;
    }
}
function clickNS(e){

    if (document.layers||(document.getElementById&&!document.all)){
        if (e.which==2||e.which==3) {
            popUp('HM_Menu1',e);
            return false;
        }
    }
}
function clickNS6(e){
document.oncontextmenu=new Function("popUp('HM_Menu1')");
showMenu(e);
    if(e.which==2||e.which==3){
       return false;
    }
}
function showMenu(e){
    popUp('HM_Menu1',e);
}

if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    //document.onmousedown=showMenu;
    document.onmousedown=clickNS;
}
else if(document.all){
    
    document.onmousedown=clickNS;
    document.onmouseup=new Function("popDown('HM_Menu1')");
    document.oncontextmenu=clickIE;
}
else{
   document.onmouseup=clickNS;
   document.oncontextmenu=new Function("return false")
}

if(browserName =="Netscape" && browserVer < 5){

document.onmouseup=new Function("popDown('HM_Menu1')");
}

//layer code
function changetext(whichcontent){
var whichcontent = whichcontent;
    if (document.all)
    	{
        	descriptions.innerHTML=whichcontent;
    	}
    else if (document.layers)
    	{
        
        	document.d1.document.d2.document.write(whichcontent);
        	document.d1.document.d2.document.close();
    	}
    else
        {   
           //this is the Netscape 6 fix
            over = document.getElementById(["descriptions"]);
            
            range = document.createRange();
            range.setStartBefore(over);
            domfrag = range.createContextualFragment(whichcontent);
           
            while (over.hasChildNodes()) {
            over.removeChild(over.lastChild);
            }
            over.appendChild(domfrag);
         }
                       
}

var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
function changeDate(){
    var mydate=new Date();
	var year=mydate.getYear()
	if (year < 1000)
		year+=1900
	var day=mydate.getDay()
	var month=mydate.getMonth()
	var daym=mydate.getDate()
	if (daym<10)
		daym="0"+daym
	var hours=mydate.getHours()
	var minutes=mydate.getMinutes()
	var seconds=mydate.getSeconds()
	var dn="AM"
	if (hours>=12)
		dn="PM"
	if (hours>12){
		hours=hours-12
		}
	if (hours==0)
		hours=12
	if (minutes<=9)
		minutes="0"+minutes
	if (seconds<=9)
		seconds="0"+seconds     
        //hours+':'+minutes+' '+dn+'   '+dayarray[day]+', '+
    var netdate= montharray[month]+' '+daym+', '+year;    
return netdate;

}

//used to make tables easy

function startable(title,date,disclaimer)
{
if(date!="&nbsp;&nbsp;"){
    str = "Effective through";
}
else{
    str = " ";
}
var whole ='';
if(disclaimer){
whole+='<span class="subheader">'+title+'</span><img src="../images/clearpix.gif" width="150" height="1" alt="" border="0"><br /><span class="smalltext">'+str+' ' +changeDate()+'<br />'+disclaimer+'</span>'; 
}
else{
whole+='<span class="subheader">'+title+'</span><img src="../images/clearpix.gif" width="150" height="1" alt="" border="0"><br /><span class="smalltext">'+str+' ' +changeDate()+'</span>'; 
}
whole+='<table width="500" border="0" cellpadding="0" cellspacing="0">';
whole+='<tr>';
whole+='<td bgcolor="#000000" width="100%">';
whole += '<table width="500" cellspacing="0" cellpadding="5" bgcolor="#FFFFFF">';
document.write(whole);
}



function startablerates(title,date)
{
if(date!="&nbsp;&nbsp;"){
    str = "Effective through";
}
else{
    str = " ";
}

var whole ='';

if ((date) && (date !=" ")) { // writes date if provided
whole+='<span class="subheader">'+title+'</span><img src="../images/clearpix.gif" width="150" height="1" alt="" border="0"><br /><span class="smalltext">'+str+' ' +date+'</span>'; 
}
else { // writes todays date if no date provided
whole+='<span class="subheader">'+title+'</span><img src="../images/clearpix.gif" width="150" height="1" alt="" border="0"><br /><span class="smalltext">'+str+' ' +changeDate()+'</span>'; 
}
whole+='<table width="500" border="0" cellpadding="0" cellspacing="0">';
whole+='<tr>';
whole+='<td bgcolor="#000000" width="100%">';
whole += '<table width="500" cellspacing="0" cellpadding="5" bgcolor="#FFFFFF">';
document.write(whole);
}


function headrow(arraydata)
{
var whole = '';
whole += '<tr>';
for(i=0;i<arraydata.length;i++){
  
        whole += '<th class="tablerowheader" valign="top">' + arraydata[i] + '</th>';
}
whole += '</tr>';
document.write(whole);
}
function rowcolor1(arraydata,align,nowrap)
{
   if(!nowrap){
     nowrap = new Array();
     var wrap = false;
    }
   else{
    var wrap = true;
   }
    var whole = '';
    whole += '<tr>';
    for(i=0;i<arraydata.length;i++){
        if(!wrap){ 
            nowrap[i] ="";
         }
            whole += '<td align="'+align[i]+'" valign="top"  class="tablecontent">' + arraydata[i] + '</td>';
    }
    whole += '</tr>';
    document.write(whole);
}

function rowcolor2(arraydata,align,nowrap)
{
   if(!nowrap){
     nowrap = new Array();
     var wrap = false;
    }
   else{
    var wrap = true;
   }
    var whole = '';
    whole += '<tr>';
    for(i=0;i<arraydata.length;i++){
        if(!wrap){ 
            nowrap[i] ="";
         }
        whole += '<td align="'+align[i]+'" valign="top" '+nowrap[i]+' class="tablecontent2">' + arraydata[i] + '</td>';
    }
    whole += '</tr>';
    document.write(whole);
}


function endtable()
{
document.write('</table></td></tr></table><span class="ficontent">');
}
//disclosure pop up window
/*var cd_disclosure=""
cd_disclosure+='Annual Percentage Yield (APY) is based on interest compounding monthly. Rates subject to change without notice. $500 minimum balance to obtain APY. APY assumes principal and interest remain on deposit for at least one year. Penalty may be imposed for early withdrawals. These and other conditions may reduce earnings on account - ask for details. Personal funds only. Product offer may be withdrawn at anytime.';
var mm_disclosure=""
mm_disclosure+='The Money Market Deposit Account and Access Plus Account are variable rates. The minimum balance to obtain the Annual Percentage Yield on the Money Market Deposit Account is $2,500.00. The minimum balance on the Access Plus Account is listed above. Fees may reduce earnings on accounts - ask for details.';
*/


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 showCalc2(calc){
		var pWidth = ( ((parseInt(screen.width) / 2)) - 320)
		var pHeight = (((parseInt(screen.height) / 2)) - 180)
        window.open(calc,'hello',"width=640,height=360,left=" + pWidth + ",top=" + pHeight + ",resizable=1,scrollbars=1");
}
function show_warning(URL)
{

	//page variables
	var page_bgcolor="#EFEFF7";
	var border_color="#5271AD";
	var table_bgcolor="#EFEFF7";
	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><font face="Arial,Verdana,Helvetica" size="-1"><b>IMPORTANT NOTICE</b><br><br>You are leaving the Belmont Savings Bank website.  The bank does not endorse or guarantee the products, information, or recommendations provided by linked sites and the Bank is not liable for any products or services advertised on these sites.  Each third party may have a privacy policy that differs from the Bank.  Any linked site may provide less security than the Bank\'s website.';                            
	content+='				<br><br>';
	content+='				<br><br>';
	content+='				 <div align="center"><a href="javascript:opener.open(\''+URL+'\'); self.close();" onClick="setTimeout(\'self.close()\',3000)">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) - 295) / 2);
     newwin = window.open("","newwin", "width=340,height=295,left="+pWidth+",top="+pHeight+", scrollbars=1");
 	newwin.document.open();
	newwin.document.write(content);
	newwin.document.close();
}	

