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">&#149; </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(1,1,"bordercolor","bordercolor",0,0,"clB",0,"bottom",0,0,0,0,0);
//oM.level[0].filter="PROGID:DXImageTransform.Microsoft.Alpha(opacity=97, finishopacity=87, style=1)";
oM.level[1]=new cm_makeLevel(180,22,"item_off","item_on",1,1,"bordercolor",0,"right",0,0,imgdir+"dhtml-arrow.gif",9,9);
oM.level[1].roundBorder=0;


/******************************************
Menu item creation:
myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
*************************************/

//Personal Banking
oM.makeMenu('menu1');
	oM.makeMenu('menu1_1','menu1',"Business Accounts", sitedir+"products_business.html");
		oM.makeMenu('menu1_1_2','menu1_1',"Business Checking", sitedir+"products_business_checking.html");
		oM.makeMenu('menu1_1_3','menu1_1',"Business Economy", sitedir+"products_business_economy.html");
		oM.makeMenu('menu1_1_4','menu1_1',"Business Merit Checking", sitedir+"products_business_merit.html");
		oM.makeMenu('menu1_1_5','menu1_1',"Business Money Market", sitedir+"products_business_money.html");
		oM.makeMenu('menu1_1_6','menu1_1',"Secured Cash Product", sitedir+"products_business_secured.html");
		oM.makeMenu('menu1_1_7','menu1_1',"Business Prime Savings", sitedir+"products_business_prime.html");
	oM.makeMenu('menu1_2','menu1',"Personal Accounts", sitedir+"products_personal.html");
		oM.makeMenu('menu1_2_1','menu1_2',"Yampa Valley Checking", sitedir+"products_personal_steamboat.html"); 
		oM.makeMenu('menu1_2_2','menu1_2',"Merit Checking", sitedir+"products_personal_merit.html");
		oM.makeMenu('menu1_2_3','menu1_2',"Money Market Checking", sitedir+"products_personal_money.html");
		oM.makeMenu('menu1_2_4','menu1_2',"Senior Checking Privileges", sitedir+"products_personal_senior.html");
		oM.makeMenu('menu1_2_5','menu1_2',"Prime Savings", sitedir+"products_personal_prime.html");
		oM.makeMenu('menu1_2_6','menu1_2',"Minor Savings", sitedir+"products_personal_minor.html");
	oM.makeMenu('menu1_3','menu1',"Time Certificates", sitedir+"products_time.html");
		oM.makeMenu('menu1_3_1','menu1_3',"Prime Rate Certificates", sitedir+"products_time_prime.html"); 
		oM.makeMenu('menu1_3_2','menu1_3',"Fixed Rate Certificates", sitedir+"products_time_fixed.html");
	oM.makeMenu('menu1_4','menu1',"IRAs", sitedir+"products_ira.html");
	
	oM.makeMenu('menu1_5','menu1',"Loans", sitedir+"products_loans.html");
		oM.makeMenu('menu1_5_1','menu1_5',"Commercial Loans", sitedir+"products_loans_commercial.html"); 
		oM.makeMenu('menu1_5_2','menu1_5',"Consumer Loans", sitedir+"products_loans_consumer.html");
	oM.makeMenu('menu1_6','menu1',"Other Services", sitedir+"products_other.html");
		oM.makeMenu('menu1_6_1','menu1_6',"ACH", sitedir+"products_other_ach.html"); 
		oM.makeMenu('menu1_6_2','menu1_6',"EFTPS", sitedir+"products_other_eftps.html");
		oM.makeMenu('menu1_6_3','menu1_6',"Scheduled Transfers", sitedir+"products_other_scheduled.html");
		oM.makeMenu('menu1_6_4','menu1_6',"Bill Payment Fees", sitedir+"products_other_billfees.html");
		oM.makeMenu('menu1_6_5','menu1_6',"Service Fees", sitedir+"products_other_servicefees.html");
		oM.makeMenu('menu1_6_6','menu1_6',"Internet Banking Pricing &amp; Features", sitedir+"products_other_ibfees.html");	
	oM.makeMenu('menu1_7','menu1',"Calculators", sitedir+"calculators.html");
		oM.makeMenu('menu1_7_1','menu1_7',"Loan", sitedir+"calculators_loan.html"); 
		oM.makeMenu('menu1_7_2','menu1_7',"Loan Comparison", sitedir+"calculators_loancompare.html");
		oM.makeMenu('menu1_7_3','menu1_7',"Mortgage", sitedir+"calculators_mortgage.html");
		oM.makeMenu('menu1_7_4','menu1_7',"Savings", sitedir+"calculators_savings.html");
		oM.makeMenu('menu1_7_5','menu1_7',"Retirement", sitedir+"calculators_retirement.html");
		oM.makeMenu('menu1_7_6','menu1_7',"Kids", sitedir+"calculators_kids.html");		

// Contact Us menu
oM.makeMenu('menu2');

// Help menu
oM.makeMenu('menu3');
	oM.makeMenu('menu3_1','menu3',"Banking", sitedir+"help_banking.html");		
	oM.makeMenu('menu3_2','menu3',"Internet Banking", sitedir+"help_internetbanking.html");	
	oM.makeMenu('menu3_3','menu3',"Security Tips", sitedir+"help_securitytips.html");	

// Mortgage menu
oM.makeMenu('menu4');
	oM.makeMenu('menu4_1','menu4',"Steamboat Mortgage", "http://steamboat.lendingstation.com");	
	oM.makeMenu('menu4_2','menu4',"Craig Mortgage", "http://yampavalleybank.lenderplanet.com");
	
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("prods");
var dropmenu2 = new FindPosition("contact");
var dropmenu3 = new FindPosition("help");
var dropmenu4 = new FindPosition("mortgage");

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