/* Obtain screen co-ordinates to place menu */

function repos() {
	var sURL = unescape(window.location.pathname);
	window.location.replace( sURL );
}

function loadMenu() {
	var pos = getLocation('loc0');
	new menu (MENU_ITEMS, MENU_POS, pos.x,  pos.y);
}

function getLocation(imgID) {
  /* This function returns the upperleft x,y coordinates of the specified image */
  
  var XY = new Object();
  var imgObj = document.images[imgID];
  if (document.layers) {
	XY.x = eval(imgObj).x;
	XY.y = eval(imgObj).y;
  } else {
	var x,y, temp;
	x = eval(imgObj).offsetLeft;
	y = eval(imgObj).offsetTop;
	temp = eval(imgObj).offsetParent;
  	while (temp != null) {
  		x += temp.offsetLeft;
		y += temp.offsetTop;
  		temp = temp.offsetParent;
  	}
  	
	XY.x = x;
	XY.y = y;
	
  }
  
  return XY;
}

