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='<span class="bullet">• </span>';

//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(213,25,"item_off","item_on",1,1,"clB",0,"right",0,0,imgdir+"tri.gif",5,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','Personal Internet Banking','');
    //oM.makeMenu('menu1_1_1','menu1_1','Login','https://www.townsquarebank.com/onlineserv/HB/');  
    oM.makeMenu('menu1_1_2','menu1_1','Demo','https://www.townsquarebank.com/index.html?demo'); 
    oM.makeMenu('menu1_1_3','menu1_1','Register','https://www.townsquarebank.com/onlineserv/HB/STDReg.cgi'); 

oM.makeMenu('menu1_1_4','menu1_1','FAQ',sitedir+'faqs_ib.html')
    oM.makeMenu('menu1_1_5','menu1_1','Help','https://www.townsquarebank.com/onlineserv/HB/login_help.html')
oM.makeMenu('menu1_2','menu1','Personal Bill Pay','');
    oM.makeMenu('menu1_2_1','menu1_2','FAQ',sitedir+'faqs_bp.html')
    oM.makeMenu('menu1_2_2','menu1_2','Help','https://www.townsquarebank.com/onlineserv/HB/login_help.html')
oM.makeMenu('menu1_3','menu1','Business Cash Management',''); 	
    oM.makeMenu('menu1_3_1','menu1_3','Login','https://www.townsquarebank.com/onlineserv/CM/');  
    oM.makeMenu('menu1_3_2','menu1_3','Demo','javascript:newWindow(\'http://www.cmdemo.com\');'); 
    oM.makeMenu('menu1_3_3','menu1_3','Register','Javascript:newWindow(\'https://www.townsquarebank.com/site/eft_disclosure.html\');'); 
    oM.makeMenu('menu1_3_4','menu1_3','Help','https://www.townsquarebank.com/onlineserv/HB/login_help.html')
oM.makeMenu('menu1_4','menu1','Disclosures',sitedir+'disclosureLinks.html');

oM.makeMenu('menu2')
oM.makeMenu('menu2_1','menu2','Personal Checking Accounts',sitedir+'deposit_percheck.html');
    oM.makeMenu('menu2_1_1','menu2_1','YES! Free Checking',sitedir+'deposit_percheck.html#free');  
    oM.makeMenu('menu2_1_2','menu2_1','YES! 50+ Free Interest Checking',sitedir+'deposit_percheck.html#50_free_interest_checking'); 
    oM.makeMenu('menu2_1_3','menu2_1','YES! Direct Free Interest Checking',sitedir+'deposit_percheck.html#direct_free_interest_checking'); 
    oM.makeMenu('menu2_1_4','menu2_1','YES! Preferred Interest Checking',sitedir+'deposit_percheck.html#preferred_interest');  
    oM.makeMenu('menu2_1_5','menu2_1','YES! Money Market Checking',sitedir+'deposit_percheck.html#money_market'); 
oM.makeMenu('menu2_2','menu2','Personal Savings Accounts',sitedir+'deposit_persav.html');
    oM.makeMenu('menu2_2_1','menu2_2','Savings Account',sitedir+'deposit_persav.html#savings');  
    oM.makeMenu('menu2_2_2','menu2_2','Bank It Savings Account',sitedir+'deposit_persav.html#bankIt');  
    oM.makeMenu('menu2_2_3','menu2_2','Club Account',sitedir+'deposit_persav.html#club'); 
    oM.makeMenu('menu2_2_4','menu2_2','Certificates of Deposit',sitedir+'deposit_persav.html#cd'); 
    oM.makeMenu('menu2_2_5','menu2_2','Individual Retirement Account',sitedir+'deposit_persav.html#ira');  
oM.makeMenu('menu2_3','menu2','Business Checking Accounts',sitedir+'deposit_buscheck.html');  
    oM.makeMenu('menu2_3_1','menu2_3','YES! Free Business Checking',sitedir+'deposit_buscheck.html#free_business');  
    oM.makeMenu('menu2_3_2','menu2_3','YES! Business Interest Checking',sitedir+'deposit_buscheck.html#business_interest'); 
    oM.makeMenu('menu2_3_3','menu2_3','YES! Commercial Checking',sitedir+'deposit_buscheck.html#commercial'); 
    oM.makeMenu('menu2_3_4','menu2_3','YES! Business Money Market Checking',sitedir+'deposit_buscheck.html#business_money_market'); 
oM.makeMenu('menu2_4','menu2','Business Savings Accounts',sitedir+'deposit_bussav.html');
    oM.makeMenu('menu2_4_1','menu2_4','Business Savings Account',sitedir+'deposit_bussav.html#savings');  
    oM.makeMenu('menu2_4_2','menu2_4','Business Certificate of Deposit',sitedir+'deposit_bussav.html#cd'); 
