
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("mortgage");
var dropmenu5 = new FindPosition("insurance");
var dropmenu6 = new FindPosition("investment");
var dropmenu7 = new FindPosition("personalloans");
var dropmenu8 = new FindPosition("financial");
var dropmenu9 = new FindPosition("formsdis");
var dropmenu10 = new FindPosition("au");


function showMenu(menu){
	
	switch(menu){
		case "eb":
		oM.m["eb"].b.moveIt(dropmenu1.xPos+158,dropmenu1.yPos);
		break;
		case "pb":
		oM.m["pb"].b.moveIt(dropmenu2.xPos+158,dropmenu2.yPos);
		break;
		case "bb":
		oM.m["bb"].b.moveIt(dropmenu3.xPos+158,dropmenu3.yPos);
		break;
		case "ms":
		oM.m["ms"].b.moveIt(dropmenu4.xPos+158,dropmenu4.yPos);
		break;
		case "ins":
		oM.m["ins"].b.moveIt(dropmenu5.xPos+158,dropmenu5.yPos);
		break;
		case "inv":
		oM.m["inv"].b.moveIt(dropmenu6.xPos+158,dropmenu6.yPos);
		break;
	    case "pl":
		oM.m["pl"].b.moveIt(dropmenu7.xPos+158,dropmenu7.yPos);
		break;		
		case "ft":
		oM.m["ft"].b.moveIt(dropmenu8.xPos+158,dropmenu8.yPos);
		break;
		case "fd":
		oM.m["fd"].b.moveIt(dropmenu9.xPos+158,dropmenu9.yPos);
		break;		
		case "au":
		oM.m["au"].b.moveIt(dropmenu10.xPos-50,dropmenu10.yPos+3);
		break;			
	} 
	oM.showsub(menu);
}
//end of file

//end file
