var url = self.location.href;
if (url.indexOf("#")!=-1)
	self.location.href=url.substring(url.indexOf('#'),url.length);


var newH = 36;
if(document.layers){
	document.write('<style type="text/css">.clS,.clSover{border: 0px; }</style>');
	newH += 1;}


oM=new makeCM("oM"); 
oM.resizeCheck=0; 
oM.rows=1;  
oM.onlineRoot=""
oM.offlineRoot=""
oM.pxBetween=0; 
oM.fillImg=imgdir+"clearpix.gif"; 
oM.fromTop=0; 
oM.fromLeft=0; 
oM.wait=300; 
oM.zIndex=400;
oM.useBar=0; 
oM.barWidth="0"; 
oM.barHeight="menu"; 
oM.barX=0;
oM.barY="menu"; 
oM.barClass="clB";
oM.barBorderX=0; 
oM.barBorderY=0;
db="<img src='"+imgdir+"clearpix.gif' width='3' height='1' border='0' alt='' />";

//oM.level[0]=new cm_makeLevel(width,height,regClass,overClass,borderX,borderY,borderClass,rows,align,offsetX,offsetY,arrow,arrowWidth,arrowHeight)
oM.level[0]=new cm_makeLevel(0,0,"bordercolor","bordercolor",0,0,"clB",0,"bottom",0,0,0,0,0);
oM.level[0].filter="progid:DXImageTransform.Microsoft.Alpha(opacity=100, finishopacity=100, style=3)";
oM.level[1]=new cm_makeLevel(175,25,"item_off","item_on",1,1,"clB",0,"right",0,0,imgdir+"tri.gif",10,10);
oM.level[1].roundBorder=1;
/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/
oM.makeMenu('menu1');
	oM.makeMenu('menu1_1','menu1',db+'Deposit Account Agreement<br />'+db+'&amp; Disclosure',sitedir+'ebanking_disclosure.html','','',newH);
	oM.makeMenu('menu1_2','menu1',db+'Electronic Funds Transfer<br />'+db+'Disclosure',sitedir+'ebanking_disclosure.html#eft','','',newH);

oM.makeMenu('menu2');
	oM.makeMenu('menu2_1','menu2',db+'Checking Accounts',sitedir+'personal_checking.html');
		oM.makeMenu('menu2_1_1','menu2_1',db+'Regular Checking',sitedir+'personal_checking_regular.html');
		oM.makeMenu('menu2_1_2','menu2_1',db+'Guaranteed Checking',sitedir+'personal_checking_guaranteed.html');
		oM.makeMenu('menu2_1_3','menu2_1',db+'NOW Checking',sitedir+'personal_checking_now.html');
		oM.makeMenu('menu2_1_4','menu2_1',db+'Peoples Checking',sitedir+'personal_checking_peoples.html');
		oM.makeMenu('menu2_1_5','menu2_1',db+'Money Market Checking',sitedir+'personal_checking_money.html');
		oM.makeMenu('menu2_1_6','menu2_1',db+'Horizon Club Checking',sitedir+'personal_checking_horizon.html');
		oM.makeMenu('menu2_1_7','menu2_1',db+'Lifetime Free Checking',sitedir+'personal_checking_lifetime.html');
		oM.makeMenu('menu2_1_8','menu2_1',db+'Rates',sitedir+'rates.html#checking');
	oM.makeMenu('menu2_2','menu2',db+'Savings Accounts',sitedir+'personal_savings.html');
		oM.makeMenu('menu2_2_1','menu2_2',db+'Regular Savings',sitedir+'personal_savings_regular.html');
		oM.makeMenu('menu2_2_2','menu2_2',db+'Children&rsquo;s Savings',sitedir+'personal_savings_regular.html#children');
		oM.makeMenu('menu2_2_3','menu2_2',db+'Certificates of Deposit',sitedir+'personal_savings_cd.html');
		oM.makeMenu('menu2_2_4','menu2_2',db+'Individual Retirement Accounts',sitedir+'personal_savings_ira.html');
		oM.makeMenu('menu2_2_5','menu2_2',db+'Rates',sitedir+'rates.html#savings');
	oM.makeMenu('menu2_3','menu2',db+'Loan Accounts',sitedir+'personal_loan.html');
		oM.makeMenu('menu2_3_1','menu2_3',db+'Personal Loans',sitedir+'personal_loan_personal.html');
		oM.makeMenu('menu2_3_2','menu2_3',db+'Construction Loans',sitedir+'personal_loan_mortgage.html');
		oM.makeMenu('menu2_3_3','menu2_3',db+'Home Mortgage Loans',sitedir+'personal_loan_mortgage.html#home');
		oM.makeMenu('menu2_3_4','menu2_3',db+'Loan Application','https://www.peoplesstatebankonline2.com/Forms/OnlineForm.cgi?form=loan_app&onweb=true');
	oM.makeMenu('menu2_4','menu2',db+'Other Products &amp; Services',sitedir+'personal_other.html');
		oM.makeMenu('menu2_4_1','menu2_4',db+'Funds Availability',sitedir+'personal_other_funds.html#funds');
		oM.makeMenu('menu2_4_2','menu2_4',db+'Online Banking',sitedir+'personal_other_overdraft.html#online');
		oM.makeMenu('menu2_4_3','menu2_4',db+'FDIC Insurance',sitedir+'personal_other_funds.html#fdic');
		oM.makeMenu('menu2_4_4','menu2_4',db+'Direct Deposit &<br />'+db+'Automatic Transfer',sitedir+'personal_other_overdraft.html#directdeposit','','',newH);
		oM.makeMenu('menu2_4_5','menu2_4',db+'Same Day Credit / No Cut-Off',sitedir+'personal_other_funds.html');
		oM.makeMenu('menu2_4_6','menu2_4',db+'Online Check Ordering',sitedir+'personal_other_overdraft.html#check');
		oM.makeMenu('menu2_4_7','menu2_4',db+'ATM, Debit, Credit Cards',sitedir+'personal_other_cards.html');

		
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3',db+'Business Checking',sitedir+'business_checking.html');		
	oM.makeMenu('menu3_2','menu3',db+'Business NOW Checking',sitedir+'business_now.html');
	oM.makeMenu('menu3_3','menu3',db+'Online Banking',sitedir+'business_online.html');
	oM.makeMenu('menu3_4','menu3',db+'Other Business Services',sitedir+'business_other.html');
	oM.makeMenu('menu3_5','menu3',db+'Commercial Analysis Checking',sitedir+'business_commercial.html');
	oM.makeMenu('menu3_6','menu3',db+'Business Money Market Checking',sitedir+'business_money.html');
	oM.makeMenu('menu3_7','menu3',db+'Cash Management',sitedir+'business_online.html');
	oM.makeMenu('menu3_8','menu3',db+'Rates',sitedir+'rates.html');

oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4',db+'Loan Calculator',sitedir+'calculators_loan.html');
	oM.makeMenu('menu4_2','menu4',db+'Loan Comparison<br />'+db+'Calculator',sitedir+'calculators_loancomp.html','','',newH);
	oM.makeMenu('menu4_3','menu4',db+'Mortgage Calculator',sitedir+'calculators_mortgage.html');
	oM.makeMenu('menu4_4','menu4',db+'Retirement Calculator',sitedir+'calculators_retirement.html');
	oM.makeMenu('menu4_5','menu4',db+'Savings Calculator',sitedir+'calculators_savings.html');
	oM.makeMenu('menu4_6','menu4',db+'Kids Calculator',sitedir+'calculators_kids.html');
									
oM.makeMenu('menu5');
	oM.makeMenu('menu5_1','menu5',db+'Guestbook','https://www.peoplesstatebankonline2.com/Forms/OnlineForm.cgi?form=guestbook&onweb=true');

		
oM.makeMenu('menu6');
	oM.makeMenu('menu6_1','menu6',db+'History',sitedir+'about_history.html');
	oM.makeMenu('menu6_2','menu6',db+'Letter from the President',sitedir+'about_letter.html');
	oM.makeMenu('menu6_3','menu6',db+'Bank Officials',sitedir+'about_officials.html');
	oM.makeMenu('menu6_4','menu6',db+'Locations and Hours',sitedir+'contact.html');
	
oM.makeMenu('menu7');
	oM.makeMenu('menu7_1','menu7',db+'Banking FAQ',sitedir+'help_banking.html');
	oM.makeMenu('menu7_2','menu7',db+'Online Banking FAQ',sitedir+'help_online.html');
	oM.makeMenu('menu7_3','menu7',db+'Security',sitedir+'help_security.html');
	
	
oM.menuPlacement=new Array(0);
oM.construct();

function FindPosition(image_name){
    if(!document.images[image_name]){
        return null;
    }
    this.image_name = image_name;
    this.xPos = 500;
    this.yPos = 500;
    this.ref_image = document.images[image_name];
    this.getRealLeft = getRealLeft;
    this.getRealTop = getRealTop;
    this.getRealLeft();
    this.getRealTop();
}

function getRealLeft(move) {
   if(!move){
        move = 0;
    }
   if(document.layers){
     this.xPos = this.ref_image.x + move;    
     return this.xPos;
   }
	this.xPos = this.ref_image.offsetLeft;
	tempEl = this.ref_image.offsetParent;
  	while (tempEl != null) {
  		this.xPos += tempEl.offsetLeft;
  		tempEl = tempEl.offsetParent;
  	}
    this.xPos = this.xPos + move;
	return this.xPos;
}

function getRealTop(move) {
    if(!move){
        move = 0;
    }
    if(document.layers){
     this.yPos = this.ref_image.y + move; 
     return this.yPos
   }
	this.yPos = this.ref_image.offsetTop;
	tempEl = this.ref_image.offsetParent;
	while (tempEl != null) {
  		this.yPos += tempEl.offsetTop;
  		tempEl = tempEl.offsetParent;
  	}
    this.yPos = this.yPos + move;
	return this.yPos;
}

var dropmenu1 = new  FindPosition("ebanking");
var dropmenu2 = new  FindPosition("personal");
var dropmenu3 = new  FindPosition("business");
var dropmenu4 = new  FindPosition("calculators");
var dropmenu5 = new  FindPosition("contact");
var dropmenu6 = new  FindPosition("about");
var dropmenu7 = new  FindPosition("help");



function showMenu(menu){
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos-1,dropmenu1.yPos+26);
		break;
		case "menu2":
		oM.m["menu2"].b.moveIt(dropmenu2.xPos-1,dropmenu2.yPos+25);
		break;		
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos-1,dropmenu3.yPos+25);
		break;		
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos-1,dropmenu4.yPos+25);
		break;
		case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos-1,dropmenu5.yPos+25);
		break;
		case "menu6":
		oM.m["menu6"].b.moveIt(dropmenu6.xPos-1,dropmenu6.yPos+25);
		break;
		case "menu7":
		oM.m["menu7"].b.moveIt(dropmenu7.xPos-1,dropmenu7.yPos+25);
		break;
	} 
	oM.showsub(menu);
	
}