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(0,0,"bordercolor","bordercolor",0,0,"clB",0,"bottom",0,0,0,0,0);
//oM.level[0].filter="progid:DXImageTransform.Microsoft.Alpha(opacity=70, finishopacity=100, style=3)";
oM.level[1]=new cm_makeLevel(184,24,"item_off","item_on",1,1,"clB",0,"right",0,0,imgdir+"dhtml-arrow-off.gif",20,8);
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','Checking',sitedir+'personal_checking.html');
oM.makeMenu('menu1_2','menu1','Savings, CDs, &amp; IRAs',sitedir+'personal_savings.html');
oM.makeMenu('menu1_3','menu1','Credit Cards',sitedir+'banking_convenience.html');
oM.makeMenu('menu1_4','menu1','Online Banking',sitedir+'online_banking.html');
oM.makeMenu('menu1_5','menu1','Mortgages',sitedir+'personal_mortgages.html');
oM.makeMenu('menu1_6','menu1','Home Equity &amp; Personal Loans',sitedir+'personal_homeequity.html');
oM.makeMenu('menu1_7','menu1','Investments',sitedir+'investments.html');
oM.makeMenu('menu1_8','menu1','Banking Conveniences',sitedir+'banking_convenience.html');

oM.makeMenu('menu2')
oM.makeMenu('menu2_1','menu2','Resource Center',sitedir+'agbus_resource.html');
oM.makeMenu('menu2_2','menu2','Checking &amp; Savings',sitedir+'commercial_checksav.html');
oM.makeMenu('menu2_3','menu2','Business Credit Cards',sitedir+'commercial_loans_cards.html');
oM.makeMenu('menu2_4','menu2','Online Banking',sitedir+'online_banking.html');
oM.makeMenu('menu2_5','menu2','Small Business &amp; Commercial Loans',sitedir+'commercial_loans.html');	
oM.makeMenu('menu2_6','menu2','Asset Management',sitedir+'investments_asset.html'); 
oM.makeMenu('menu2_7','menu2','Investments',sitedir+'investments_business.html');
oM.makeMenu('menu2_8','menu2','Business Services',sitedir+'commercial_services.html');    



oM.makeMenu('menu3');
oM.makeMenu('menu3_1','menu3','Ag &amp; Business Resource Center',sitedir+'agbus_resource.html');   
oM.makeMenu('menu3_2','menu3','Checking &amp; Savings',sitedir+'commercial_checksav.html');   
oM.makeMenu('menu3_3','menu3','Online Banking',sitedir+'online_banking.html');  
oM.makeMenu('menu3_4','menu3','Ag Loans',sitedir+'agriculture_loans.html'); 
oM.makeMenu('menu3_5','menu3','Asset Management',sitedir+'investments_asset.html');  


oM.makeMenu('menu4');
oM.makeMenu('menu4_1','menu4','Demo','https://www.myalliancebank.com/index.html?demo');   
oM.makeMenu('menu4_2','menu4','AOL Users','https://www.myalliancebank.com/onlineserv/HB/aol.html');   
oM.makeMenu('menu4_3','menu4','EFT Disclosure','https://www.myalliancebank.com/onlineserv/HB/eft_disclosure.html');  
//oM.makeMenu('menu4_4','menu4','Reset Password','https://www.myalliancebank.com/onlineserv/HB/dimlDisplayer.cgi?DIML_FILE=passwordReset.diml');   
oM.makeMenu('menu4_4','menu4','Reset Password','https://www.myalliancebank.com/onlineserv/HB/ForgottenPW.html');
oM.makeMenu('menu4_5','menu4','Help','https://www.myalliancebank.com/onlineserv/HB/login_help.html');  
	
oM.makeMenu('menu5');
oM.makeMenu('menu5_1','menu5','Apply Today','https://www.myalliancebank.com/Forms/OnlineForm.cgi?form=employment_app&onweb=true');   
oM.makeMenu('menu5_2','menu5','Career Postings ',sitedir+'careers_post.html');  

oM.makeMenu('menu6');
oM.makeMenu('menu6_1','menu6','Savings Calculators ' ,sitedir+'calculator_savings.html');   
oM.makeMenu('menu6_2','menu6','Mortgage Calculators ',sitedir+'calculator_mortgage.html');

oM.makeMenu('menu7');
oM.makeMenu('menu7_1','menu7','Protect yourself from Email Scams ' ,sitedir+'email_safety.html');   
oM.makeMenu('menu7_2','menu7','Identity Theft Education Tool ','javascript:showWarning(\'http://anon.vodium.com.edgesuite.net/anon.vodium/fdic/identitytheft/index.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 dropmenu4 = new  FindPosition("login");
function showMenu(menu){
	switch(menu){
		case "per":
		oM.m["per"].b.moveIt(143, 160);
		break;
		case "bus":
        oM.m["bus"].b.moveIt(143, 181);
		break;
		case "ag":
		oM.m["ag"].b.moveIt(106, 206);
		break;
		case "menu4":
		oM.m["menu4"].b.moveIt(dropmenu4.xPos-149,dropmenu4.yPos+18);
		break;
		case "joi":
		oM.m["joi"].b.moveIt(120, 340);
		break;
		case "fin":
		oM.m["fin"].b.moveIt(131, 315);
		break;
		case "ca":
		oM.m["ca"].b.moveIt(131, 315);
		break;
	} 
	oM.showsub(menu);
	
}



