
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("membership");
var dropmenu2 = new FindPosition("savingschecking");
var dropmenu3 = new FindPosition("loans");
var dropmenu4 = new FindPosition("investinsure");
var dropmenu5 = new FindPosition("businessresources");
var dropmenu6 = new FindPosition("applynow");
var dropmenu7 = new FindPosition("atmbranchlocate");
var dropmenu8 = new FindPosition("eservices");
var dropmenu9 = new FindPosition("rates");


function showMenu(menu){
	
	switch(menu){
		case "mem":
		oM.m["mem"].b.moveIt(dropmenu1.xPos,dropmenu1.yPos + 21);
		break;
		case "per":
		oM.m["per"].b.moveIt(dropmenu2.xPos,dropmenu2.yPos + 21);
		break;
		case "loa":
		oM.m["loa"].b.moveIt(dropmenu3.xPos,dropmenu3.yPos + 21);
		break;
		case "inv":
		oM.m["inv"].b.moveIt(dropmenu4.xPos,dropmenu4.yPos + 21);
		break;
		case "bus":
		oM.m["bus"].b.moveIt(dropmenu5.xPos,dropmenu5.yPos + 21);
		break;
		case "app":
		oM.m["app"].b.moveIt(dropmenu6.xPos+168,dropmenu6.yPos - 1);
		break;
		case "bra":
		oM.m["bra"].b.moveIt(dropmenu7.xPos+168,dropmenu7.yPos - 1 );
		break;
		case "ese":
		oM.m["ese"].b.moveIt(dropmenu8.xPos+168,dropmenu8.yPos - 1);
		break;
		case "rat":
		oM.m["rat"].b.moveIt(dropmenu9.xPos+168,dropmenu9.yPos - 1 );
		break;
	} 
	oM.showsub(menu);
}
//end of file

//end file
