
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("products");
var dropmenu2 = new FindPosition("membership");
var dropmenu3 = new FindPosition("apply");
var dropmenu4 = new FindPosition("convenience");

function showMenu(menu){
	
	switch(menu){
		case "ps":
		oM.m["ps"].b.moveIt(dropmenu1.xPos,dropmenu1.yPos + 31);
		break;
		case "m":
		oM.m["m"].b.moveIt(dropmenu2.xPos,dropmenu2.yPos + 31);
		break;
		case "ao":
		oM.m["ao"].b.moveIt(dropmenu3.xPos,dropmenu3.yPos + 31);
		break;
		case "cs":
		oM.m["cs"].b.moveIt(dropmenu4.xPos,dropmenu4.yPos + 31);
		break;
	} 
	oM.showsub(menu);
}
//end of file

//end file