oM.makeMenu('menu2_5','menu2','Other Services',sitedir+'deposit_services.html');	
    oM.makeMenu('menu2_5_1','menu2_5','VISA® Check Card',sitedir+'deposit_services.html#visa');  
    oM.makeMenu('menu2_5_2','menu2_5','Self Serve Boxes',sitedir+'deposit_services.html#boxes'); 
    oM.makeMenu('menu2_5_3','menu2_5','Combined Account Statements',sitedir+'deposit_services.html#combined'); 
    oM.makeMenu('menu2_5_4','menu2_5','Business Remote Deposit Service',sitedir+'deposit_services.html#remote_deposit'); 
    oM.makeMenu('menu2_5_5','menu2_5','Internet Banking',sitedir+'deposit_services.html#ib');  
    oM.makeMenu('menu2_5_6','menu2_5','Bill Pay',sitedir+'deposit_services.html#bp'); 
    oM.makeMenu('menu2_5_7','menu2_5','Pre-authorized Transfers',sitedir+'deposit_services.html#transfers'); 
    oM.makeMenu('menu2_5_8','menu2_5','E-mail Statements',sitedir+'deposit_services.html#email');
oM.makeMenu('menu2_9','menu2','Check Reorder','http://www.townsquarebank.com/site/thirdparty.html?newUrl=http://www.deluxe.com/');

oM.makeMenu('menu3')
oM.makeMenu('menu3_1','menu3','Mortgage',sitedir+'loans.html#mortgage');  
oM.makeMenu('menu3_2','menu3','Auto',sitedir+'loans.html#auto');
oM.makeMenu('menu3_3','menu3','Motorcycles',sitedir+'loans.html#mc');
oM.makeMenu('menu3_4','menu3','ATV and Personal Watercraft',sitedir+'loans.html#atv');   
oM.makeMenu('menu3_5','menu3','R.V. and Marine',sitedir+'loans.html#rv');
oM.makeMenu('menu3_6','menu3','Savings Assignments',sitedir+'loans.html#savings');    
oM.makeMenu('menu3_7','menu3','Credit Cards',sitedir+'loans.html#credit');    
oM.makeMenu('menu3_8','menu3','Loan Calculator',sitedir+'calculators_loan.html');    

oM.makeMenu('menu4')
//oM.makeMenu('menu4_1','menu4','Payday Power',sitedir+'rates.html#payday');  
//oM.makeMenu('menu4_2','menu4','Interest Checking',sitedir+'rates.html#interest');
//oM.makeMenu('menu4_3','menu4','Super Now',sitedir+'rates.html#super');
//oM.makeMenu('menu4_4','menu4','Savings Acct.',sitedir+'rates.html#savings');   
//oM.makeMenu('menu4_5','menu4','CDs',sitedir+'rates.html#cds');
//oM.makeMenu('menu4_6','menu4','IRAs',sitedir+'rates.html#iras');    
//oM.makeMenu('menu4_7','menu4','Published Rates',sitedir+'rates.html#published');    

oM.makeMenu('menu5');
oM.makeMenu('menu5_1','menu5','Mailing Address',sitedir+'contactus.html#mailing');   
oM.makeMenu('menu5_2','menu5','Cannonsburg',sitedir+'contactus.html#cannonsburg'); 
oM.makeMenu('menu5_3','menu5','Midtown',sitedir+'contactus.html#midtown');   
oM.makeMenu('menu5_4','menu5','Nicholasville',sitedir+'contactus.html#nicholasville'); 
oM.makeMenu('menu5_5','menu5','Email Town Square Bank','mailto:logon@townsquarebank.com');   

oM.makeMenu('menu6');
oM.makeMenu('menu6_1','menu6','Loan Calculator',sitedir+'calculators_loan.html');   
oM.makeMenu('menu6_2','menu6','Loan Comparison Calculator',sitedir+'calculators_loancomp.html'); 
oM.makeMenu('menu6_3','menu6','Mortgage Calculator',sitedir+'calculators_mortgage.html');   
oM.makeMenu('menu6_4','menu6','Savings Calculator',sitedir+'calculators_savings.html'); 
oM.makeMenu('menu6_5','menu6','Retirement Calculator',sitedir+'calculators_retirement.html');
oM.makeMenu('menu6_6','menu6','Kids Calculator',sitedir+'calculators_kids.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("onlinebanking");
var dropmenu2 = new  FindPosition("deposit");
var dropmenu3 = new  FindPosition("loans");
var dropmenu4 = new  FindPosition("rates");
var dropmenu5 = new  FindPosition("contact");
var dropmenu6 = new  FindPosition("calculators");

function showMenu(menu){
	switch(menu){
		case "menu1":
		oM.m["menu1"].b.moveIt(dropmenu1.xPos+0,dropmenu1.yPos+30);
		break;
		case "menu2":
        oM.m["menu2"].b.moveIt(dropmenu2.xPos+0,dropmenu2.yPos+30);
		break;
		case "menu3":
		oM.m["menu3"].b.moveIt(dropmenu3.xPos+0,dropmenu3.yPos+30);
		break;
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos+0,dropmenu4.yPos+30);
		break;        
		case "menu5":
		oM.m["menu5"].b.moveIt(dropmenu5.xPos+0,dropmenu5.yPos+30);
		break;
		case "menu6":
		oM.m["menu6"].b.moveIt(dropmenu6.xPos+0,dropmenu6.yPos+30);
		break;     
		
	} 
	oM.showsub(menu);
	
}



